8 Partc Decide
8 Partc Decide
Decidability
Motivation
Turing machines:
a general purpose computer;
Formalizes the notion of an algorithm (Church-Turing
thesis)
We now turn our attention into the power of
algorithms (i.e. Turing machines) to solve
problems
Try to understand the limitation of computers
Is studying decidability useful?
σ1 σ2
σ2
q1 q2
σ1
Ecoding DFA example: L = {all strings starts with 1}.
00 = separator
Simulating a DFA
EQDFA is decidable
To test if two DFAs decide the same language we will
rely on several facts
DFA’s are closed under intersection, union, and complement
EDFA is decidable (TM T from previous section EDFA)
If A and B are equal, then the symmetric difference is empty
L( C ) = ( L(A) ∩ L’(B) ) U ( L’(A) ∩ L(B) ) = empty
F = a TM with input <A,B> where A and B are DFAs
Construct DFA C, the symmetric difference of A and B
Run TM T (the one that decides EDFA) on <C>
If T accepts, then F accepts, if T rejects, then F rejects
Examples of Decidable Languages
Enumerable
Context-free
Or
Turing
regular Recognizable
decidable
How to simulate any machine, say a TM
. . . . . . . . .
. . . . . . . . .
Rational Numbers
Proof by contradiction
Assume that ATM is decidable. By a TM called H
H(<M,w>) = accept if M accepts w, and reject if M does not
accept w (i.e. M either rejects or loops)
Then if H decides, we can make another machine
D:
D(<M>) = accept if H(<M>,<M>) rejects, and
rejects if H(<M>,<M>) accepts
Conclusion: ATM is undecidable
enumerable
Co-enumerable
decidable
Conclusions
Decidable languages
Halting problem
diagonalization method
undecidable example