TOC - Question Bank
TOC - Question Bank
Module-1
21. Convert the following NFA with Ԑ- transition to NFA without Ԑ- transition.
Module-2
ii)
iii)
iv)
12.
Consider the above 2 Automata and identify whether both are equivalent to each other or not.
Module-3
1. Describe the CFG to accept arithmetic expression id+id*id
2. What is derivation tree. Write all its properties .Explain LMD and RMD with example.
3. Define CFG. Find out CFG for the following language.
a. L={wЄ(a,b)*| w contains at least 2 a’s}
b. L={wcwR | wЄ(a,b)*}
c. L={anb2n :n>=1}
d. Which generates palindrome for binary numbers
4. What is parse tree? Consider a CFG SXX, XXXX|bX|Xb|a. Draw the parse tree
for the string bbaaaab.
5. Consider the following grammar and derive the string aaabbabbba by using RMD
method and draw the parse tree.
SaB|bA
AaS|bAA|a
BbS|aBB|b
6. Consider the following CFG and derive the string aabbaa by using lm derivation.
S aAS|a
ASbA|SS|ba
Also draw the left parse tree.
7. Determine the language generated by each of the following productions.
a. SaA, SaS , Aab
b. SabS, SaA, Aa
c. SaSb, SԐ
8. Define Ambiguity. Consider the grammar E->E+E|E*E|(E)|id. Find the leftmost, rightmost
derivations and parse trees for the string id+id*id. And show that this grammar is
ambiguous.
9. Show that the following grammar is ambiguous by taking the string aab.
S → aS | aSbS | ϵ
10. What is PDA? Expalin the block diagram of PDA. Wtite the 7 tuple notaion for PDA.
11. Construct a PDA to accept the following language. L={anbn|n>=0}. Draw the
transition diagram for the constructed PDA. Show the ID’s for the string aaabbb.
12. Construct a PDA for the language that accept the strings with na(w)> nb(w) where
wЄ(a+b)* and show the ID of the PDA on input string abbab.
13. For the below Grammar obtain the corresponding PDA
S aABC, A aB | a, B bA | b, C a
Module-4
1. What is Normal form? Explain CNF and GNF.
2. Express the following grammar in CNF.
S→ 0A | 1B
A→ 0AA | 1S | 1
B→ 1BB | 0S | 0
3. Convert the following grammar into GNF.
S→ AB1 | 0
A→ 00A | B
B→ 1A1
4. Solve the following CFG using ε-productions and Unit productions.
S →aA | aBB A → aAA | ε
B→ bB | bbC C →B
5. Show that “CFL is closed under Union” and “CFL is not closed under intersection”.
6. Express the following CFG in GNF.
S →abSb|aa
7. Solve the following CFG .
S →a|Xb|aYa
X →Y|Ԑ
Y →b|X
Z →d
5. Design a Turing Machine to accept strings formed on {0,1}* and ending with 000. Write
transition diagram and sequence of IDs for w = 101000
6. Design a Turing Machine to accept all set of palindrome over {a,b}*. Draw the transition table
and also transition diagram. Show the sequence of IDs for the string: “ababa”
7. Briefly explain The Techniques for Turing Machine construction. Also write applications of Turing
Machine.
8. Design a Turing machine to accept L={anbncn| n>=0}. Draw the transition diagram. Show the
moves made for string aabbcc.
9. Explain recursively enumerable language
10. Write application of turing machine.