Essential cookies keep your basket and sign-in working. Optional cookies help us understand visits and measure ads. Privacy details.
The undecidable problem of determining whether a program will finish or run forever.
AI-assisted explanation. It may contain errors; use a textbook or original source to check important details.
The Halting Problem is the fundamental question: “Given any program and its input, can we build a perfect checker that always tells us whether that program will eventually finish (halt) or run forever?” Intuitively, you’d love to have a magical “termination tester” that you could feed a piece of code into—like showing a recipe to a master chef—and it would instantly say “this recipe ends” or “this recipe loops forever.” Alan Turing proved something shocking and beautiful: no such universal tester can exist. More precisely: there is no single algorithm that, for every possible program P and input x, always returns the correct yes/no answer to “Does P halt on x?” The reason is self-reference: if you assume a perfect halting-checker exists, you can construct a new program that uses the checker’s prediction to deliberately contradict it (a logical booby trap). That contradiction means the perfect checker cannot exist. So the Halting Problem doesn’t give you a formula to compute; it gives you a boundary of what computation itself can guarantee. It’s like discovering a coastline in the land of logic: beyond it, certain kinds of certainty are impossible.
The Halting Problem emerged in the 1930s from a major intellectual quest: to mechanize mathematics. David Hilbert had posed the Entscheidungsproblem (“decision problem”): is there a mechanical procedure that can determine whether any mathematical statement (in a formal system) is provable? To even ask that question precisely, researchers needed a rigorous definition of “mechanical procedure” or “algorithm.” In 1936, Alan Turing introduced an idealized model of computation—the Turing machine—to capture what it means for a process to be computable. While analyzing the limits of this model, he proved that there cannot be a general algorithm that decides halting for all programs/inputs. This result simultaneously answered Hilbert’s Entscheidungsproblem in the negative (in combination with related work by Alonzo Church) and revealed a deep limit on prediction in computation. The halting result was not a technical footnote; it was a philosophical turning point: computation has inherent horizons, not just practical ones.
Pioneered by: Alan Turing (1936). Closely related independent work by Alonzo Church (1936) established undecidability via the lambda calculus.