Unformatted text preview: bool main(string x) { P’(5); if ((x.length( ) % 2) = = 0) return (yes); else return(no); } bool P’(int y) { /* details hidden */ } Suppose you are given some program Q and an input y to program Q. You now want to create a program Q’ such that Q’ accepts the set of even length strings if and only if Q halts on input y. How would you create this input Q’? Could you write a program that takes any pair (Q,y) and produces Q’?...
View
Full Document
 Fall '07
 TORNG
 Halting problem, universal Turing machine, Register machine

Click to edit the document details