0

I understand what the halting problem describes, but I do not understand how the proof by contradiction associated with it proves that it is impossible to solve.

The proof by contradiction can be defined as having a function Halt() which could determine whether a program will halt. One could then call this function in a program called Program and halt if the program halts or otherwise loop forever.

Program (String x)

If Halt(x, x) then
 Loop Forever
Else Halt.

END

What I don't understand is why if Halt() returns true that it has to Loop forever. Why can't the Program return 0 or 1?

Thanks

0 Answers0