Toc Assignment No-04. 2024
Toc Assignment No-04. 2024
THEORY QUESTION
i ) By Final State
ii ) By Empty state
9. Explain Closure property of PDA with suitable example.
10. Construct PDA that accepts the language by the following CFG.SSS| (S) | ( )
11. Construct a PDA that accept the language generated by grammar
i) S0S1| A, A1A0|S|€
ii) SaABB|aAA, AaBB|a,BbAA|A
12. Design a PDA for accepting a language L = {an bm cn | m,n>= l}
13. Design a PDA for accepting Language L = {W c WR | W ∈ (a,b)*}.
14. Construct PDA that accepts following language L anbn | n 0.Write simulation
for string ‘aaabbb’
n 2n
15. Design a PDA for the following LanguageL = {a b | n >=0}
16. Show that: L anbncn | n 1 not a CFL
SPPU University asked questions from 2015-2023 Prepared By : Mr. Anand Gharu
Theory of Computation TE(2019) Computer Engineering
2n n
17. Design a PDA for the following LanguageL = {a b | n >=1} n=3
18. Construct PDA that accepts all palindrome string over {a, b} . Specifysimulation
for string ‘aba’
r r
19. Design a PDA for a languageL={XcX |X€{a,b}* and string X is the reverse of string
X}.
CFG TO PDA
ii) SBD|BC
DSC
CAA
B0
A1
NPDA
2n
23. Construct a NPDA that accept the language L = { a | n > 0}
24. What is NPDA? Construct a NPDA for the set of all strings over {a,b} with odd length
palindrome.
25. Construct the NPDA that accepts the language generated by
` S=S+S|S*S|4
Show the acceptance of the input string 2 + 2*4 by this PDA
SPPU University asked questions from 2015-2023 Prepared By : Mr. Anand Gharu
Theory of Computation TE(2019) Computer Engineering
PDA TO CFG
27. Give Context Free Grammar (CFG) generating the language accepted
by the PDA M = {(q0, q1), (a ,b), , q0, Z0, q1} where δ is as follows.
1. (q0, a, Z0) (q0, XZ0)
2. (q0, a, X) (q0, XX)
3. (q0, b, X) (q1, ∈)
4. (q1, b, X) (q1, ∈)
5. (q1, ∈, Z0) (q1, ∈)
28.
29.
SPPU University asked questions from 2015-2023 Prepared By : Mr. Anand Gharu
Theory of Computation TE(2019) Computer Engineering
30.
MISCELLNEOUS EXAMPLES
31.
32.
*********************THE END********************
SPPU University asked questions from 2015-2023 Prepared By : Mr. Anand Gharu