TOC3
TOC3
TOC3
PART – B
(Answer all five units, 5 X 10 = 50 Marks)
UNIT – I
2 (a) Define DFA. Design a DFA for accepting all the strings with odd number of a’s and even number
of b’s.
(b) Design a Moore machine to determine the residue mod 5 for each ternary string (base 3) treated as
ternary integer.
OR
3 (a) Construct a smallest DFA over Σ = {a, b} accepting all strings which have number of a’s divisible by
3 and number of b’s divisible by 2.
(b) Reduce the following DFA where q1 is the start state and q6 is the final state.
Contd. in page 2
Page 1 of 2
Code: 15A05404 R15
UNIT – II
4 (a) State and prove pumping lemma for regular sets.
(b) List and explain Decision problems of regular languages.
OR
5 (a) Construct an NFA with ε moves equivalent to the following regular expression: 10*+0(01+10)*11.
(b) State and prove Arden's Theorem
UNIT – III
6 Find the CNF of the following grammar:
𝑆𝑆 → 𝑂𝑂𝑂𝑂𝑂𝑂�|𝐵𝐵|�𝐵𝐵𝐵𝐵
A→C
B→S/A
C→S/∈
OR
7 (a) Define parse tree. Write about leftmost derivation and rightmost derivation with example.
(b) State and explain the closure properties of context free languages.
UNIT – IV
i j
8 (a) Design a PDA for recognizing L = { a b / j <= i and i, j > 0 }. Show the moves of the PDA for the
string aabb.
(b) Define instantaneous description of a PDA.
OR
9 (a) Give the stack representation and trace the computation of push down automaton that recognizes
the language consisting all strings which contain equal number of 0’s and 1’s.
(b) Design a PDA that accepts the language L = { WWR / W∈ (0+1)* and W R is reverse of W}.
UNIT – V
10 (a) Design a Turing machine to recognize the language L = {an bn /n ≥ 1}.
(b) Check whether the following instance of Posts Correspondence problem (PCP) has a solution or
not.
i xi wi
1 b ca
2 a ab
3 ca a
4 abc c
OR
11 (a) Define a Turing Machine (TM) and the language accepted by a TM. Design a TM for reorganizing
the language (a+b)*aba(a+b)*. Draw its transition diagram and table.
(b) Compare Turing machine and Push down automata.
*****
Page 2 of 2