(Solved):Prove that it is possible to write a program P which: (a) takes as input M, a Java program, (b) runs forever, and prints out strings to the console, (c) for every x, if M(x) halts, then P(M) eventu… View Answer…

 

Question

Prove that it is possible to write a program P which:

(a) takes as input M, a Java program

(b) runs forever, and prints out strings to the console

(c) for every x, if M(x) halts, then P(M) eventually prints out x

(d) for every x, if M(x) does NOT halt, then P(M) never prints out x

 

EXPERT ANSWER

  1. Starting out, Let
Scroll to top