Ch4 AdditionalProofHaltingProblem
Ch4 AdditionalProofHaltingProblem
unsolvable (http://faculty.juniata.edu/rhodes/intro/theory2.htm)
This proof was devised by Alan Turing, 1936
1. a program P and
2. an input I for the program P.
For example, compilers take programs as input and generate machine code as output.
Netscape takes a Javascript program and generates output.
So now H can be revised to take P as both inputs (the program and its input) and H
should be able to determine if P will halt on P as its input.
Let us construct a new, simple algorithm K that takes H's output as its input and does
the following
If H says that K halts then K itself would loop (that's how we constructed it).
If H says that K loops then K will halt.
In either case H gives the wrong answer for K. Thus H cannot work in all cases.
We've shown that it is possible to construct an input that causes any solution H to fail.