This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: X then while 9 < 10 do End (loops) Build one more program, S: o S reads a program P and duplicates P o Then, S calls Q' with (P, P) as input o P cannot accept itself as input if and only if S halts o That is, P accepts itself as input if and only if S loops forever S: Q': Lemma 2 : If Q' exists, then S exists Theorem 3 : If Q exists, then S halts on input P o iff Q' halts on (P,P) o iff Q' writes out "P does not halt on P" o iff P does not halt on P Since S is a syntactically correct program, we can replace P with S in Theorem 3. Theorem 3' : If Q exists, then S halts on input S o iff Q' halts on (S, S) o iff Q' writes out "S does not halt on S" o iff S does not halt on S A contradiction: Thus, Q can not exist. 2 P P HAL if P doesnt halt on P then (no op) If P halts on P then while 9 < 10 do End (loops) P...
View
Full
Document
 Fall '10
 Dutton

Click to edit the document details