April / May 2011
Formal Languages and Automata
Anna University
1 question papers available. Select an examination session to view its question paper.
Formal Languages and Automata
Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.
Define LR (0) and LR (9) grammar. State their applications.
0 eligible source papers0 For any ositive integers 1, j and n, if i *j =n, then prove that either i < ஸ் or இட (6) (14) Let L be a set accepted by a nondeterministic finite automation. Then prove that there exists a deterministic finite automation that accepts L. (6) (iii)
0 eligible source papers(a) (i) (i (iii) (b) () (ii) Definite NFA with €-transition. Convert the following NFA into DFA. ot (4) State and prove the pumping femma for regular’sets. Write the applications of pumping lemma. (8) Using Pumping Jemma, prove that the danguage {a" b" | ௩2 O}is not regular 4) Write the closure properties of regular languages. (4) [OR] Let r be a regular expression describing the language L. Then prove that there exists an NFA with-€ — transition that accepts L. (8) Find the minimum-state finite automation equivalent to the transition (6 ) diagram given below:
0 eligible source papers(a) (i) (ii) (iii) Define context free grammar, parse tree, left most derivation and right most derivation. . . (4) You are given the following unambiguous grammar for expressions. (4) <assign>—___» <id> : = <expr> <id> ——*> AjBIC <expr> ———» <expr> + <term> கோடு | <term> ——» <term> ர் <factor> | <factor> <factor> ———» (<expr>) \<id> Using this: grammar, illustrate the left most and right most derivation for the expression A:=B + C *A. What is left recursion? How will you eliminate 16ம் recursion? Eliminate the left recursion from the following grammar: _ . (6) S —— Aalb A ——> Ac{Sdie
0 eligible source papers(b) (i) (ii) (ii)
0 eligible source papers(a) (i) (ii). (iii) (b) ட (il) (iii) [OR] Let G be a context free grammar having the productions 5-2 aSalbSbjc. If G generates the language | L = { xex" dx {a,b} } which consists of strings of palindromes, Design a Push Down Automation for L. Check whether “abcba” 15 a palindrome using this PDA moves. (6) _ Design a deterministic PDA for the language L= {x Efa,b}" {ng CX) > ny (x)}. 3111901806 the cperation of this machine using the string “abbabaa”. (6) Construct a PDA equivalent to the grammar S——» aAA, A ——> aS|bSja and explain the method used by you. {4) Define Chomsky Normal Form. Write the procedure used to converting a set ‘of productions to CNF. (4) Convert the following context-free grammar ({S,A,B}, {a ட, P,S) to - Chomsky Normal form. {4) Convert the grammar G given by G =({Aj, Ao, A3}, {a,b}, P, Ai) where P consists of the following productions: கட கிர A2—» க்க) Ib A3—p Aj;A2 [8 to Greibach Normal Form. Explain the procedure used to convert a context free language to Greibach Normal Form. (8) [OR] State the Pumping Lemma for Context Free Languages and explain the steps used in it. Using this lemma, prove that the language L = { 0" 11௩2 1} is not a context free language. (6) Design a Turning machine to accept palindromes over {a,b}. Check it with examples for odd and even palindromes. {6) Design a Turning machine to find whether a given number is prime or not. (4)
0 eligible source papers(a) (0) (ii) (iii) (b) @ (ii) ' Write the procedures used to compute FIRST() and FOLLOW(). Using this procedure, find the FIRST( ) and FOLLOW( ) for the non-left recursive grammer. E- TE’ — FE? >+TE’/€ TFT’ T>* FT /e F — (E)/ id (5) Write the algorithm used to construct a-predictive parsing table. Using this algorithm, construct a predictive parsing table for the non-left recursive grammar given above (in I'Sa(i)). (5) Explain the predictive parsing algorithm. Generate the moves made by a predictive parser on input id + id * id. (6) [OR] Explain the LR-parsing algorithm in detail (8) . Design a bottom up parser for the context Free Grammar G with productions T—-T*a Ta ; and explain the moves forata*a§ . (8)
0 eligible source papersHistorical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.