This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 4 Halting Problem Suppose you are given a program P that can be given input I . In some cases computing P on I may run forever (not halt). This can happen if P contains an inﬁnite loop. It would be nice to detect when this will happen for any given input I . Suppose you could write a computer program D does exactly that: D takes P and I as input and returns whether or not P will halt given I . Is this possible? If not why not? What contradiction would this lead to? Hint: Could you compute something that is not computable? 5 Diagonalization Is the class of subsets of integers countably inﬁnite? 1...
View Full Document
This note was uploaded on 11/11/2011 for the course CS 2800 at Cornell University (Engineering School).