Flat Mid-2 Question Bank
Flat Mid-2 Question Bank
B→b|∈
Convert the given grammar into CNF
SAA/ a
ASS/b
13. Give the applications of Context Free Grammars.
14. Explain the Closure Properties of Regular Grammar.
UNIT-4
Short Answer Questions
1. Define PDA
2. Sketch the basic model of PDA
3. Explain graphical notation of PDA
4. Explain the Instantaneous Notation of PDA
5. Illustrate the acceptance of PDA by empty set
6. Explain PDA with two stacks
7. Types of PDA
8. Define Deterministic PDA
9. Define Non-Deterministic PDA
10. Give conversion rules of CFG to PDA
Long Answer Questions
1. With is an Instantaneous Description? Give the general model and graphical
representation of a PDA.
2. Construct a PDA which recognizes all strings that contain equal number of 0’s
and 1’s.
3. A PDA is more powerful than a finite automaton. Justify this statement.
4. Design a PDA for accepting a language {a2nbn | n>=1}.
5. Explain Non-Deterministic PDA with example.
6. Design a PDA for accepting a language {anb2n | n>=1}.
7. Outline the PDA with example. In what ways a PDA can show the acceptance
of a string. Explain with example
8. Construct PDA fpr the language language L = {wcwR | w c Σ {a, b}* }.
9. Explain deterministic PDA with Example.
10. Construct DPDA which accepts the language L = {wcwR | w c Σ {a, b}* }.
11. Explain the procedure for converting PDA to CFG with example.
12. Construct PDA from the following Grammar. S-> aB B-> bA/b A-> aB
13. Explain the procedure for converting CFG to PDA with example
14. Convert the PDA P= ({p, q},{0,1},{X,Z0}, δ, q, Z0) to a CFG , if is given by
δ(q, 1, Z0) ={(q, XZ0)} δ(q, 1, X) = {(q, XX)} δ(q, 0, X) = {(p, X)} δ(q, ε, X) =
{(q, ε)} δ(p, 1, X) = {(p, ε)} δ(p, 0, Z0) = {(q, Z0)}
15. What are the different ways of language acceptances by a PDA and define
them.
16. Construct PDA from the following Grammar
S->0BB
B->0S/1S/0
17. Show the procedure and explain to find the equivalence of PDA and context
free grammar.
18. Construct a CFG equivalent to the following PDA. [L2,10M] PDA={(p, q), (0,
1), δ, p, q, (Z, X)}, where p is initial state, q is final state. δ is defined as
δ(p,0,Z)=(p,XZ), δ(p,0,X)=(p,XX),
δ(p,1,X)=(q,ϵ), δ(p,1,X)=(p,ϵ),
δ(p,ϵ,Z)=(p,ϵ).
19. With an example, explain the structure and working of two-stack PDA.
20. Explain the elements of PDA. Construct PDA for L = {0 n 1m 2k)} Where
n,m,k>=1
21. What is additional feature of PDA has when compared with NFA? Is PDA
superior over NFA in the sense of language acceptance? Justify your answer.
22. Explain about different types of PDAs
Unit-5
Short Answer Questions
1. Define Turing Machine
2. Define Instantaneous description of TM.
3. What are the applications of TM?
4. Explain briefly Halting problem
5. Define Churchs’ s Hypothesis?
6. List any four types of TM
7. Define Universal TM
8. Discuss about PCP.
9. What are the limitations of TM?
10. Compare between PDA and TM?
11. What are the languages that can be recognized by a Turing Machine.
12. Demonstrate the tuple structure of Turing Machine?
13. Explain about Un-decidability?
14. Identify some of the example for NP class problems?
15. What is NP class problem
Long Answer Questions
1. Give the formal definition of Turing Machine. What are the components of
Turing Machine?
2. Design TM for L= {an bn | n>=1}
3. Explain importance and limitations of TM?
4. Design a TM that accept L={02n 1n | n > =1}
5. Make a comparison between FM, PDA and TM?
6. Design a TM that accept L={0n 12n | n > =1}
7. Explain the concept of decidable and undecidability problems
8. Design TM for L= {an bn cn | n>=1}
9. Explain the various types of Turing machine.
10. Design a TM to recognize the language L ={wwr ; w (0+1)*}.
11. Design TM for L= {0n 1n 2n | n>=1}
12. Design a TM to recognize the language L ={wcwr ; w (0+1)*}.
13. Explain Universal Turing machine
14. Give the solution of PCA A={,ab,a,baa,b] and B={bab, baa, ba, a, aba}
15. Explain in brief about Church's Turing thesis.
16. Design a Turing Machine to find 1’s complement of a binary number?
17. Explain the PCP and MPCP with example
18. Find whether post correspondence problem P = {(10,101), (011,11),
(101,011)} has match. Give the solution if exists.
19. Explain classes of P and NP
20. Explain the differences between NP complete and NP-hard problems.
21. Design a Turing Machine to find 2’s complement of a binary number?
22. Construct a Turing Machine for addition of two given integers?
23. State and Prove PCP problem in detail?