The Halting Problem
There are objects / entities which one can describe but which cannot exist.
1. The Halting Problem
A register machine
decides the Halting Problem if for all , starting with and all other registers zeroed, the computation of always halts with containing , or ; moreover when the computation halts, iff the register machine program with index eventually halts when started with and all other registers zeroed.
Theorem: No such register machine
1.1 Proof
Assume that we have an RM program
- Let
be obtained by replacing by where is a register not mentioned in s program. - Let
be obtained from by replacing each by . - Let
be the index of 's program. - Now,
started with eventually halts iff: started with halts with iff: started with halts with iff: started with does not halt iff: started with does not halt. This is a contradiction.
2. Enumerating Computable Functions
For each
Thus,
2.1 An Uncomputable Function
Let
Recall,
means terminating, means never terminating.
If
- If
, then , so , and . - If
, then , and .
This is a contradiction, so
3. Undecidable Sets
Given a subset
So
is decidable iff there is a register machine with the property: , started with and all other registers zeroed halts with iff .
To prove
3.1 An Undecidable Set
Proof that
- Suppose
is a register machine that computes . - From
, we can construct a register machine :
- By assumption on
, decides the Halting Problem. - This is a contradiction, as the Halting Problem is undecidable.
- Therefore,
does not exist, ( is uncomputable), and is undecidable.
3.2 Another Undecidable Set
Proof that
- Suppose
is a register machine that computes . - From
, we can construct a register machine :
- By assumption on
, decides . - This is a contradiction, as
is undecidable. - Therefore,
does not exist, ( is uncomputable), and is undecidable.