TOAFL Question Bank
TOAFL Question Bank
TOAFL Question Bank
QUESTION BANK
Short Question:
1. Prove or disprove the following regarding regular expressions:
i. (R + S)* = R* + S *
S Xy l xn l p
X mX I m
YXn l o
S ASA l Ab
AB I S
B b l ε
5. Explain briefly about two stack PDA and differentiate it with single stack PDA.
7. Write a regular expression to denote a language L which accepts all the strings
that begin or end with either 00 or 11.
13. Prove that the compliment, homomorphism and inverse hornomorphism, closure
of a regular language is regular. Also State and prove kleene's theorem with an
example.
14. Define Context Free Grammar (CFG). Write the Context Free Grammar (CFG) for
regular expression (0+1)*
15. Design a DFA for languages L containing strings of 0 and 1’s where number of
0’s is not divisible by 3.
Long Question:
1. Construct a PDA M equivalent to grammar with following productions:
2. What are various points of difference between Moore & Mealy Machine?
Explain the procedure to convert a moore machine into Mealy machine.
3. (i) Prove that the following Language L = {an bn : n>=0} is not a regular
language.
n n n
(ii) Design a Turing Machine for the language L. Where, L= {a b c | n≥1}
(b) What is inherent ambiguity? Explain with the help of suitable example.
M = ({q0, q1}, {0,1} {x, z0}, δ, q0, z0, q1) where δ is given as follows:
δ (q0,0, x) = (q0, x)
δ (q0, ε, x) = (q1, ε)
δ (q1, ε, x) = (q1, ε)
(b) Explain in detail about the Pumping Lemma and application of Pumping
Lemma for Regular Languages
(b) Prove that the following Language L = {an bn cn } is not Context Free.
10. (i) Find the regular expression of Given FA using Arden’s theorem
11. Explain Post Correspondence Problem. Let A = {1, 110, 0111} and B = {111,
001, 11} and = {0, 1} Find the solution of PCP.
(c) Check whether the grammar is ambiguous or not. R-> R+R/ RR/ R*/ a / b / c.
Obtain the string w = a+b*c
13. Check with the comparison method for testing equivalence of two FA given
15. (i) State Arden’s theorem and construct regular expression for the following FA
using Arden’s theorem: