Atc Question Bank
Atc Question Bank
12.
13. Write DFA to accept strings of 0’s, 1’s & 2’s beginning with a 0 followed by odd L4
number of 1’s and ending with a 2.
Consider the following ε-NFA. Convert the automata length 3 or less accepted by the
automaton.
14. L1
15. Obtain a DFA to accept strings of a’s and b’s having even number of a’s and b’s. L1
16. Obtain a DFA to accept strings of 0’s and 1’s having even number of 0’s and odd no. L3
of 1’s.
17. Design DFA accepting the following languages over alphabet {a,b} (a) L= {w:|w| L1
mod 5 < > 0}
(b) The set of all strings not containing ‘aab’
18. Design DFA accepting the following languages L2
L={awa : w ϵ (a,b)*} verify string aabaa
L{w : where |w| mod 3 = 0} where Σ = {a}
L={w ϵ (a,b)*} every a region in w is of even length
L={w ϵ (a,b)*} w contains no more than one b}
L={awa : w ϵ (a,b)*} w contains even number of a’s and odd number of b’s} verify
string aabaa
L={w ϵ (0,1)*} : w is ending with 01}
L={(a+b)n abb : n>=0}
DFA to accept string’s a’s and b’s ending with ab or ba
L{w : na (w) >= 1 nb (w)=2}
19. Obtain a DFA to accept the language L = |w| mod 3 >= |w| mod 2 L1
20. What are the applications of finite automaton? L2
21. List the disadvantages of DFA. L2
22. Obtain the DFA for the following NFA using subset construction method. L1
23. Prove that the DFA D constructed from NFA N by subset construction method L3
then L(D)=L(N)
24. What is the difference between DFA, NFA and ↋-NFA? L3
25. Convert the following NFA to its equivalent DFA using lazy evaluation method. L3
2)
3)
1) A → ABd / Aa / a
B → Be / b
2) E → E + E / E x E / a
3)E→E+T|E-T|T
T→T*F|T/F|F
F→id
4)S →Aa|b
A→ Ac| Aad| bd| ε
5) S → (L) / a
L→L,S/S
6. Examine and Eliminate the left factoring in the following L4
1)S→iEtS|iEtSes|a
E→b
2)S→aSSbS|aSaSb|abb|b
3)S→bSSaas|bSSaSb|bSb|a
4)A→Aab|Aa
B→b B|b
E→E+T|T
T→T*F|F
F → (E) | id
Parse the input string “ id + id * id ”
S → a | (L)
L→L,S|S
Parse the input string “ (a,(a,a)) ”
S → a | (L)
L→L,S|S
Parse the input string “ (a,(a,a)) ” using SHIFT RDUCE PARSER
S →aAcBe
A → Ab | b
B→ d
Parse the input string “ abbcde ” using SHIFT RDUCE PARSER
12. Explain the types of conflicts in Shift Reducing Parsing. L2
13. List and explain different actions of shift reduce parser. L2
14. Explain Top Down and Bottom Up Parsing with an example and construct the L2
derivation tree for the same.
15. Define Handle Pruning with an example. L2
16. Define LR(0) items, and its associated items. L2
17. Consider the following grammar L3
E→E+T|T
T→T*F|F
F → (E) | id