KCS-402 2022-23
KCS-402 2022-23
KCS-402 2022-23
B.TECH
(SEM IV) THEORY EXAMINATION 2022-23
THEORY OF AUTOMATA AND FORMAL LANGUAGES
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
2
13
_2
SECTION B
2.
P2
24
2. Attempt any three of the following: 10x3=30
3E
5.
(a) Construct a DFA for ternary number divisible by 4.
.5
(b) Determine the FA accepted by the language described by the regular expression:
P2
(0+1)*0(0+1)*0(0+1)* over the alphabet {0,1} and also mention the accepted language
? 17
Q
|1
(c) Consider the grammar with following production rules:
S→ABD | AC
3
A→aA | bAa |a
:3
B→bbA | aB | AB
27
C→aCa |aD
D→aD | bC
:
i) Church’s Thesis
ii) Recursive and Recursive Enumerable Language
-2
08
SECTION C
5-
State/ Input
A b
Q0 Q1 Q2
Q1 Q4 Q3
Q2 Q4 Q3
Q3 Q5 Q6
Q4 Q7 Q6
Q5 Q3 Q6
Q6 Q6 Q6
Q7 Q4 Q6
(b) State pumping lemma for regular language. Prove that the language L= {ap | p is
prime} is not regular. 90
2
13
_2
5. Attempt any one part of the following: 10x1=10
2.
P2
24
(a) A context free grammar G is given by the following productions:
E→E+E|E-E|E∗E|E^E|N
3E
5.
N→0|1|2|3|4|5|6|7|8|9
.5
P2
n n n
(a) Design a two stack PDA for the language L={a b c | n>=1}
27
M = ({q0, q1}, {0,1} {x, z0}, δ, q0, z0, q1) where δ is given as follows: δ (q0,1, z0) =
13
(q0, xz0)
δ (q0,1, x) = (q0, xx)
3
δ (q0,0, x) = (q0, x)
02
δ (q0, ε, x) = (q1, ε)
-2
δ (q1, ε, x) = (q1, ε)
δ (q1,0, x) = (q1, xx)
08