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: 3) In the number of languages proof from module 5, we used diagonalization to produce a language that was not on the list. In the halting problem proof of module 7, we used diagonalization to produce ??? 4) Is it true that we are trying to make program D behave differently on input y than program P H behaves on input y? Explain. 5) bool main(unsigned y) { program P = generate(y); if (P H (P,y)) while (1>0); else return(yes); } program generate(unsigned y) /* generates yth program in P * */ bool P H (program P, unsigned y) /* solves Halting problem */ Describe in words what this program D does on input 5. 6) Suppose we try to prove that the Rejecting problem, defined below, is unsolvable. Will the given program D from problem 5 (replacing P H with P R ) still be guaranteed to be different than any program P? Explain why or why not. Input: program P, unsigned y Y/N question: Does P reject input y?...
View
Full
Document
This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.
 Fall '07
 TORNG

Click to edit the document details