task | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
Value | 1 | 5 | 8 | 3/7 | 5/9 | Prev | 0 | 0 | 0 | 1/2 | 1/2 |
Assume that there is a function H(P,d) which takes a Program P and an input data set d. If P halts when give d as input, H returns true, otherwise it returns false. Consider the following program:G(G,d)
If H predicts G will halt, in line 1, it will loop forever in line 2 otherwise it will exit in line 4. Therefore H does not properly predict G's exit status. Thus the assumption that H exists is false.- if (H(G,d)) then
- loop forever
- else
- exit