The halting problem asks, given the encoding of a Turing machine and an input string, whether that machine eventually halts on that input. Its formal language is
Suppose a Turing machine decided this formal language. Construct another Turing machine that, on an input encoding , runs on . If answers that halts on its own encoding, enters an infinite loop. If answers that does not halt, halts. Handling malformed encodings by immediate rejection makes well-defined on arbitrary strings.
Now run on its own encoding. If says that halts, the construction makes loop; if says that does not halt, the construction makes halt. Either answer contradicts the assumed correctness of . Therefore
The contradiction concerns a decider that must give a correct terminating answer for every encoded machine and input. Simulating does detect a halt when one occurs, but cannot in general certify that a running computation will continue forever.

Articles by others on the same topic (0)

There are currently no matching articles.