FLAT (5th) Dec2022
FLAT (5th) Dec2022
of Pages : 02
Total No. of Questions : 09
B.Tech. (CSE) (Sem.–5)
FORMAL LANGUAGE AND AUTOMATA THEORY
Subject Code : BTCS 502-18
M.Code : 78321
Date of Examination: 17-12-2022
Time : 3 Hrs. Max. Marks : 60
INSTRUCTIONS TO CANDIDATES :
1. SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
each.
2. SECTION-B contains FIVE questions carrying FIVE marks each and students
have to attempt any FOUR questions.
3. SECTION-C contains T HREE questions carrying T EN marks each and students
have to attempt any T WO questions.
m
SECTION-A
o
1. Write briefly :
.r c
e
a) If A={a,b} and B={b,c}, find A* U B*
p m
a o
.r c
b) Which are the two finite automata that produce output? Define any one.
r p
b e
c) Design a DFA that accepts set of all strings over (a, b) that does not contain the string
‘aabb’ in it.
p
p a
d) Convert the regular expression (a+b) c to its equivalent Finite Automata.
b r
e) State Ambiguous Grammar. Also give example.
1 | M-78321 (S2)-730
SECTION-B
State 0 l
q0 q1 q5
q1 q6 q2
q0 q2
q3 q2 q6
q4 q7 q5
q5 q2 q6
q6 q6 q4
q7 q6 q2
4. Design a NFA for a language that accepts all strings over {0, 1} in which the second last
symbol is always ‘1’. Then convert it to its equivalent DFA.
5.
o m
What is Pushdown Automata? Construct a PDA that accepts:
.r c
L= {0n ln | n > = 0}
6.
p e m
Construct a Mealy Machine that prints 'a' whenever the sequence '01' is encountered in
a o
any input binary string and then convert it to its equivalent Mealy Machine.
r p SECTION-C
.r c
7. b p e
What is Turing machine? Design a Turing Machine which recognizes the language
L=0N 1N
p a
8.
b r
Describe pumping lemma for regular languages with the help of example.
9. Define Greibach Normal Form. Convert the following Context Free Grammar to
Greibach Normal Form:
P : S CA | BB, B b | SB, C b, A a
2 | M-78321 (S2)-730