You are on page 1of 3
Printed Pages—4 ECS403 [Following Paper ID and Roll No. to be filled in your Answer Book)} B.Tech. (SEM. IV) THEORY EXAMINATION 2013-14 THEORY OFAUTOMATA & FORMAL LANGUAGES, Time : 3 Hours Total Marks : 100 Note :— Attemptall the questions in fair Handwriting in Sequence. Assume where required and Mention it. 1, Attempt any four parts of the following, (5x4=20) (a) Write Regular expressions for each of the following languages over the alphabet (0,1) — (i) The set of ll strings in which every pair of adjacent zero’s appears before any pair of adjacent one’s. Gi) The set ofall strings not containing 101 as substring, (b) Draw DFA of following language over {0,1} :~ (@ All strings with even no. of O's and even no. of I's. Gi) All strings of length at most 5. (©) Convert following NFA to equivalent DFA : (> | as) | (a) | “a | [fan] rl fs} [i ica a] > | fp} (4) Show that every Context free language is context-sensitive. ECS403/0Q5-21750 1 (Turn Over () Draw DFA for following over set = { 0,1} @ L={o:|o}mod3=0} (i) L={:|o| mod 3>1} lol represents length of string o. (®) Find the regular grammar for the language L= {at be [n+ mis even }. Attempt any four parts of the following (Sx4=20) (@) Convert the given grammar in Chomsky Normal form(CNF)_( S+>ABa A->aab BAc. (b) Following Grammar generates language of Regular Expression: OF1 (O+1)* S+AIB A0A/e B>OBIIBle Give leftmost and rightmost derivation of strings 00101 (©) Show the below grammar is ambiguous :~ G=(V,TEP), V=(E.1), T= (a,b,c,+,*,(....)) P=> Esl ESEVE E+E*E E(B) Isalbje. (d)_ Find Context free grammar for following languages with (n>=0,m>=0,k>=0). @ L=(abet|k>=3} (i) L= {ar bee'|n=morm<=k}. (e) Given context free Grammar, how do you determine that ‘grammar as : (i) Empty or Non Empty t) Finite or Non-Finite Whether a string x belongs to language of grammar. (8) Design a NFA to recognize following set of strings 0101, 101 and 011. Alphabet set is {0,1}. Find the equivalent Regular Expression. ECS403/DQJ-21750 2 ( Attempt any two parts of the following (a) Construct PDA for following :~ = (ateb™|n>=1} over alphabet E = a,b,c}. Specify the acceptance state. () Prove that following are not Regular Languages : ( {o" | mis perfect square}. (i) The set of strings of form 0* 1’ such that the greatest ‘common divisor of i and jis 1 (©) (Forgiven CFG; find equivalent CFG with no useless variables : S-+ABJAC A-aAblbAala B-rbbAlaaB/AB C-rabCalaDb D-rbDjaC (i) Explain Chomsky Normal form and Greibach Normal form. Convert following CFG to Equivalent Greibach ‘Normal form S+AA ASS Sa Arb Attempt any two parts of the following : (10*2=20) (a) Consider given PDA: PDA M = ({q,}, {0,1}, {810.2}, 5, Gy Zr 6) Bis defined as : 5 (Gy a, %) {(q,- a2,)} Ba,bz) = — {a,bz)} 8 (a, 0,a) = {4 2a)} (qn 1d) = + {(a,,bb)} 3(a,0.b) = {dy €)} 5, 1,a) {@y ©) By EZ) = Udy EF Convert given PDA M to corresponding CFG. ECS403/D03-21750 3 [urn Over (b)_ Prove the Lemma that language recognized by final state PDA machine is also recognized by empty-stack PDA LM) = N(M) Where L(M) -» Language by Final State PDA machine. N(M) -» Language by Empty Stack PDA machine. ‘machine and vice-versa. (©) Prove that the languages L, and L, are closed under Intersection and complementation if they are regular, but not closed under the above said two properties if they are context free languages. Attempt any two parts of the following : (10*2=20) (@) Design a Turing Machine that can compute proper subtraction i.e. mSn, where m and n are positive integers, mSn is defined as m-n if m>n and 0 ifmsn, (b) State True/False with reason :~ (Every language described by Regular Expression can be recognized by DFA. (i) Every RELL. can be generated by CFL. Gi) The Halting problem of TM is decidable (iv) Complement of R.E.L. is also RELL. (v)_ Every CFE can be recognized by TM. (©) Design a Transducer (Mealy or Moore) Machine to compute multiplication of two n-bit binary numbers. E.CS403/DQJ-21750 4 us7s

You might also like