Download presentation
Presentation is loading. Please wait.
Published byDeirdre Cooper Modified over 8 years ago
1
THE HALTING PROBLEM - PROOF
2
Review What makes a problem decidable? 3 properties of an efficient algorithm? What is the meaning of “complete”, “mechanistic”, and “deterministic”? Is the Halting Problem decidable/undecidable? How would you define the Universal Turing Machine?
3
Halting problem is undecidable Proof Proof by contradiction Assume that there is a TM H that solves the halting problem The computation of H can be depicted as follows: H R(M)w Accept Reject M halts with input w M does not halt with input w
4
Halting problem is undecidable Proof We modify H to construct a new TM H’, which behaves very much as H: The computations of H’ are the same as H, except that H’ loops indefinitely whenever H terminates in an accepting state, i.e., whenever H halts on input w, and halts otherwise H’ R(M)w Loop Halt M halts with input w M does not halt with input w
5
Halting problem is undecidable Proof H’ is combined with a copy machine to construct a new TM D: The input to D is a TM representation R(M) A computation of D begins with copying the string R(M) to yield R(M)R(M) The computation continues by running H’ on R(M)R(M) H’ R(M) Loop Halt R(M) Copy M halts with input R(M) M does not halt with input R(M) D
6
Halting problem is undecidable Proof Consider a computation of D with input R(D): The input to D is the representation to any arbitrary TM H’ R(D) Loop Halt R(D) Copy D halts with input R(D) D does not halt with input R(D) D Examining the preceding computation, we see that: D halt on input R(D) iff D does not halt on input R(D), which is a contradiction Therefore, the original assumption is wrong and the halting problem is undecidable
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.