ii b.tech ii semester, regular examinations, april/may –...
TRANSCRIPT
Code No: R22055
II B.Tech II Semester, Regular Examinations, April/May – 2012
FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry Equal Marks
~~~~~~~~~~-~~~~~~~~~~~
1. a) Explain NFA. Construct NFA for accepting the set of all strings with either two consecutive
0’s or two consecutive 1’s.
b) What is a relation? Explain properties of a relation?
c) What is a language? Explain different operations on languages? (7M+5M+3M)
2. a) State Myhill-Nerode theorem.
b) Explain equivalence between two DFA’s with an example.
c) Find an equivalent NFA without €-transitions for NFA with €-transitions (3M+5M+7M)
3. a) Construct finite automaton to accept the regular expression (0+1)*(00+11)(0+1)*.
b) Construct NFA with €-moves for regular expression (0+1)*.
c) State and explain Arden’s theorem. (7M+5M+3M)
4. Let G be the grammar S�0B|1A, A�0|0S|1AA, B�1|1S|0BB. For the string 00110101, find
i) Leftmost derivation
ii) Rightmost derivation
iii) Derivation tree
iv) Sentential form. (15M)
5. a) Discuss ambiguity, left recursion and factoring in context free grammars. Explain how to
eliminate each one.
b) Discuss closure and decision properties of context free languages. (8M+7M)
6. Explain equivalence of CFG and PDA. (15M)
7. a) Explain the properties of recursive enumerable languages.
b) Explain counter machine in detail. (8M+7M)
8. Define P and NP problems. Also write notes on NP-complete and NP-hard problems. (15M)
1 of 1
R10 SET - 1
Code No: R22055
II B.Tech II Semester, Regular Examinations, April/May – 2012
FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry Equal Marks
~~~~~~~~~~--~~~~~~~~~~
1. a) Explain principle of mathematical induction.
Prove that 12+2
2+3
2+…….+n
2=n(n+1)(2n+1)/6 by using mathematical induction.
b) Explain DFA. Construct DFA accepting the set of all strings with an even no. of a’s and
even no. of b’s over an alphabet {a,b}. (7M+8M)
2. a) Prove with the help of algorithm that “Every NFA will have an equivalent DFA”.
b) Show that the following finite automata are equivalent: (8M+7M)
3. a) Explain equivalence of NFA and regular expression.
b) Design FA for regular expression 10+(0+11)0*1. (9M+6M)
4. a) Obtain a regular grammar for the following finite automata
b) What is the language of a grammar? Explain different types of grammars. (6M+9M)
5. What is GNF. Explain in detail. Convert the following grammar to GNF:
a) A1�A1A3 b) A2 � A3A1|b c) A3 � A1A2|a. (15M)
6. a) Explain acceptance of language by PDA.
b) Design a PDA that accepts the language L={w/w has equal no. of a’s and b’s} over an
alphabet {a,b}. (7M+8M)
7. a) How a Turing machine accepts a language? Compare Turing machine and push down
automata.
b) Define Turing machine. Explain the significance of movements of R/W head. (8M+7M)
8. a) Explain universal Turing machine.
b) Write about decidability of PCP.
c) Define P and NP problems. (6M+5M+4M)
1 of 1
R10 SET - 2
Code No: R22055
II B.Tech II Semester, Regular Examinations, April/May – 2012
FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry Equal Marks
~~~~~~~~~~~--~~~~~~~~~~
1. a) Explain DFA and NFA with an example.
b) Define set, relation, graph and tree with examples. (8M+7M)
2. Define NFA mathematically. Explain its significance and function. Convert the given finite
automaton into its DFG. Explain method used. Take suitable example and prove both accept
the same string. (15M)
3. a) Define regular sets and regular expressions. Explain applications of regular expressions.
b) Explain pumping lemma for regular sets. (8M+7M)
4. a) Define the following and give examples:
i) Context Free Grammar ii) Derivation tree
iii) Sentential form iv) Leftmost and rightmost derivation of strings.
b) Obtain a right linear grammar for the language L={anb
m/n>=2,m>=3}. (8M+7M)
5. a) Reduce the grammar S� aAa, A� SB|bcc|DaA, C� abb|DD, E� ac, D� aDA.
b) What is left recursion? How to eliminate it. (8M+7M)
6. a) Explain the terms: PDA and CFL.
b) Explain equivalence of acceptance by final state and empty stack. (8M+7M)
7. a) Explain Church’s hypothesis.
b) Explain counter machine in detail. (8M+7M)
8. a) Explain different decision problems of DCFL and Turing machine halting problem.
b) Explain universal Turing machine. (8M+7M)
1 of 1
R10 SET - 3
Code No: R22055
II B.Tech II Semester, Regular Examinations, April/May – 2012
FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions
All Questions carry Equal Marks
~~~~~~~~~~~-~~~~~~~~~~
1. a) Design DFA for accepting set of all strings having
i) odd no. of a’s and odd no. of b’s
ii) even no. of a’s and even no. of b’s over an alphabet {a,b}.
b) Define set, relation, graph and tree with examples. (8M+7M)
2. a) Construct a minimum state automaton equivalent to a given automaton M whose transition
table is
b) Discuss finite automata with outputs in detail. (9M+6M)
3. a) Draw NFA with €-moves recognizing regular expression 01*0+0(01+10)*11 over {0, 1}.
b) Construct regular expression for the given DFA
(8M+7M)
4. a) Explain Chomsky classification of languages.
b) Construct RLG and LLG for the regular expression (0+1)*00(0+1)*. (8M+7M)
5. a) Convert the following grammar to GNF:-
i) A1�A1A3 ii) A2 � A3A1|b iii) A3 � A1A2|a.
b) Explain the concept of ambiguity in context free grammars. How to eliminate it. (9M+6M)
6. a) Convert the following Context Free Grammar to Push down Automata
i) S�aA|bB ii) A�aB|a iii) B�b. Verify the string aab is accepted by equivalent PDA.
b) Explain instantaneous description for PDA. (10M+5M)
7. a) Define Turing machine. Explain the significance of movements of R/W head.
b) Design a Turing machine to recognize the language L= {anb
n/n>=1}. (6M+9M)
8. a) Write about LR(0) grammars.
b) Explain halting problem of a Turing machine. (8M+7M)
1 of 1
R10 SET - 4