Lecture 4 - Undecidability
Still in preparation. Please check the references at the end of the document.
In the previous lecture, we have learned about and proved the Recursion Theorem, which in essence states that any computable function can be computed by a Turing machine which can obtain its own description and then compute with it. Today, we will use the Recursion Theorem to prove that certain problems are undecidable, meaning that there is no algorithm that can solve them.
Undecidability
As we have seen in lecture 2, a language
A language
Let us now state our first undecidability result.
Theorem 1: The language
Proof: Suppose, for the sake of contradiction, that
On input
:
Obtain its own description
using the recursion theorem. Run
on input . If
accepts, then reject. If rejects, then accept.
By construction,
Therefore,
The above theorem can also be proved using a diagonalization argument, which we now show.
Alternative Proof of Theorem 1: Suppose, for the sake of contradiction, that
On input
:
Run
on input . If
accepts, then reject. If rejects, then accept. On all other inputs (i.e. which are not encodings of any Turing machine), reject.
Since
The two proofs are quite similar in spirit, but the first one is quite shorter.
Also, one of the reasons which makes the language
Turing machines cannot predict what other Turing machines will do without simulating them.
Let us now see this principle at work in other undecidability results.
Theorem 2: The language
Proof: Suppose, for the sake of contradiction, that
Now, consider the following Turing machine
On input
:
Obtain its own description
using the recursion theorem. Run
on input . If
accepts, then accept. If rejects, then go on an infinite loop.
By construction,
Another undecidability result is the following:
Theorem 3: The language
Proof: Suppose, for the sake of contradiction, that
Now, consider the following Turing machine
On input
:
Obtain its own description
using the recursion theorem. Run
on input . If
accepts, then accept. If rejects, then reject.
By construction,
After seeing such results, one may wonder if we can prove a more general result along the lines of the principle we stated earlier. The answer is yes, and given by Rice’s Theorem.
Theorem 4 (Rice’s Theorem): Let
- There is a Turing machine
such that . - There is a Turing machine
such that .
Then the language
Proof: Suppose, for the sake of contradiction, that
Now, consider the following Turing machine
On input
:
- Obtain its own description
using the recursion theorem. - Run
on input . - If
accepts, then simulate on . If rejects, then simulate on .
By the above construction,
Acknowledgements & References
This lecture was based on these resources:
- [S13, Chapters 4 & 5]
- Lecture notes by Prof. Eric Blais.