Research Library · Idea
Halting problem
The halting problem asks whether a given program, or Turing machine, stops when run on a given input. No algorithm answers it correctly on every input. Cook's Clay Institute description defines the Halting Problem as the set of Turing machines that halt on their own description, and says that Turing used a simple diagonal argument to show that this set is not decidable, while it is computably enumerable.1 Enumerable means that an algorithm confirms every machine that halts but may run forever on one that does not, so a wait can show yes and never justifies no.
The standard argument supposes a program that always stops and reports whether program p halts on input p. A second program is built that loops forever if the report says p halts on itself and stops otherwise. Running that program on its own text makes the report wrong either way, so the first program cannot exist.
Turing's 1936 paper, received on 28 May 1936 and read on 12 November 1936, does not contain a problem under this name.2 It calls a machine circle-free if it writes infinitely many figures of the first kind and circular otherwise, and it shows in section 8 that there is no general process for determining whether a given number is the description number of a circle-free machine.2 It also shows there can be no machine that determines whether an arbitrary machine ever prints a given symbol, 0 for instance.2 Section 11 applies this to Hilbert's Entscheidungsproblem: there can be no machine that, supplied with a formula of the functional calculus, will eventually say whether it is provable.2
Alonzo Church's paper, dated April 1936, reached a parallel result for the lambda calculus. His Theorem XV says the set of well-formed formulas with a normal form is recursively enumerable, and Theorem XVIII says there is no recursive function that decides whether a formula has a normal form.3
The problem is undecidable only in general. Particular programs can be shown to halt or to loop, and halting within a stated number of steps can be decided by running the program that long.
Source · On Computable Numbers, with an Application to the Entscheidungsproblem (opens in a new tab) · Proceedings of the London Mathematical Society
References
- The P versus NP Problem (opens in a new tab) · Clay Mathematics Institute · Definition of the Halting Problem and the diagonal argument attributed to Turing. ↩
- On Computable Numbers, with an Application to the Entscheidungsproblem (opens in a new tab) · Proceedings of the London Mathematical Society (author: Alan M. Turing) · Alan M. Turing; received 28 May 1936, read 12 November 1936. Sections 8 and 11. ↩ ↩ ↩ ↩
- An Unsolvable Problem of Elementary Number Theory (opens in a new tab) · American Journal of Mathematics (author: Alonzo Church) · Alonzo Church, April 1936, vol. 58 no. 2, pp. 345-363; Theorems XV and XVIII. ↩
Research articles
- What computers cannot do, and what they cannot do quickly: computability and complexity from Turing to P versus NP · Computer science
See what connects to it on the map of ideas →

SecSIG