Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

C.V.

RAMAN GLOBAL UNIVERSITY, BBSR


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

You might also like