80 likes | 463 Views
The difference -- between Recognizable and decidable. If L is decidable, then L is recognized by a TM M that halts on all inputs. Note that, L might be recognized by other TM M’ that does not always halt.
E N D
The difference -- between Recognizable and decidable • If L is decidable, then L is recognized by a TM M that halts on all inputs. Note that, L might be recognized by other TM M’ that does not always halt. • If L is recognizable, then there might be such TM M that recognizes L but run forever, rather than rejecting, some inputs not in L. • Simply, Decidable ---- always halt Recognizable ---- halt or loop
Let INFINITEDFA={<A> A is a DFA and L(A) is an infinite language} . • Show that INFINITEDFA is decidable.
I=On input <A> where A is a DFA • 1.Let k be the number of states of A • 2.Construct a DFA D that accepts all strings of length k or more • 3Construct a DFA M such that L(M)=L(A) intersect L(D) • 4Test L(M)=null,using the EDFA decider T from Theorem 4.4 • 5 If T accepts,reject;if Trejects,accept
The DFA accepts some string of length k or more,where k is the number of states of the DFA,This string may be pumped in the pumping lemma for regular language to obtain infinitely many accepted string,
Let A={<M>| M is a DFA which doesn’t accept any string containing an odd numbers of 1s} . • Show that A is decidable.
I=On input <M> where M is a DFA • 2.Construct a DFA O that accepts every string containing an odd numbers of 1s • 3Construct a DFA B such that L(B)=L(M) intersect L(O) • 4Test L(B)=null, using the EDFA decider T from Theorem 4.4 • 5 If T accepts,accept;if T rejects,reject
EDFA= {<A>|A is a DFA and L(A)=null} • EDFA is a decidable language • A={<M,w>|M is a TM and M accepts w} • A is undecidable • The halting problem