MIT 18.404 — Lecture 9

Reducibility

§ Reducibility

Theorem. (Halting Problem) The language HALTTM:={⟨M,w⟩∣M is a TM that halts on w}\mathrm{HALT}_{\mathrm{TM}} := \{\langle M, w \rangle \mid M \text{ is a TM that halts on } w\} is undecidable.

Proof: Our strategy will be to use the undecidability of ATM:={⟨M,w⟩∣M is a TM that accepts w}A_{\mathrm{TM}} := \{\langle M, w \rangle \mid M \text{ is a TM that accepts } w\} from Lecture 8.

Suppose FTSOC that there is a TM RR that decides HALTTM\mathrm{HALT}_{\mathrm{TM}}. Then one can construct SS that does the following on ⟨M,w⟩\langle M, w \rangle.

So the decidability of HALTTM\mathrm{HALT}_{\mathrm{TM}} implies the decidability of ATMA_{\mathrm{TM}}, contradiction.   ■\blacksquare

The above proof is an example of a broader proof technique: reduction.

Definition. We say that a language AA is reducible to a language BB if we can decide AA using a decider for BB.

Theorem. (Reducibility and Decidability) Suppose language AA is reducible to language BB. Then the following are true:

None of this is particularly nonobvious.

Theorem. (ETME_{\mathrm{TM}}) The language ETM:={⟨M⟩∣M is a TM and L(M)=∅}E_{\mathrm{TM}} := \{ \langle M \rangle \mid M \text{ is a TM and } L(M) = \emptyset \} is undecidable.

Proof: Recall from Lecture 8 that ATMA_{\mathrm{TM}} is undecidable. It therefore suffices to prove that ATMA_{\mathrm{TM}} reduces to ETME_{\mathrm{TM}}.

Suppose we have a decider RR for ETME_{\mathrm{TM}}. Then we can construct a decider SS for ATMA_{\mathrm{TM}} that does the following on ⟨M,w⟩\langle M, w \rangle.

§ Mapping Reducibility

Definition. We say that a language AA is mapping reducible to a language BB (denoted A≤mBA \leq_m B) if there is a computable function (i.e., computable via Turing machine) f ⁣:Σ∗→Σ∗f \colon \Sigma^* \to \Sigma^* such that w∈Aw \in A if and only if f(w)∈Bf(w) \in B for all w∈Σ∗w \in \Sigma^*.

Theorem. (Mapping Reducibility and Turing-Recognizability) If A≤mBA \leq_m B, then the following are true.

Again, none of this is particularly nonobvious.

Theorem. (EQTMEQ_{\mathrm{TM}}) The language EQTM:={⟨B,C⟩∣B and C are TMs with L(B)=L(C)}EQ_{\mathrm{TM}} := \{\langle B, C \rangle \mid B \text{ and } C \text{ are TMs with } L(B) = L(C)\} is not Turing-recognizable.

Proof: Recall from Lecture 8 that ATM‾:={⟨M,w⟩∣M is a TM that does not accept w}\overline{A_{\mathrm{TM}}} := \{\langle M, w \rangle \mid M \text{ is a TM that does not accept } w\} is Turing-unrecognizable.

It therefore suffices to prove that ATM‾≤mEQTM\overline{A_{\mathrm{TM}}} \leq_m EQ_{\mathrm{TM}}. In other words, we seek a map ff such that:

f ⁣:⟨M,w⟩↦⟨B,C⟩    such that    ⟨M,w⟩∈ATM‾  ⟺  ⟨B,C⟩∈EQTMf \colon \langle M, w \rangle \mapsto \langle B, C \rangle ~~~ \text{ such that } ~~~ \boxed{\langle M, w \rangle \in \overline{A_{\mathrm{TM}}} \iff \langle B, C \rangle \in EQ_{\mathrm{TM}}}

We'll define the image ⟨B,C⟩\langle B, C \rangle of ff on ⟨M,w⟩\langle M, w \rangle like so.

You can check for yourself that the boxed equivalence (  ⟺  \iff) holds for this ff.   ■\blacksquare

And one more example.

Theorem. (EQTM‾\overline{EQ_{\mathrm{TM}}}) The language EQTM‾:={⟨B,C⟩∣B and C are TMs with L(B)≠L(C)}\overline{EQ_{\mathrm{TM}}} := \{\langle B, C \rangle \mid B \text{ and } C \text{ are TMs with } L(B) \neq L(C)\} is not Turing-recognizable.

Proof: Again, it suffices to prove that ATM‾≤mEQTM‾\overline{A_{\mathrm{TM}}} \leq_m \overline{EQ_{\mathrm{TM}}}. In other words, we seek a map ff such that:

f ⁣:⟨M,w⟩↦⟨B,C⟩    such that    ⟨M,w⟩∈ATM‾  ⟺  ⟨B,C⟩∈EQTM‾f \colon \langle M, w \rangle \mapsto \langle B, C \rangle ~~~ \text{ such that } ~~~ \boxed{\langle M, w \rangle \in \overline{A_{\mathrm{TM}}} \iff \langle B, C \rangle \in \overline{EQ_{\mathrm{TM}}}}

The image ⟨B,C⟩\langle B, C \rangle of ⟨M,w⟩\langle M, w \rangle under ff is almost entirely the same as before.

The only thing that changed is that BB now always returns Accept instead of Reject. Check for yourself that this works.   ■\blacksquare