Scarica in formato pdf
Scarica in formato pdf
Sei sulla pagina 1di 4
(AT [3563] -— 195 T.E. (Computer Engg.) (Sem. — I) Examination, 2009 THEORY OF COMPUTATIONS (2003 Course) Time : 3 Hours Max. Marks : 100 N.B. : 1) Answer three questions from each Section. 2) Answer to the two Sections should be written in separate answer books. 3) Neat diagrams must be drawn whenever necessary. 4) Figures to the right indicate full marks 5) Assume suitable data, if necessary. SECTION ~ I a) Let L bea language. It is clear from the definitions that L’ CL*. Under what circumstances are they equal ? 4 b) Constructa NFA and then equivalent DEA accepting strings over {0, 1}, for accepting all possible strings of zeroes and ones not containing 101 as a substring, 10 ¢) IfS= {aa, b} write all the string in $* which are having length 4 or less, also say the following is True or False. 4 i) (S*)* = (S*)* ii) (S')' = S* iii) (S*)* = (S*)* OR 2. a) Prove for any sets A, B and CifA MB=@ andCcB, then A OC=. 4 b) Construct a NFA and then equivalent DFA accepting strings over {0, 1}, for accepting all possible strings of zeroes and ones which does not contain O11 aa substring. 10 ©) Convert the following Mealy machine to Moore machine 4 P.O. [3563] - 195 (AG 3. a) Find a regular expression corresponding to each of the following subsets of {0, 1}* 6 1) The language of all strings containing exactly two 0's. 2) The language ofall strings containing at least two 0's, 3) The language of all strings that do not end with 01. b) Consider the following transition diagram convert it to equivalent regular expression using Arden’s theorem. 6 aes ©) Prove for any integer a and b if a and b are odd, then ab (i.e. product of two integer) is odd. 4 OR 4. a) Design the finite automata and then equivalent regular expression using Arden’s theorem that accepts the set of all strings over the alphabet {a, b} with an equal number of a’s and b’s, such that each prefix has atmost one more a than b’s and atmost one more b than a’s. 10 5) Using pumping lemma for regular sets prove that which of the following languages ate regular sets. 6 1, {01800 | m>=1 ans n>=1} 2. {0"| nisaprime} 5. a) Give the context free grammars for the following languages. 12 a) (011+1)* (01)* b) Of 1)*KOk where i, k>=0, b) Prove that the every regular language is regular. 4 OR Ti + [3563] — 195 6. a) Forright linear grammar given below, obtain an equivalent leftlinear grammar. 4 S>10A(01 A>00A\I b) Describe the language generated by each of these following string and show the derivation of such a string from grammer. 12 1) $>aA|bC|b A >aS | bB B-aC|bAla C > aB| bs 2) S$ >bS|aAle A >aA|bB|b B > bs SECTION - II 7. a) Design a PDA and then corresponding CFG for the language that accepts the simple palindromes L = {XCX'|X e {a,b} *} 14 b) Write a note on closure properties of CFL’s. 4 OR 8. a) Construct pushdown automata for each of the following language : 12 1) The set of all string over alphabet {a, b} with exactly equal number of a’s and b’s. 2) The set of all string over alphabet {a, b} with the language of even length palindromes. 3) The set of all string over alphabet {a, b} with the language of odd length palindromes. b) Show that ifL is accepted by a PDA in which no symbols are removed from the stack, then L is regular. 6

Potrebbero piacerti anche