Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

TOC3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Code: 15A05404 R15

B.Tech II Year II Semester (R15) Supplementary Examinations September 2021


FORMAL LANGUAGES & AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max. Marks: 70
PART – A
(Compulsory Question)
*****
1 Answer the following: (10 X 02 = 20 Marks)
(a) Draw the NFA accepting the set of all strings whose second symbol from last is 1?
(b) State Myhill Nerode theorem.
(c) Define regular expression.
(d) Construct a regular expression for the language which contains all the strings of 0.1 where every
string starts and ends with same symbol.
(e) Construct a CFG to generate the language L = {an bn /n ≥ 1}.
(f) What is the maximum number of nodes in a derivation tree when a word of length 4is derived from a
grammar in CNF?
(g) Write short notes on two stack PDA.
(h) Write the formal definition of PDA.
(i) Explain any two modifications of Turing machines.
(j) Define unrestricted grammar.

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

You might also like