You are on page 1of 3
OTe COMP 5 - 2 (RC) 1.E. (Computer) (Semester — V) Examination, Nov/Dec. 2014 (Revised Syllabus in 2007-08) AUTOMATA LANGUAGES AND COMPUTATION Duration 3 Hours Total Marks : 100 Instructions: 1) Answer any five full questions, at least one from each Moat. 2) Make suitable assumptions wherever necessary. i MODULE-1 a) Construct a DFA to recognize the set of strings over {a, b}* that contain the ‘same number of occurrences of the substring ab as of the substring ba. ') Minimize the following DFA using table filling method. 6 M=((1,2,8,4,5,6),(a,b cha, 1(2, 4,5,6)) where § is 8={6(La)=5, (Lb) = 2, &(1,¢) (2,8) = 1.8(2.b) 8(2,¢) = 2,8(3,a) = 2,3(3.b) = 4, 8(9,0)=5.5(4.a)=9, 5f4,0)=6 Bid) =2.816.a) =3, 515.0) =6, (6.0) = 5,5(6,a) =1.8(6,) =3, 8(6,c)- 4) ©) Construct a Mealy Machine to add two binary numbers. Convertthe Mealy Machine to equivalent Moore Machine. 8 4) Prove the following languages (all with input alphabet (0, 1}) are regular or not 8 a) Non-empty strings with the last symbol equal the first symbol. 'b) Odd-length strings with the first symbol equal the middie symbol. Construct a regular expression to represent the following DFA M-=((A,B, C, D}, (0; 1), 8, A, (B, D}) where 5 fs defined as Input b) State of4 o|a]> 5 [a ¢ >lololo lo 6 ©) Construct a NFA that aocepts the language L = {a e|0.1}* ||| samultise of 2or 3}, 4 Pro. ee COMP 5-2(RC) 2 CTE TL MODULE —II 3. a) Let Y= (0,1). Consider the language NEP defined as follows NEP = (we 2*|w is not an even-length palindrome} Construct the CFG. Convart the CFG to PDA, 8 ) Prove the given language is not CFL. L= (ww wefa,b)") 4 ©) Construct NPDA for the following language over alphabet Le fwjews | wg € fab} and wy, = we"). = f2,b,¢} By 4 a) Construct Top-down PDA for given CFG G~ ({S},{a.b}, (Sa |aS |bSS | SSd| SbS},S). Show the sequence of moves forinput string : abbaaa. 8 ') Construct the grammarin GNF for the given language L= fake" |k.mn, 2k > n} 8 ©) Show that context free languages are closed under i) Union ii) Kivene closure. 4 MODULE Il MV 5. @) Given an input #8, where w isa string of a's and b's construct 2 Turing machine makes a copy of w and hats with #ww# as the output 6 ®) Explain the following i) Chureh-Turing Thesis i) Non-deterministc Turing Machine 4 ©) Discuss the pawer of Turing machine. Construct a TM to divide two positive Integers. Assume that the numbers are represented 2s a unary string of t's. 10 (ALOE A TE + COMP 5-2(RC) 6, a) Explain the Universal Turing machine. 6 b) Construct 2 TM that insert c such that the tape contents are changed from yztoyez where Yeu Aly", oe(ZU 1A), 2627, B= {ab} 8 1) Design the Turing machine forthe folowing language L=([x\gmod 2 and jx], =0 mod 2x (0, 1). 6 MODULE-IV 7. a) Construct the type 0 grammar thai generates the language L = (ww jwe {0, 1} +) ‘Show tha right most derivation for the string abab. (642) ) Explain the folowing i) Trios and Full Trios: ii) Generalized sequential machine ti AFL 6 ©) Explain the equivalence of Context Sensitive grammar and Linear Bounded ‘Automaton. 6 8. a) Construct he CSG forthe folowing language. = {ables |i> 0). Validate the given string abodd. 6 ») Explain the equivalence of Turing Machine and Type 0 grammar. 6 cc) Construct the lett linear grammar for the given regular expression (40 +(0 + 11}0"1)*. Convert left linear grammar to right linear grammar. 8

You might also like