Concrete undecidable and unrecognizable languages, such as ATM and ATM, become tools once they can be transformed into other problems. Reductions turn one hard example into a method: to prove that a new problem is hard, show that a known hard problem can be translated into it.
Reduction. A transformation from instances of one decision problem to instances of another decision problem that preserves yes/no answers.
A reduction says: if I had a solver for the target problem, I could solve the source problem by translating the input first.
The direction matters. If A reduces to B, then B is at least as hard as A:
if B is decidable, then A is decidable;
if A is undecidable, then B is undecidable.
Example 1. DFA nonemptiness as reachability.
Let
NEDFA={⟨D⟩∣D is a DFA and L(D)=∅}.
Let
Lpath={⟨G,v,w⟩∣G is a directed graph and there is a path from v to w}.
Given a DFA D=(Q,Σ,δ,q0,F), build a directed graph from its transition graph, ignore transition labels, add a fresh target vertex t, and add an edge q→t from every accepting state q∈F. Then:
L(D)=∅⟺there is a path from q0 to t.
DFA nonemptiness becomes reachability: an accepting state is reachable iff the target is reachable.
The transformation does not decide whether D is nonempty. It only builds the graph instance. The path solver, if available, answers the translated question.
To use reductions inside Turing-machine proofs, the transformation itself must be algorithmic.
Computable function. A total function f:Σ∗→Σ∗ is computable if some Turing machine halts on every input w with exactly f(w) on its tape.
Totality is essential: the reduction must always finish producing the translated instance, even when the instance it produces contains a machine that may later loop.
Mapping reduction. A language A is mapping reducible to a language B, written A≤mB, if there is a computable function f:Σ∗→Σ∗ such that for every string w,
w∈A⟺f(w)∈B.
Computability. The function f can be produced by a decider-like TM that halts on every input.
Correctness. Membership is preserved exactly, both for yes-instances and for no-instances.
The function need not be surjective. Some instances of B may never appear as f(w).
If a decider for B exists, compose it with the reduction to decide A.
Theorem. If A≤mB and B is decidable, then A is decidable.
Proof. Let MB decide B, and let f be a mapping reduction from A to B. Construct a TM N:
On input w, compute f(w).
Run MB on input f(w).
Output whatever MB outputs.
N halts because f is computable and MB is a decider. Also,
N accepts w⟺MB accepts f(w)⟺f(w)∈B⟺w∈A.
So N decides A.
Corollary. If A≤mB and A is undecidable, then B is undecidable.
Otherwise, a decider for B would give a decider for A, contradicting the known undecidability of A.
Recipe: proving undecidability by mapping reduction.
Choose a known undecidable language A.
For an arbitrary input w of A, construct an instance f(w) of the target language B.
Prove that f is computable. Usually this means showing that a TM can write down the code of the new machine without running it.
Prove the two cases: w∈A⇒f(w)∈B and w∈/A⇒f(w)∈/B.
Conclude that B is undecidable.
The reduction must translate instances, not solve the source problem while translating.
The halting problem can be reproved cleanly as a mapping-reduction result. Use the notation
HALTTM={⟨M,w⟩∣M is a TM and M halts on w},
the same language previously denoted HALT.
Theorem.ATM≤mHALTTM. Therefore HALTTM is undecidable.
Given x=⟨M,w⟩, define
f(x)=⟨M′,w⟩,
where M′ is the following machine:
On input y, run M on w.
If M accepts w, accept y.
If M rejects w, loop forever.
The function f is computable because it only writes the code of M′ with M and w embedded inside it. It does not run M′.
If ⟨M,w⟩∈ATM, then M accepts w, so M′ accepts every input, in particular w. Thus ⟨M′,w⟩∈HALTTM.
If ⟨M,w⟩∈/ATM, then M either rejects or loops on w. In either case M′ does not halt on any input: it loops explicitly after rejection, or it waits forever for M to halt. Thus ⟨M′,w⟩∈/HALTTM.
So f is a mapping reduction from ATM to HALTTM. Since ATM is undecidable, HALTTM is undecidable.
Regularity of TM languages.
REGTM={⟨N⟩∣N is a TM and L(N) is regular}.
Unlike EDFA or EQDFA, this problem asks a property of a Turing machine's language. The machine itself is finite, but the language it accepts may be non-regular, undecidable, or only recognizable.
Theorem.REGTM is undecidable.
Reduce from ATM. Let
B={0n1n∣n≥0},
which is non-regular. Given x=⟨M,w⟩, output f(x)=⟨M′⟩, where M′ is:
On input y, if y∈B, accept.
Otherwise, run M on w.
Accept y iff M accepts w.
The reduction builds M' so its language is either all strings or the known non-regular language B.
The test y∈B is decidable by a Turing machine: check that the input has the form 0∗1∗ and that the two block lengths match.
If ⟨M,w⟩∈ATM, then M accepts w. Every y∈B is accepted by step 1, and every y∈/B is accepted by step 3. Hence
L(M′)={0,1}∗,
which is regular.
If ⟨M,w⟩∈/ATM, then M does not accept w. The only strings accepted by M′ are the strings caught by step 1, so
The same pipeline works for recognizers, but the conclusion is weaker because recognizers may loop on no-instances.
If a recognizer for B exists, compose it with the reduction to recognize A.
Theorem. If A≤mB and B is recognizable, then A is recognizable.
Let RB recognize B, and let f reduce A to B. On input w, compute f(w) and run RB on f(w). The resulting machine accepts exactly when
w∈A⟺f(w)∈B⟺RB accepts f(w).
If w∈/A, then f(w)∈/B, so RB may reject or loop. That is allowed for recognizers.
Corollary. If A≤mB and A is unrecognizable, then B is unrecognizable.
TM language equivalence.
EQTM={⟨M1,M2⟩∣M1,M2 are TMs and L(M1)=L(M2)}.
For DFAs, equivalence was decidable by product construction and reachability. For Turing machines, equality of recognized languages is not even recognizable.
Theorem.EQTM is unrecognizable.
Use the known unrecognizable language ATM. Given x=⟨M,w⟩, construct
f(x)=⟨M1,M2⟩
where:
Machine M1. On input y, run M on w. If M accepts w, accept y. If M rejects w, loop forever.
Machine M2. On input y, reject.
If ⟨M,w⟩∈ATM, then M does not accept w. The machine M1 accepts no string, and M2 also accepts no string. Hence
L(M1)=∅=L(M2),
so ⟨M1,M2⟩∈EQTM.
If ⟨M,w⟩∈/ATM, then M accepts w. The machine M1 accepts every input, while M2 accepts none:
L(M1)=Σ∗andL(M2)=∅.
So ⟨M1,M2⟩∈/EQTM.
Therefore
ATM≤mEQTM.
Since ATM is unrecognizable, EQTM is unrecognizable. In particular, it is undecidable.