MIT 18.404 — Lecture 8

Undecidability

During the first half hour of class, we go over the proofs of ∣N∣=∣Q∣|\mathbb{N}| = |\mathbb{Q}| and ∣N∣≠∣R∣|\mathbb{N}| \neq |\mathbb{R}| as a warm-up.

§ ATMA_{\mathrm{TM}} Undecidability

Theorem. (ATMA_{\mathrm{TM}}) Consider the language 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\}. Then ATMA_{\mathrm{TM}} is not decidable.

Proof: Suppose FTSOC that some TM HH decides ATMA_{\mathrm{TM}}. Recall that this means that:

H on ⟨M,w⟩={Accept if M accepts w.Reject  (via halting) if M rejects w.  (via halting or looping)H \text{ on } \langle M, w \rangle = \begin{cases} \textsc{Accept} & \text{ if } M \text{ accepts } w. \\ \textsc{Reject} ~ \textit{ (via halting)} & \text{ if } M \text{ rejects } w. ~ \textit{ (via halting or looping)} \end{cases}

Now consider the TM DD that takes an encoding of a Turing Machine ⟨M⟩\langle M \rangle as input and does the following:

D on ⟨M⟩={Accept if H rejects on ⟨M,⟨M⟩⟩.Reject if H accepts on ⟨M,⟨M⟩⟩.   ⟺   “D accepts ⟨M⟩ iff M does not accept ⟨M⟩.”D \text{ on } \langle M \rangle = \begin{cases} \textsc{Accept} & \text{ if } H \text{ rejects on } \langle M, \langle M \rangle \rangle. \\ \textsc{Reject} & \text{ if } H \text{ accepts on } \langle M, \langle M \rangle \rangle. \end{cases} ~ \iff ~ \text{``}D \text{ accepts } \langle M \rangle \text{ iff } M \text{ does not accept } \langle M \rangle\text{.''}

The contradiction, now, is that the definition above implies that DD accepts ⟨D⟩\langle D \rangle if and only if DD rejects ⟨D⟩\langle D \rangle.   ■\blacksquare

To see how the argument above relates to diagonalization, consider the diagram below.

The entry in row MiM_i and column ⟨Mj⟩\langle M_j \rangle indicates whether MiM_i accepts or rejects on input ⟨Mj⟩\langle M_j \rangle.

§ Turing-Unrecognizable

We first require the following lemma.

Theorem. (Decidable vs. Turing-Recognizable) A language AA is decidable if and only if AA and A‾\overline{A} are both Turing-recognizable.

Proof: The   ⟹  \implies direction is easy; combine the following two observations to win.

Now for the   ⟸  \impliedby direction. Suppose RR recognizes AA and SS recognizes A‾\overline{A}. Note for any input ww the following:

“If w∈A, then R must eventually accept.”   ∥   “If w∈A‾, then S must eventually accept.”\text{``If $w \in A$, then $R$ must eventually accept.''} ~~~ \parallel ~~~ \text{``If $w \in \overline{A}$, then $S$ must eventually accept.''}

So we run RR and SS on ww in parallel until one of them accepts; return Accept\textsc{Accept} if RR accepts, and return Reject\textsc{Reject} if SS accepts.   ■\blacksquare

We can now use this lemma to prove that languages are not Turing-recognizable.

Theorem. (ATM‾\overline{A_{\mathrm{TM}}}) The language 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 not Turing-recognizable.

Proof: Recall the following:

The previous theorem now implies that ATM‾\overline{A_{\mathrm{TM}}} cannot be Turing-recognizable.   ■\blacksquare