c318f00t3

c318f00t3 - CSc 318 Test 3 Wednesday 29 November 2000...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSc 318 Test 3 Wednesday 29 November 2000 >>>>>>>>>>>>>SUGGESTED ANSWERS<<<<<<<<<<<<<<<<<<< 1. (15 pts) Let L be the language of the DFA M=(Q, Σ , s, F, δ ). Find an ε -NFA for the language LL. Assume Q={q 1, q 2 , …, q n }, s= q 1 . Let Q’={q’ 1, q’ 2 , …, q’ n }, s’=q’ 1, such that Q Q’= . M’=(Q Q’, Σ , s, { q’ i : q i F}, δ∪ {(q, ε ,s’): q F} {( q’ i, a, q’ j ) : ( q i, a, q j ) ∈δ }) 2. (20 pts) Find a regular expression for the language of the NFA M=(Q, Σ , s, F, δ ), where Q={1, 2, 3}, Σ ={a, b, c}, s=1, F={3}, and δ ={ (1,a,2), (1,a,3), (2,c,2), (2,a,3), (3,b,3), (3,c,1)}. A 3 = ε bA 3 cA 1 ==> A 3 = b*( ε cA 1 ). A 2 =c A 2 a A 3 ==> A 2 = c* a A 3 = c*ab*( ε cA 1 ). A 1 = aA 2 aA 3 = a c*ab*( ε cA 1 ) a b*( ε cA 1 ) = (ac*ab*c ab*c)A 1 ac*ab* ab* ==> A 1 = (ac*ab*c ab*c)*( ac*ab* ab*) 3. (20 pts) Prove that L={a 2i b 3i : i 0}is not regular. BWOC assume L is regular. Let k be such that
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online