CSCI 2670 Introduction to Theory of Computing October 12, 2005
2 Agenda Yesterday –Enumerators Equivalence of enumerators and TM’s –Definition of algorithm Church-Turing thesis –Decidable languages Today –More on DFA’s and decidability Tomorrow –CFG’s and decidability
October 12, Decidable languages A language is decidable if some Turing machine decides it –Every string in * is either accepted or rejected Not all languages can be decided by a Turing machine
October 12, Some decidable languages A DFA = { | B is a DFA that accepts input string w} A NFA = { | B is an NFA that accepts input string w} A REX = { | R is a regular expression that generates string w}
October 12, Emptiness testing problem Consider the language E DFA = { | A is a DFA and L(A) = } Theorem: E DFA is a decidable language Proof: Consider the following TM, T T = “On input string, where A is a DFA 1.Mark the start state 2.Repeat until no new states get marked Mark any state that has a transition coming into it from any state already marked 3.If no accept states are marked, accept. Otherwise, reject.”
October 12, DFA equivalence problem EQ DFA = { | A and B are DFA’s and L(A) = L(B)} Theorem: EQ DFA is a decidable language Proof: Consider the following language (L(A) L(B)) (L(A) L(B))
October 12, DFA equivalence problem (L(A) L(B)) (L(A) L(B)) L(A)L(B)
October 12, DFA equivalence problem EQ DFA = { | A and B are DFA’s and L(A) = L(B)} Theorem: EQ DFA is a decidable language Proof: Consider DFA C that accepts L(C) = (L(A) L(B)) (L(A) L(B)) How do we know such a DFA exists? If L(C) = , then L(A) = L(B)
October 12, TM that decides EQ DFA Q = “On input string, where A and B are DFAs 1.Create DFA C such that L(C) = (L(A) L(B)) (L(A) L(B)) 2.Submit C to Turing machine T that decides E DFA 3.If T accepts C, accept. Otherwise, reject.”