← Student tools · Problem 16 · Lecture 8 · Round 1 (30 pts)

Self-aware Turing machines

A TM that reads its own description and acts on it. Used to give a one-line proof that ATM is undecidable.

CLO-1R1·30 ptsL8
🔊 Listen

The recursion theorem (Sipser §6.1) says: any TM can effectively obtain its own description ⟨M⟩ on its tape and use it as data. This unlocks a remarkably short proof that ATM is undecidable — one with no explicit diagonal argument visible.

ATM undecidable · recursion-theorem proof

Suppose D decides ATM. By the recursion theorem, build a TM M that on input w:

  1. Obtain ⟨M⟩ (recursion-theorem gift).
  2. Compute D(⟨M, w⟩).
  3. Output the opposite of D's answer.

Now ask: does M accept w? M accepts w ⇔ D(⟨M, w⟩) rejects ⇔ M does not accept w. Contradiction. So D cannot exist.

The diagonalisation is hidden inside M itself, not stretched across a separate machine D' as in Problem 3. The recursion theorem absorbs the bookkeeping; what remains is just "build a program that defies its own classifier."

🔊 Listen
Two proofs that A_TM is undecidable Classic (P3) · diagonal proof Assume D decides A_TM. Build separate D': on input ⟨M⟩: run D(⟨M, ⟨M⟩⟩) output opposite Apply D' to ⟨D'⟩: contradiction at the diagonal cell ⟨D', ⟨D'⟩⟩. Recursion theorem (P16) Assume D decides A_TM. By recursion theorem, build M with access to ⟨M⟩: on input w: run D(⟨M, w⟩) output opposite M accepts w ⇔ ¬M accepts w Contradiction. ∎

The proofs are the same proof in different clothes. The diagonal argument shows up somewhere — the recursion theorem just packages it. The recursion-theorem version is easier to generalise: Rice's theorem (Problem 14) uses the same template, replacing "D decides ATM" with "D decides any non-trivial property of L(M)."

🔊 Listen

Spell out one execution. Suppose D is your candidate decider for ATM. By the recursion theorem, there exists a TM M that on any input w:

  1. Writes down ⟨M⟩ (its own code).
  2. Calls D on the pair ⟨M, w⟩, gets some yes/no answer.
  3. If D says "M accepts w," then M rejects w.
  4. If D says "M does not accept w," then M accepts w.

Pick any w. D produces some classification. M does the opposite. So D's classification is wrong on (⟨M⟩, w). One wrong classification is enough — D was supposed to be correct on every input. Contradiction.

🔊 Listen
M inspects ⟨M⟩ and decides what to do Auto-plays
🔊 Listen
🔊 Listen
🔊 Listen

Sipser: Theorem 6.5 (recursion theorem corollary — ATM proof). Lecture notes: Module 3 slide 5 (T = A·B construction). Companion problems: P3 (classic ATM proof, contrast), P13 (quine, prerequisite), P14 (Rice via recursion theorem), P15 (fixed-point form).