Toc Ques
Toc Ques
S ->ABa
A -> aab
B ->Ac
20. Recall the formal definition of Push Down Automata
21. Show that L={ap/ P is prime } is not context free.
22. Define Turing Machine.
23. What are the differences between a Finite automata and a Turing machine?
24. Differentiate multihead and multi tape Turing machine.
25. Define decidable problems.
26. Write the Significance of NP-Complete Problem.
27. When we say a problem is decidable? Give example of undecidable problem.
28. What are the properties of recursively enumerable sets which are undecidable?
29. Construct a grammar for the language L which has all the strings which are all
palindrome over {a, b}.
30. Define Deterministic PDA.
PART-B
1. i) How CFG for L is converted into CNF accepting the same language? Convert the following
CFG into CNF:
S -> Ba | aB
A ->bAA | aS | a
B ->aBB | bS | b
ii) . Construct TM for the language L = { an bn } where n ≥ 1.
A1 ->A3A2 | A2A3
A2 ->A3A3 | A2A2 | a
A3 ->A2A2 | b
ii) Design a Turing machine that takes a binary number as input and increments the number
by 1.
S->XY1/0,
X->00X/Y,
Y->1X1
ii) . Construct TM for the language L = { 1n 0n bn } where n ≥ 1.
4. i)Simplify the following grammar by eliminating null productions, unit production and
useless symbols and then convert to CNF.
S->ABC/BaB
A->aA/ BaC/aaa
B->bBb/a/D
C->CA/AC
D->ξ
ii) Design a Turing machine that takes a binary number as input and increments the number
by 1.
11. i) Show that the Language L={ aibici/ i>=1} is not context free.
12. What is the purpose of normalization? Construct the CNF and GNF for the following
grammar and explain the steps.
13. i)Prove that ̳If a language L and L‘ are recursively enumerable (RE) , then L is Recursive‘.
15. Design a PDA to accept {0n1n|n>1}. Draw the transition diagram or the PDA. Show by
instantaneous description that the PDA accepts the strings‘0011‘.
16. Convert PDA to CFG.PDA is given by P=({p,q},{0,1},{X,Z}, δ,q,Z),δ is defined by
δ(p,1,Z)={(p,XZ)}, δ(p, ε,Z)={(p, ε)}, (p,1,X)={(p,XX)}, δ(q,1,X)={(q, ε,)}, δ(p,0,X)={(q,X)},
δ(q,0,Z)={(p,Z)}.
17. Consider the following PDA and find whether the string 000111 and 00011 is accepted.
18. Suppose the PDA P = ({p, q},s {0,1}, {z0, x},δ, q,z0,{p}) has the following transition functions:
δ(q, ε, x) = {(p,ε)}
δ(p, ε, x) = {(p,ε)}
δ(p, 1, x) = {(p,xx)}
Starting from the initial ID (q, w, z0), show all the reachable instantaneous description where the
input string ‘w’ is as follows:
1. 01
2. 0011
3. 010