Uncomputability
Example 1: Deciding self-rejecting TMs
A TM
Proof
- Suppose
exists. So is a TM that accepts a TM if it's self-rejecting. - Give
as input to itself. What happens? - If
rejects itself: Then is not self-rejecting (but it did?!) - if
accepts itself: then is self-rejecting (but it already accepted itself!!!)
- If
- Contradiction. So
cannot exist
Example 2: Halting problem
A TM
Proof
- Suppose
exists. So is a TM that accepts a (TM, ) pair if the TM halts on input . - Build a TM
that: - takes as input another TM called
- Passes Y and code of Y to
- If Y halts on it's own code, go into an infinite loop
- If Y does not halt on it's own code, return
- takes as input another TM called
- Give m as input to itself
- m passes m and code of m to halt
- if m halts on it's own code, m loops (?!)
- if m does not halt on its own code, m returns (?!)
- m passes m and code of m to halt
- Contradiction. so
cannot exist.
Example 3: Diophantine equation
- Proof is out of scope