Math 2.0

Mathematical logic and foundations Theorem

Undecidability of the halting problem

Builds on Turing machineComputable setGödel numbering

Statement

Fix a Gödel numbering e↦Mee \mapsto M_e of all Turing machines with input and output in the natural numbers. Let H={(e,x)∈ℕ2:Me halts on input x}H = \set{(e, x) \in \N^2 : M_e \text{ halts on input } x}. Then HH is not a computable set: no Turing machine halts on every input (e,x)(e, x) and outputs 11 if (e,x)∈H(e, x) \in H and 00 otherwise.

Remarks

Suppose a machine DD decides HH. Build a machine NN that, on input ee, runs DD on (e,e)(e, e), loops forever if the answer is 11, and halts if the answer is 00. Let nn be a number of NN. Then NN halts on nn if and only if (n,n)∉H(n, n) \notin H, that is, if and only if NN does not halt on nn, a contradiction.

The set HH is computably enumerable, since a universal machine halts on (e,x)(e, x) exactly when MeM_e halts on xx. So HH is an example of a computably enumerable set that is not computable. By the same argument, the diagonal set K={e:Me halts on input e}K = \set{e : M_e \text{ halts on input } e} is not computable.

Going deeper

For a student

This result goes back to Turing's paper of 1936, and it is the standard first example of an undecidable problem. Most other undecidability results are proved by reducing the halting problem to them. Examples are Rice's theorem, the undecidability of first-order validity, and the negative solution of Hilbert's tenth problem. In the arithmetical hierarchy, HH is Σ10\Sigma^0_1-complete.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Computable set concept
  2. Gödel numbering concept
  3. Turing machine concept
  4. Undecidability of the halting problem statement

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Halting_problem
About this page
TagZ7TN2B35B0
URIm2://Z7TN2B35B0
Kindstatement, theorem
WritingW0 stub
MSC03D10, 03D25
StatusThis copy of the site has no build data. Run m2 status Z7TN2B35B0.
AboutTuring machine, Computable set
UsesTuring machine, Computable set, Gödel numbering
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by