r5310501 formal languages and automata theory
TRANSCRIPT
-
8/8/2019 r5310501 Formal Languages and Automata Theory
1/1
Code No: R5310501 R5III B.Tech I Semester(R05) Supplementary Examinations, November 2010
FORMAL LANGUAGES AND AUTOMATA THEORY(Computer Science & Engineering)
Time: 3 hours Max Marks: 80Answer any FIVE Questions
All Questions carry equal marks
1. Construct DFA over { a, b } for the following: [28]
(a) On input w, produce output an, where n is the number of occurrences of the sub string ab in w.
(b) On input w, produce output an, where n is the number of occurrences of the sub string aba inw.
2. Construct a NFA, which accepts language L=set of strings with zero (or) more number of 0s followedby zero (or) more number of 1s followed by zero (or) more number of 2s And construct equivalentDFA. [16]
3. Consider the two regular expressionsr=0*+1*, s=01*10*+1*0+(0*1)*
(a) Find a string corresponding to r but not to s.
(b) Find a string corresponding to s but not to r. [8+8]
4. Construct Left Linear Grammar and Right Linear grammars for the languages shown below.
(a) (0+1)*00(0+1)*
(b) (((01+10)*11)*00)*. [28]
5. Eliminate useless symbols, useless productions, unit productions. And null productions from thefollowing grammars:
(a) S aS |A| cA aB aaC acb
(b) S aa |A| B| CA aB |B AaC aCDD ddd. [8+8]
6. (a) Construct the PDA corresponding to the grammar:SaABB/aAAAaBB/aBbBB/A.
(b) Construct a PDA that accepts the language
L = {wcwR/w {a, b}}. [8+8]
7. (a) Compare and contrast Finite automation, push down automaton and Turing machines.
(b) Design Turing Machine, which multiplies two integers. Give its state transition diagram. [8+8]
8. (a) Give the CSL for L={anbncn : n >= 1}
(b) Writes the properties of recursive and recursive enumerable languages.
(c) Mention the properties of DCFLs. [5+6+5]