You are on page 1of 2
sew [| L PES University, BENGALURU ® PES UNivERsITY, BENGALURU PES (estaevem uoen KowTaeaACTNO oF 2013) ae May 2017: END SEMESTER ASSESSMENT (ESA) B.TECH. IV SEMESTER UE15CS254-THEORY OF COMPUTATION Time: 3 HRs. ANSWER ALL QUESTIONS Max MARKS:100 2) Define the following terms: 04 5. Regular language ji. Extended transition function for a non-deterministic finite automaton ) Construct a deterministic finite automaton that accepts the following language over the alphabet {a, b} 04 where L = {batwab? w ¢ (a, b)*) ©). Convert the following non-deterministic finite automaton to its equivalent deterministic finite aulomaton 06 by clearly showing the subset construction method. State Input = 0 Input=2 x] [34 o fe) {au a) pa ‘ad {Go} 0 “e 0 o 0 4) Using table iting algorithm, minimize the following deterministic fine automaton: 06 A . " @) Construct regular expressions forthe folowing languages: 08 i. Even binary numbers without leading zeros ii L= 0": (n+ m)is odd) ii, L= {a0 n23, mis odd} ive L= {wv v, wea, by. [v= 2) b) Find a regular expression for the language L = {we (a, b)*: n(w) is even & ng(w) Is odd). 08 ) Show that the language of binary strings of even length having the same number of Os in its two halves 04 Is not regular. 1a) Show that the following language is ambiguous. o2 SaaS | aaa | A b) Apply CYK algorithm to verify whether the string aaaabbb can be derived by the following grammar. 08 S>AB A>BBla BS ABI ° ad 2) » °) 2) ») ° SRN Convert the following grammar into CNF: S>Aa/BiCa B>aBlb >Dd/D D>EId E>ab 06 State the dliference between GNF and S-grammar. Give an example where the grammaris in GNF but 04 Is not S-gremmar. Construct a PDA to accept the language a"b, where m= n mod 3, n= 0. How much stack memory is 06, required to handle this language? Discuss the steps involved in converting CFG to PDA & convert the following CFG to PDA. S> aA] bB|cC, A> S2,B->Sb,C>4 \Whatis the language accepted by the following PDA? Bla, b. Z) = (qo, AZ) (Go, b, A) = (do, AA) (ao, 0, Z) = (G4, AZ) qo, n, A) = (Go, AA) ldo, a, A) = (ao, A) (de, A, Z) = (as, Z) where qos the intial state & q, isthe final state. ‘Verity whether the string “banana” is accepted by the automaton or not. 10 04 Develop a Turing machine which finds the remainder of division of a given binary number by 2. De net 98 ‘overnite the given number. Put a separator between the given number and the remainder. ‘The following transitions define a Turing machine. oe B{do. 0) = (do, 0, R) (a, R) fae, Blank (ar Blan (an, Blank (a, Blank) = (gu 1. R) where qos the intial sate & ay i the final state What happens if the tape contains: i) 10010, i o101t What does the Turing machine do? Define pest correspondence problem (PCP) & solve PCP forthe below given lists o4 ListA List ListA Listes Lu X x) it % Yi 7 a4 m_| a ‘10 | toro 700 oot 2 oot 00 [mara m1 3 o110 cea sean Pave Boke 2”

You might also like