During the first half hour of class, we go over the proofs of ∣N∣=∣Q∣ and ∣N∣=∣R∣ as a warm-up.
§ ATM Undecidability
Theorem. (ATM) Consider the language ATM:={⟨M,w⟩∣M is a TM that accepts w}. Then ATM is not decidable.
Proof: Suppose FTSOC that some TM H decides ATM. Recall that this means that:
H on ⟨M,w⟩={AcceptReject (via halting) if M accepts w. if M rejects w. (via halting or looping)
Now consider the TM D that takes an encoding of a Turing Machine ⟨M⟩ as input and does the following:
D on ⟨M⟩={AcceptReject if H rejects on ⟨M,⟨M⟩⟩. if H accepts on ⟨M,⟨M⟩⟩. ⟺ “D accepts ⟨M⟩ iff M does not accept ⟨M⟩.”
The contradiction, now, is that the definition above implies that D accepts ⟨D⟩ if and only if D rejects ⟨D⟩. ■
To see how the argument above relates to diagonalization, consider the diagram below.
The entry in row Mi and column ⟨Mj⟩ indicates whether Mi accepts or rejects on input ⟨Mj⟩.
§ Turing-Unrecognizable
We first require the following lemma.
Theorem. (Decidable vs. Turing-Recognizable) A language A is decidable if and only if A and A are both Turing-recognizable.
Proof: The ⟹ direction is easy; combine the following two observations to win.
In general, if A is decidable, then its complement A is also decidable—just flip the answer.
In general, if A is decidable, then A is also Turing-recognizable.
Now for the ⟸ direction. Suppose R recognizes A and S recognizes A. Note for any input w the following:
“If w∈A, then R must eventually accept.” ∥ “If w∈A, then S must eventually accept.”
So we run R and S on w in parallel until one of them accepts; return Accept if R accepts, and return Reject if S accepts. ■
We can now use this lemma to prove that languages are not Turing-recognizable.
Theorem. (ATM) The language ATM:={⟨M,w⟩∣M is a TM that does not accept w} is not Turing-recognizable.
Proof: Recall the following:
From the end of Lecture 7, we know that ATM is Turing-recognizable.
From earlier in this lecture, we know that ATM is not decidable.
The previous theorem now implies that ATM cannot be Turing-recognizable. ■