Undecidability of the Halting Problem
The undecidability of the halting problem, proved by Turing in 1936, is one of the most fundamental results in mathematical logic and computer science. It establishes absolute limits on what can be computed.
Statement
There is no Turing machine that, given an encoding of a Turing machine and input , correctly decides whether halts on input . In other words, the set is not decidable.
Suppose for contradiction that is a total Turing machine deciding HALT. Construct a new machine : on input , runs ; if accepts (meaning halts on ), then loops forever; if rejects, then halts.
Now consider running on its own description :
- If halts on , then accepts, so loops. Contradiction.
- If does not halt on , then rejects, so halts. Contradiction.
In either case we reach a contradiction, so cannot exist.
Consequences
The halting problem's undecidability immediately implies that many other questions about Turing machines are undecidable: "Does accept any input?", "Is the language of finite?", "Do and compute the same function?" All reduce from the halting problem.
The proof exploits the ability of Turing machines to simulate other Turing machines (universality). This same self-referential structure appears in Gödel's incompleteness theorems. The connection is deep: undecidable problems correspond to independent statements in formal systems.