Theorem: There is some language that is undecidable
Theorem: there is some language that is undecidable Proof:
- Note that we can enumerate all words over the chosen alphabet which can be denoted as
- We can also enumerate every possible Turing Machine. We can now construct an infinite table with each Turing Machine for each row, and each word for each column. We inspect the diagonal entries in this table which gives us a new infinite sequence.
- Let be the set of words which are not accepted by the corresponding machine .
- If were decidable then it would be the language of some terminating machine from our list. But we know that: Hence, it must be that is undecidable as required.
The Halting Problem
The Halting Problem
We define formally the Halting Problem, , with:
Link to original
- An input of an encoding of a Machine and an input word .
- An output of true iff terminates on input .
Theorem: Halting Problem is undecidable
We can prove that the Halting Problem is undecidable by contradiction:
- Suppose that (to the contrary) there is some sound, complete and terminating algorithm such that:
- Start by constructing a computable function that takes a single input and outputs the encoding of the pair containing two copies of the input word.
- We construct a new machine which:
- Takes some input
- Uses the function on the input to produce
- Uses the function on the pair we just created
- If accepts, then we go into a purpose-built loop
- If rejects, we accept
- We look at the case where we use as the input string in place of .
- Which is a contradiction, hence our assumption that exists must be wrong.
Other Undecidable Problems
Other problems include:
- The Accepting Problem: true if and only if a given machine accepts.
- The Rejecting Problem: true if and only if a given machine rejects.
- The Emptiness Problem: true if and only if the language of a given machine is .
- The Equivalence Problem: true if and only if two given machines accept the same lang.
- The Regular Language Problem: true if and only if a given language is regular.