The consequences of a solution to the halting problem are far-reaching. Consider some predicate regarding natural numbers; suppose we conjecture that holds for all . (Goldbach’s conjecture, for example, takes this form.) We can write a program that will count up through the natural numbers and terminate upon finding some such that is false; if the conjecture holds in general, then our program will never terminate. Then, without running the program, we could pass it along to a halting program to prove or disprove the conjecture.
In 1936, Alan Turing proved that the halting problem is undecideable; the argument is presented here informally. Consider a hypothetical program that decides the halting the problem:
Algorithm Halt(P, I)
Input: A computer program and some input for
Output: True if halts on and false otherwise
The implementation of the algorithm, as it turns out, is irrelevant. Now consider another program:
if IsValidCode(x) and Halt(x,x) then
while true do
If our halting solution determines that Break(Break) halts, then it will immediately enter an infinite loop; otherwise, Break will return immediately. We must conclude that the Halt program does not decide the halting problem. So for any attempted solution to the halting problem, we can find some input which breaks that solution.
|Date of creation||2013-03-22 12:14:28|
|Last modified on||2013-03-22 12:14:28|
|Last modified by||rspuzio (6075)|