Вы находитесь на странице: 1из 3

10css6

USN

Dec.2Dl4lJan.2ll1
Formal Languages and Automata Theory

Fifth Semester B.E. Degree Examinationo

,. r.

:::::::::.

"

,**.
Max. Vtarksj4OO
- --=J,--

-,,1

'-{' ,.
' ,r: .,,

o
o
o

:::i

1i''""

": .,t
Ti'tre: 3 hrs.

Note: Answer any FIWftuII questions, selecting


atleust TWO questions from each part.

.,i
.*,,

.,,

a.
(n
'1

o
(!
d)

3a

ooP
r

\1

-*tt
ioo
.E
c\
(g$

,,,.''';i,n,,,,,i,

Design an NFA with no more than 5 states fop

d.

1={abab"ln>0}u{aUa"ln>0}
(03Marks)
Prove that if D : (Qo, I, 8.:grt'j,{qo}, Fo) is the DFA constructed from NFA
N: (Q^, I, 6N, 9o, FN) by the sub$$nstruction, then L(D) : L(N).
(06 Marks)

2 a.

tii
id''il1[rr'

jt,,,

d:i
-O6

o.X
c.

OE
EO

5.:

..,.,

:,

::,

and

r the following languages:


L:,{ffi.," ia, b) x I w has exactly one pair of consecutive a;s),
.1
il) Sei of all strings not ending in substring 'ab' over I: {u, b}-''''."'"*
(06 Marks)
Prov, at if L : L(A) for some DFA A, then there is a regular exprbssion R such that

io

ti(j

.,

(05 Marks)

'ir

Define regular+kiiession

-?q)

d.

language:

Convert the following e - Nl


.i

"o
>P

th following

c.

bog

ia lE

"

f) A D'f!
PART-A
a. Define the fol{o,wing with proper examples:
. ,,' {
i) Alphabet ' .ii),.Powers of an alphabet.
(03 Marks)
b. Design the DFA's for the following languages: i
i) Set of all strings with at least one 'a' afidexactly twd 'b's on I: {a, b}.
ii) Set of all strings Such,that number of 1's is e@b and the number of 0's is a multiple of
3 on I : {0, 1}. 'il$,,'.
(08 Marks)

?,a
dX
o()
(d0

,r,,,,,,n\

,.4,.,,,'.

gU'

oE
-g c)

,, ,-.-,,,

rq: *'E(R).
" '1'^Y'

;-1

(06
r
\vu Marks)

,,, Obtain the regular expression for the following DFA using state elimination teehqicue:

(Ofl
,.:
't('q*dr'

,t,,,

Marks)

oegoa
o=

E3
tr>

,,,,

=iD
O.

rJ<
-

c.t

OJ

Fig.Q.2(d)
!

o,

'll

,,111",,"'','

a.
b.

languages.
{a, b}. Showthat the language f = {* e I-ln,(w) < no(w) } t

State and prove pumping lemma for regular

Let I :

r of

(07 Marks)

not regular.
(05 Marks)

c.

10cs56
Consider the DFA given by the transition table:

:.i:

'1,',,,. D

'

JQo

Qr

9z

Qr

Qr

9:

Qz

9z

Qr

Qr

9+

*Q+

Qt

9z

Draw the table of distinguishabilities for this automaton.


Construct the minimum state equivalent DFA.
Write the language accepted by the DFA.

. ii)
'*"liiil

,r-

,:,,,",

'

(0s Marks)

-K

a.

Defirrd*a
Context-Free Grammar (CFG) and also obtain the CFG's,,,for
fl the following
''dd a
langud$si

----;lma"ww*b"lw
tl
e {0,1}- and n > 2}
ir)
tt)
tr =="{d{bln
L,
'lm + n = K
k &11dfl1,11
andm,n > l}
I
l?^,pr-cr'lm+n

iiD
b.

t,

.:

= {w Jfu1.11*1*od3+lwlmod2}.

,,,

wittx@aductions
'?fu*.
!ri{
... ,:i.-

Consider the CFG

E-+E*T|T
T-+F-T iF
F-+(E)

,:

"

rirrrr

i.r..
..i,,,:,'

...

si.,,:'

(10 Marks)

;,,,,"r,ir

ioi

,tl'-r,

''q.'llr n";

ioi1

Write the leftmost derivation, , rigfuibst derivation and parse tree for the

c.

'0-((1 *0)-0)'.

.j \

Show that the following gramr$si is ambiguous:

S+SbS
S

5 a.
b.

-+

a.

PD{

.
''i''t'
--"-

',,

(04 Marks)

':

ir;':'l

PART - B
ior the following language :
.'

string

r = {wfii"{we

{a,b} *}. Aho, draw the


transition diagtam for the constructed PDA. Write the instantalireorls description (ID) for the
string 'ab$6h}'.
(08 Marks)
Conyefr'{he following CFG to a PDA that accepts the same language Uy e6nntV stack:

Design a

,ii

:::,,,,

E;+$l EIE.nlellr
I -+ r.l ml rol

nlalu

''

l tr* Marks)

nc. Define a deterministic PDA (DPPAI Also, design a DPDA along with transition diagram
,
tt...t",,,,
for the following language: 1= {a"bt'ln > O }.
(07 Marks)
,"r

"' 6 a.

Begin with the grammar


S

-+ aAalbBble

A -+ Cla

clb
C+CDEIe
n -+

o + AlBlab
2 of3

of3