Formal Languages and Automata Theory (06CS56)

You might also like

Download as pdf
Download as pdf
You are on page 1of 2
USN | held 06CS56 Fifth Semester B.E. Degree Examination, June/July 2015 Formal Languages and Automata Theory Time: 3 hrs. Max. Marks:100 Note: Answer FIVE full questions, selecting at least TWO questions from each part. PART—A 1 a. Define and explain the following: 8 (Alphabet ii) Strings. (iii) Powers of an alphabet (06 Marks) q b. Obtain DFA to accept string of 0’s and I’s for the following ) 4 (j) Strings that do not end with O11 z i) Strings that contain odd no, of 0’s and odd no. of 1I’s. (06 Marks) 2 c. Convert the following NFA to DFA using subset construction method; 3 5| 0 1 a — |p| (p,q) | (p) qg|_ | tr} * Llp.) | {a} (08 Marks) 2 a. Consider the following ¢ - NFA {py | fq} | tr} | 6 fg} | ir} |} | tp) 3 > plo ‘pit taht (rp q f (i) Compute € -closure of each (ii) Convert the automata to DFA (08 Marks) b. Define Regular expression, Obtain R.E for the following evaluator and for equa () L={ar™ : 124 0m<3} (ii) L= {ww € {a,b} | w| mod3 =o} (06 Marks) ©. Convert the follwing automata to R.E, using state elimination technique, (06 Marks) Fig. Q2(c) 2 3, ‘a State and prove pumping lemma for Regular languages. (07 Marks) 3 b. Prove that regular languages are closed under union, concatenation and closure operations. Be (06 Marks) 3e © When two status are equivalent or distinguishable? Obtain minimum state equivalent DFA x for the following, (07 Marks) Zz a alb z = “ApBIC 5 BIC|E i “ciple. DIC|E * EEE 2 2 06CS56 Obtain CFG for the following : (06 Marks) Show that the following grammar is ambiguous E> E+E|E*E| E/E|E-E|()[a |b Obtain unambiguous grammar for the about grammar by assuming normal precedence and associatively. (08 Marks) Consider the grammar. E > AbB AsaAle B ~aB|bB|¢ Obtain LMD, RMD and Parsetree for the string aaabab, (06 Marks) PART-B Define PDA Obtain PDA to accept the following language, L=fww"|we(a,b)"} Draw the transition diagram for PDA. Also show the valid moves made by PDA for the string abbbba. (12 Marks) For the following grammar, obtain an equiyalént PDA S$ > aABC ¢ A >aBla B > bAlb Coa (04 Marks) Write a note on deterministie, PDA (04 Marks) Define the following :. (i) Generating symbol (ii) Reachable symbol ii) Unit produetion (iv) Nullable production (04 Marks) Convert the following grammar to CNF S > ASBIe A > aASia B. SSds|al bb (10 Marks) Prove that if L is a CFL R is a regular language then LR is a CFL (06 Marks) Define Turing machine. Explain the working of Turing machine. (06 Marks) Design a turing machine to accept the language L={0"I"|n>1}. Write its transition diagram. Give the sequence of moves made for the string 0011 (40 Marks) Explain multi-tape turing machine and Non- Nondeterministic turing machine, (04 Marks) What is Post’s correspondence problem? explain. (07 Marks) Define recursive languages. Explain its relationship with RE and non RE languages. (08 Marks) Write a note on undecidability of ambiguity for CFG's. (05 Marks) 20f2

You might also like