Professional Documents
Culture Documents
(unsolvable problems)
Corresponding Language: X
(Decidable)
EMPTYDFA
{ M : M is a DFA that accepts empty language }
On input M :
Determine whether there is a path from
the initial state to any accepting state
DFA M DFA M
L (M ) L (M )
DFA M DFA M
infinite finite
Decision: Reject M Accept M
(NO) (YES)
Fall 2006 Costas Busch - RPI 7
Problem: Does DFA M accept string w ?
On input string M ,w :
If M accepts w
Then accept M ,w (and halt)
Else reject M ,w (and halt)
On input M1 , M2 :
Let L1 be the language of DFA M1
Let L2 be the language of DFA M2
(combination of DFAs)
Fall 2006 Costas Busch - RPI 11
( L1 L2 ) ( L1 L2 )
L1 L2 and L1 L2
L1 L2 L L2 L1 L1
2
L1 L2 L2 L1
L1 L2
Fall 2006 Costas Busch - RPI 12
( L1 L2 ) ( L1 L2 )
L1 L2 or L1 L2
L1 L2 L2 L1
L1 L2 L2 L1
L1 L2
Fall 2006 Costas Busch - RPI 13
Therefore, we only need
to determine whether
There is no decider:
there is no Turing Machine
which accepts the language
and makes a decision (halts)
for every input string
L
Turing-Acceptable L
Decidable
Membership problem
Halting problem
Corresponding language:
ATM { M ,w : M is a Turing machine that
accepts string w }
Fall 2006 Costas Busch - RPI 19
Theorem: ATM is undecidable
(The membership problem is unsolvable)
Proof:
Basic idea:
We will assume that ATM is decidable;
We will then prove that
every decidable language
is Turing-Acceptable
A contradiction!
Fall 2006 Costas Busch - RPI 20
Suppose that ATM is decidable
Input
string Decider
M ,w for ATM
M YES M accepts w
H
w NO M rejects w
Decider for L
s NO reject s
Input (and halt)
string
Contradiction!!!!
END OF PROOF
Fall 2006 Costas Busch - RPI 24
We have shown:
Undecidable ATM
Decidable
Turing-Acceptable ATM
Decidable
Corresponding language:
Proof:
Basic idea:
Suppose that HALTTM is decidable;
we will prove that
every decidable language
is also Turing-Acceptable
A contradiction!
Fall 2006 Costas Busch - RPI 29
Suppose that HALTTM is decidable
Input
string
M ,w
halts on
M YES M w
Decider for input
w HALTTM
NO doesn’t halt
M on input w
Input
accept s
ML halts
string and accepts
Run ML and halt
with input s
reject s
ML halts
and rejects
and halt
Contradiction!!!!
END OF PROOF
Fall 2006 Costas Busch - RPI 33
An alternative proof
Proof:
Basic idea:
Assume for contradiction that
the halting problem is decidable;
Input
string Decider
M ,w for HALTTM
M YES M halts on w
H
w NO doesn’t
M w
halt on
Fall 2006 Costas Busch - RPI 35
Looking inside H
Decider for HALTTM
H qaccept YES
Input string:
M ,w q0 M halts on w?
qreject NO
F
Copy M M, M
M
on tape
H
If M halts on input M
Then loop forever
Else halt
Fall 2006 Costas Busch - RPI 38
Run F with input itself
F
Copy F F ,F
F
on tape
H
If F halts on input F
Then F loops forever on input F
Else F halts on input F
CONTRADICTION!!!
END OF PROOF
Fall 2006 Costas Busch - RPI 39
We have shown:
Undecidable HALTTM
Decidable
Turing-Acceptable HALTTM
Decidable
1. Run M on input w
M ,w
2. If M halts on w
then accept M ,w