0% found this document useful (0 votes)
5 views20 pages

TOC Notes-1

Uploaded by

0702priyarmane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views20 pages

TOC Notes-1

Uploaded by

0702priyarmane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

M1-6

Finite automala it Epái lon- trausl h oss e- NFA):

The enndel madel NFA e- NFA An NFA WIth o n

callld An e- NFA :
A traa:Hon an Callrd an E- trunsrm,
/Hcei as epai lon brans? hon) i) y. Hure ik a tram:Hom foon
auottr without (ie, na dew ted
a nput inpu mpys emp 4tg
calllel t-trans >HM. tx.ampl, (omaider the FA

b
b, e

From-abave FA ,obArve u olosig 20tn :


moe tan one tramon rm
N FA:
There is a transl Hn
auotr traitrm from as the np.Sothe above FA
NPA

t- cLosURE:

e CLOSURE () 6 eac as

Stats 9ch CH 9eeachable


ondy The erave
t- CL0SURE C) ià:

2).Z e cLOSU RÉ (4) = P Gucd 8(P.€)2 tn add x to t- clasoRE C)

t- COsU RE
k- loSuRF Ca2): ,
Cuimn State Daput Repraenturon
No S (ao,a)= o.)
b s (ao. b)2

..
a
C

a
e) a

Let Comcle the prcfo rcl gepresentatron q t- NF A .


ai

The E- NFa has thrce.6tatea Vo, a, @i aud

alphabta swch Can be deno-el as :


but Cmi uming an

npat agmbol.
then we orte

átate
a;fo C; aud ;fo k on an nput
Change
ten e Jrike

ymi a,
Noat slale
Reprtatin

N
C
"s(w,,j:

The G-NEA
qumhaple
M: (, E, 8, b, F)
Ashere

non

nm emptynk sc g lnpat phabts

funiton
E UE) to 2° Bacd on Hu ur(nt dtate ture can be a tranitrm
to othur statea oith ox withot any nput ymboli.

flacocd
by ¿e
.
é NFA to DFA

é NFA
9wch a can beyimed),
Ag lk.

&katu. The eqw valeel- DFA

Cau be dbta ned

then t-closURE (Vo) I e dtort


NFA,
&tate DrA,

Uop G- cLoSURE (a)

Stip &i- Cornpute the .tranJ Hona fon

Ue trants
DFA. Then, tua & tate

„s Compud ahoan belo a :


Then take 6r closOeE ( P, P.,..., Pm)

Stp 3! state In DFA &


Cmfeuus
ateut One
fnal stak DFA.
roblem:
eonvert the
ollo wmg NFA to lts equvalut DFA.

Solus
DFA i,asp: é-losURE (0): of

Cons ce the Atate [AJ:

8 (A.a) : é-cosURE(&
:e- clo'sU RE (b
(A,a)

lo, a)
)
)

SA.b) :- cLosoRE (Sn(A i6)


:E- cLOSURE (SN (0, b) )

sun inpur is a
&( B.a) :t- cL0sURE (SN (B,a)

(En (B.))
S(8, b): t- cLOSORE
:t- LOSURE &n CIL))

t-closoRE (42)
?2, 34,6,4} c
mput)

becaue, In dtate ,due to é- bramJhms Co

lo. So cu
w) Hyout,
Her
giring yy

to tats &3,4, 6,9


Can be tranyitn
here

leachable tm
shen Input da ài

(Ca): t- cLoS URE (&y(C,a))


S

: e- cLosURE ( Sn 22,3,4.6,9,a))

: 5, 8, 4, 3, 4. &

- 3,4, 5, 6,8, 4}

due to , traw:hons the statcs eucasle

45, 8,4,3,4.6y. Threure


8CCa)= 3, u, 5.6, 8, y = D
shen input ia, bi

S (Eib) t- CLOS URE (Sn (G, b))


: é- cL0sURE (&N 3, 4, 6,9 5, 5)

:2,8,4,3.4, 6}
: 3,4 6,2.8,?} E

Keachable w Hout
npt (ie-) traMI tt m) are
3?,8,4,3. 4. 6J
y E
.Threfore

hen nput is ai
S (D.a):e- closURE (SN (D.a)
t- cLOSURE (sy3,45,.6, &,4}, a))
: (5))
t- CLosURE
.5, 3,4.8,4, 6

:?3,4, 5, 8, 6, D
when input is b:
&(D,b): 6- O.sURE (óN (D b))
• e- Lo sURG (S3, ,6,)) 4,5,

:?3,8,1,34.c
4374i6, 9.8,9)c
Conscr the stale le]:

S lE a)= é-cL0sURE
:
é-cOsURE (f
((3 (E,a))
u6, t 8, 9t,a))
: (5)
: G- cOSURE

:3.46,
15, 8,4,3,4, 6y
5, S,

S6,b): e- cLOSU
(6n (t,b)) RG
:é- ( (34h,
cLOS URE &N 6,,8.9}, b))
(a)
= t-cLosoRE

:}2,84, 3,4.6
: ?i8,9E
13,4e 6,
Snce there ae no
tuble d thu DFA ik ahon bloo table:

D E

The stats c, D, ancl E are final statts, snie 4

pseAet In Ci D and F. The fnal tra m

b a
A

b
DFA
DFA.
NPA eqwvalent

tart
& ho the
q€- NFA

Cnsd the atate le,Ui, :


0n l hplt a:
t- cuesURE (S,(A,a))
S (A.a)-
:
&

e- cLasORF (
SN (?ao.i,4,5, a))
.t-cL0SURE ( 3)
A

hen
S{A-)
nput

:
b:
é- ces RE U (S (A,b))

e- cLosURE (3as

hen put ei
8(A,c) : e oSORE (n (A,c))

.c
The new &tates
below
shown
The trans)frns frm
Cnsdy the ktate [a]:
When inpu

&(B,)= €- cLosURE (SN (B,a))

hen Input b:
& ( B,b) t- LošoRE (s (B,b))
: t- clasURE (6n (4 4i93b))

hen npu c:
S (B, c): €- cLosURG (Sn (B.c))
6- L as o RE (SN ,. ( u,))

hn Inpt a :
:- cLOS URE (S (3 f,a))

when nput bi

s(c,b) é- cosU RE (6N (Cib))

5(e,t): e- casORE (6w(C,)


t- CLosURE

The trauaJfran tasle deftncd DFA


P tHhe obtumd ttn te. torttes labks
A. B aue e i &ho )U n the tble.
a
A B

9btaw-aw NPA WTt- transitns (tr NA) acept detma numbrr&


c them 8btun the tqwvalent DFA.
has
) an OY

(2) n +

aud

Ihe t- NEA sk

0, ,..9

lere, the nocw ne Ma (o, ,


S, Vo, F) he
I1+-,*2, 0, .. }

<fate
0, ),. ..

DEA 6 tu E-cLOs URE g stoxt state €- NFA

8 (A,+) :
e

:E-
é

e-
-clasoeE (SN (4,
cLo sURE (6N
CLOSV RE (a)
o,, ,))
+))

hen npt
S (A,
is:
)
- t
é- cL0sURE (SN (a,

cLasURE ()
B

)
en nput
S
ia O,l.2,....q

(A, {o,!, -..9): é-


:

-
cLosURE

é-ClasUPE
(S
(S
(A, do,
( ao.a},
,. 9) --9))
t6,y-.

8(B, +) e- cLosvRE (s (8,+))


S (B,) - : t-closVRE
E- cLOSURE
óx (B,))
(S(a, ) )
&(B, 40, I,.. 4s) = t- cLos URE (SN (B,0 ,..94))
- 6-CoSURE Cu)
D

S Ce,t) :e- LOs UPE (6 Cc, +))

4Jhen nput is

- 6-cLOsURE. (6)
C6n Ce,)
Jhn nput ik 0,2,.4
S(c, t0;1,2,..9 ) é- = CLOSURE

....:...
Conarole the btate (D]:

tere

8(D,+) e- CLOSO RE (Sn (D, t))

8 (D,)= t- CnsURE (S CD,-)).


when Input is 0, 2,..T

s CD,0J, 4}): €- cl0s URE (SnCD, q)) o,,.


e- ClosURE (&n (, 0?,1, .
.a))

Conarder the Atate lE) )


when put ia t?
E- CLOsURE (Sn CE, t))

when inpwt
= E- CLOSURE (N (E,))

Jhen
8 lE,o,1,
nput. is 9, i,2)..4:

45): é-Cos URE (&N (E, .


o,I,q))
)
: - (tas0RE SN ( ( Us, st, do,ty;.1

G- CLOSURE (uy)

E is tho wu
9btainc.frm A thrsugh

O,,...9

B B
O, ,..9
B

E D

,ty..4
:(e,E,S, Vo, F)
DFA to acept deamal numbot
aj
Z 1t, -,,o, l,2, -.
he Khort state
A IA
stale
the tnal
F:e
equval ent DFA
e- NE4 kst to

e
start s tale
.€-NF4 & 6o the
stort &tatt

DFA
t- losUR E a) ao A

Codr te Atate CAJ :


ohen lnpwt

-
a

S(A.a)e wosuRE (SN (A,a))

B
13heu 3npu b

lonsrdor the stat CBJ


when jnpu
a !
SB,a) e- CLOSU RE (6n (B,«))
*e-casURE (8N (144,,3,a))

8B,b): e- coSURE (&NB,b))


(4vg
(aRy1)

Consrdn H Atat CcJ:


wen npu a:
S(C,a): E wsORE 1heu npw bi
(Gn(C.a)) s(Ci): G-CL0SURc (sN (C,b))
- é- cLo5 URE (d (1, b))
Couidr the state lB]:

S(Bra): €- c0SURE (6n CB.a))

G- cLOSURe (a)
B

en npu b:
S (B.b)= é- (&N (B, ))
cLosu RE

: C- LosURE (6N (4na}, ))


= é- clos URE (ao)c'

..

&(L,a) : é- clasuRE (d (Cia))


- - cLos RE (dN(2ass,a))
G- cLoas vRF.()

Jheu nput bi

E- closURE (SN (3965,b))


t-LOSo RE (a)
A
Ahown belo:

B
b
A B.

qüvaieit DFA

Tae
stast Sat qt- N FA & o ttue Stost <hate
t- ciasURE Ca) s,
Qi,4A)

8(A.a)= e- laSO RE (n (,a))

¿(A5)= casOTE
- é- casURE
-e-cleSDRC
(SN
C&n
()
(,
(,b))
4,,4>5, b)
Consrder te €- NF:

< Compute t- cLos URE 9 cack alale


4- Cmvrk the auto ada to DTA.

(- NFA

1: Th tclaso aclshatetau heCmputc stown bele

i
&

e- cLasURE (P): P

9. The DEA Can be oblded as shoLJn belo w!

DrA.

tte state A]:


Cmird
when ectkostRE
tnpu
a))
S(A.e). encl0sURE (SN (A.

Corekat

:t- clesURE (N (3 PS, 6))


t- closURE (4)
:e-wosO RE .ý)

&(B, s) 6- cLBSUZE (6u (B.))

- t-closU RE (,r)

:G- cLss0 2E (?.4s, )

:E-cLasuRE ( (ors, b))


• t-Ces
2Fy, T, )
The trnlhm ta.ble wih tramittm

a
A 4: B..

each
(3) Compute Ahete
frm Hhg foy.t-NFA:

t- lOsURE (a)
e bho DA, NEA nel t-NP+

\:
DFA

a, ,) S,Ne,
Ay
M>(a,
NA is

E,8,
a5
9F)
tuple
An é -

N=(2Z,
hon,
NEA IA

8, as
a 5 tuple
F)

Thore Can
k n an lnput
mre tranwy hm as tase
be eoone o nm ore
tranttns rom a &tate )th
mbel w or

Inpw
re nunnb
fruuwtms Relatvedy'more dra bens
13hen Compared wry N FA
tayto Combel
to cnyuet
Cnpreum.
powtul than DFA
Eie Mre po0 usretu than NFA
ail be in eny Jt wil be
ttate
n
more tan

You might also like