CS103
HO#44
Slides--The Halting Problem
5/13/11
1
reduces to
solves
EQ
DFA
E
DFA
Symmetric
Difference
A, B
A
B
T: E
DFA
Accept
Reject
We have solved EQ
DFA
by using the solution to E
DFA
, i.e.,
we have
REDUCED
EQ
DFA
to E
DFA
.
F: EQ
DFA
Theorem 4.11:
A
TM
= {
M, w
| M is a Turing machine and M accepts w }
is undecidable.
First note that we can build a
recognizer
for A
TM
:
U = "On input
M, w
, where M is a Turing machine and w is a string:
1.
Simulate M on w.
2. If M ever enters an accept state, ACCEPT;
if M ever enters a reject state, REJECT."
Theorem 4.11:
A
TM
= {
M, w
| M is a Turing machine and M accepts w }
is undecidable.
First note that we can build a
recognizer
for A
TM
:
U = "On input
M, w
, where M is a Turing machine and w is a string:
1.
Simulate M on w.
2. If M ever enters an accept state, ACCEPT;
if M ever enters a reject state, REJECT."
Why is U not a
decider
for A
TM
?
U will loop on
M, w
if M loops on w.
If U could determine that M was
not halting, it could reject, and we would have a decider for A
TM
.
Thus building a decider for A
TM
is one form of the
Halting Problem
.
Theorem 4.11:
A
TM
= {
M, w
| M is a Turing machine and M accepts w }
is undecidable.
Suppose H is a
decider for A
TM
.
Decider
for A
TM
M
w
M accepts w
M rejects
or loops on w
Accept
Reject
H
Theorem 4.11:
A
TM
= {
M, w
| M is a Turing machine and M accepts w }
is undecidable.
Suppose H is a
decider for A
TM
.
Build the machine D.
H
M
M
M accepts
M
M rejects
or loops on
M
D
M
Accept
Reject
Decider
for A
TM
Theorem 4.11:
A
TM
= {
M, w
| M is a Turing machine and M accepts w }
is undecidable.
Suppose H is a
decider for A
TM
.
Build the machine D.
Run D on its own description.
H
D
D
D accepts
D
D
Accept
Reject
If D accepts
D
, it rejects it, and if D rejects
D
, it accepts it.
Thus D and H cannot exist, and since D could easily be built
from H, we conclude that
A
TM
is undecidable
.
D rejects
or loops on
D
Decider
for A
TM
D