This document contains a mid-term exam for the Theory of Computation course. It has two questions. Question 1 has 5 short answer parts asking about the acceptability of PDAs, unit/null productions, the pumping lemma for CFLs, ambiguity in grammars, and generating/reachable symbols. Question 2 has two longer parts asking to (a) construct a PDA for a language and (b) convert a CFG to a PDA. It also provides 3 other potential exam questions covering leftmost derivation, rightmost derivation, derivation trees for a string, converting a grammar to CNF, and using the pumping lemma to prove a language is not regular.
This document contains a mid-term exam for the Theory of Computation course. It has two questions. Question 1 has 5 short answer parts asking about the acceptability of PDAs, unit/null productions, the pumping lemma for CFLs, ambiguity in grammars, and generating/reachable symbols. Question 2 has two longer parts asking to (a) construct a PDA for a language and (b) convert a CFG to a PDA. It also provides 3 other potential exam questions covering leftmost derivation, rightmost derivation, derivation trees for a string, converting a grammar to CNF, and using the pumping lemma to prove a language is not regular.
This document contains a mid-term exam for the Theory of Computation course. It has two questions. Question 1 has 5 short answer parts asking about the acceptability of PDAs, unit/null productions, the pumping lemma for CFLs, ambiguity in grammars, and generating/reachable symbols. Question 2 has two longer parts asking to (a) construct a PDA for a language and (b) convert a CFG to a PDA. It also provides 3 other potential exam questions covering leftmost derivation, rightmost derivation, derivation trees for a string, converting a grammar to CNF, and using the pumping lemma to prove a language is not regular.
B Tech, 5th Semester, MID-TERM EXAM (2020) Branch: CSE/CSIT Sub: Theory of Computation (CS30138) Time: 1 Hour Full Mark: 20 (Answer all Questions) Q1. Answer the following: [2 X 5] a. Define the acceptability of PDA with suitable example. b. Explain Unit and Null production with suitable example. c. State the pumping lemma for context free languages (CFL). d. Show that the given grammar is ambiguous P={ S → AB |aaB , A → aA |a, B → b } For the string w= aab e. Differentiate between generating symbol and reachable symbol in a grammar.
Q2. Write any two (2 x 5)
(a) Construct PDA that accepts L={am bm cn / m, n ≥1 })
(b) Convert given CFG to PDA S → aAA A → aS | bS | a
(c) Consider CFG, G whose Productions are
P = {S → 0B|1A A → 0| 0S | 1AA B → 1| 1S | 0BB } For the string w= 00110101 Find (i) LMD, (ii) RMD, (iii) Derivation tree. (d) Reduce the grammar, G into CNF. The productions are P: {E èE+E | E*E | (E)| 2} (e) Prove that L={an bn / n ≥1 } is not regular using Pumping Lemma