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
- Rational number, Irrational number, Countable set