Search code examples
loopslogicproofturing-machineshalting-problem

Why do we need to use the negation part in Turing's Halting Proof?


For instance, let's say I have this Turing machine, H, which tells us whether or not a program and input will halt. Let's say we call H on itself. It has to give an answer, so if it prints out "does not halt" then didn't it technically halt to print that statement? Or would it just always in theory print out "does halt"? I'm having trouble wrapping my head around calling H purely upon itself, without negation, and what it would do. I get why the negation leads to a contradiction, but I am just wondering if the following scenario also leads to a contradiction.

Thank you!


Solution

  • You need to prove that H does not exist. You have shown that H applied to itself cannot print "does not halt". But, as you rightfully point out, the possibility that it prints "does halt" is not excluded. There's no apparent contradiction in this. So this application of H to itself is not sufficient to prove that H does not exist, we need to use other techniques. It is incorrect to say that this scenario does not lead to contradiction. It probably will if you explore it further. It just doesn't do so immediately.