Professional Documents
Culture Documents
cao
.= c\
d$
hoo a. Co n id er rh ll
Lne I()ltow lg €- NFA
Hn
C)C
r< C) 6 € a b
L-
o
3* -+P {r} {q} {p, r}
Ee q o {p} o
Ln
5)
;-(
*r ip, q) {p} ir)
a}X
bU i) Compute the € -closure of each state
do ii) Give the set of all strings of length 3 or less accepted by the automation
b0c iii) Convert the automation to DFA. (08 Marks)
.s co
vc
.6
b. Describe regular expression recursively. Write the regular expression for the following:
tr=
-o€
\
i) Strings of a's and b's that do not end with ab over {a, b}-
iD String of 0'and 1'such that starts and ends with the same symbol. (06 Marks)
5E
a- c. Obtain regular expression from the following DFA using state elimination method.(06 Marks)
oA or l
5cs
oi
(t) \J
9E
9()
cN ,:
F'ig Q2(c)
6E
$- t)
frt
g.= &, State and prove pumping lemma for regular languages. (05 Marks)
>\'-
ooo
c 01) b. Prove that if L is a regular language SO LR (05 Marks)
e= c. Minimize the following DFA using table filling Algorithm. (10 Marks)
o- l\
6 0 1
=c)
5r<
o< +A B tr
B C F
-N
,J
'C D H
z D E H
c E F I
ri
F G B
T
G H B
H I C
I A E
l of 2
10cs56
a. Define context free grammar. Write a CFG for palindromes over {0, 1}.. (05 Marks)
b. What is ambiguous grammar? Show that following grammar is ambiguous for the string
'oabababa". S -+ Sbsla (05 Marks)
c. What is inherent ambiguity? Explain with an example. (05 Marks)
d. Explain the application of CFG with respect to parsers. (05 Marks)
PART _ B
a. Explain the working of PDA with a diagram. (05 Marks)
b' Design a PDA for accepting the language L = t0t"t" > I ). Draw the transition diagrarn for
ln
PDA obtained. Show the instantaneous description of the PDA for the string "00001 1".
(10 Marks)
c' Convert the following grammar to PDA (05 Marks)
I -+ albll"lI6ll6lIl
E -+ IIE*EIE+E|(E).
**>t**
2 of 2