0% found this document useful (0 votes)
79 views2 pages

TOC Question Bank24-25

The document is a question bank for the Theory of Computation course at AMC Engineering College, focusing on various topics such as Context-Free Grammars (CFG), Pushdown Automata (PDA), Turing Machines (TM), and language properties. It includes exercises on constructing grammars, designing automata, proving language properties, and converting grammars into different forms. The questions cover a range of concepts including ambiguity, closure properties, and undecidability.

Uploaded by

Pratik Halder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views2 pages

TOC Question Bank24-25

The document is a question bank for the Theory of Computation course at AMC Engineering College, focusing on various topics such as Context-Free Grammars (CFG), Pushdown Automata (PDA), Turing Machines (TM), and language properties. It includes exercises on constructing grammars, designing automata, proving language properties, and converting grammars into different forms. The questions cover a range of concepts including ambiguity, closure properties, and undecidability.

Uploaded by

Pratik Halder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AMC ENGINEERING COLLEGE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


THEORY OF COMPUTATION BCS503 Question Bank

1. Define CFG. Construct CFG for the Languages given Below:


i.L={w| na (w)=nb(w)} ii. L={an+1 bm cm cn |n,m>=0}
iii. L={0m 1m 2n /m,n>=0} iv. L={ai bj | i=j+1}
2. Define CFG. Design CFG for the languages:
i. L={02n 1m | n>=0,m>=0 } ii.L=L={0i 1j 2k |i=j or j=k}
iii.L={anbmcmd2n |n,m>=0} iv.L={wwR| w  {a,b}*}

3. Consider the Grammar:


EE+T| T
TT*F|F
F( E) |0|1
Write the Leftmost derivation, Rightmost derivation and a Parse fo r the string 0+1*1

4. Consider the Grammar:


EE+E | E*E | E-E | (E) | I
I0| 1| a| b|Ia|Ib|I0|I1
And compute the following for input String (a1+b0-00)
i. LMD ii. RMD iii. Parse Tree iv. Is this ambiguous? Justify your answer.

5. Define PDA. Obtain a PDA to accept the Language


L={ wwR| w  {a,b}*}
ii. Convert the following grammar into equivalent PDA:
SaSb| bSa | a|b

6. Define Grammar. Prove whether the given grammars ambiguous grammar or not:
SABC
AaC|D
BbB|A| ϵ
CAc| ϵ|Cc
Daa

7. List the Closure Properties of CFLs and Prove that language L ={a n bncn |n>-0} is not
context free language.

8. Define CNF. Convert the following CFG into CNF.


SASB/ 
AaAS|a
BSbS|A|bb

9. Define TM. Design a Turing Machine to accept L ={0n 1n| n>=1}. Show the moves made for the string
000111.

10. List the Closure Properties of CFLs and Prove that language L ={WW | w  {0,1}*} is
not context free language by Pumping Lemma Theorem.
11. Define TM. Design a Turing Machine to accept L ={a n bn cn| n>=1}. Show the moves made for the
string aabbcc.

12. Define CNF. Convert the following CFG into GNF.


S->aACa
A->B/a
B->C/c
C->cC/ϵ.

13. Define Push Down Automata. Obtain a PDA to accept the Language
L={ ai bj ck| i=j+k}
ii. Convert the following grammar into equivalent PDA:
EE+T, ET, TT*F, TF, F(E), Fid

14. Eliminate  productions, unit productions, and useless productions:


SABC|BaB
AaA |BaC|aaa
BbBb|a|D
CCA|AC
D 

15. Illustrate Programming Techniques for Turing Machines with a suitable example.

16. Define Turing Machine. With a neat Block diagram, explain the the working of basic Turing Machine.

17. Explain The Techniques for Turing Machine construction. Also write applications of Turing Machine.

18. Explain Undecidability. Illustrate a Language That Is Not Recursively Enumerable with example.

19. .Design a PDA for the language L= {WCWR |W £ (a,b)* where WR is reverse of W } and
show the moves made by PDA for the string “aabcbaa”. [ Practice more problems in PDA]

20. Design a Turing machine to accept L={1n2n3n |n>=1}. Show the move made for the string
0011 and 00111.

You might also like