+ All Categories
Home > Documents > Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

Date post: 04-Jun-2018
Category:
Upload: rohit-ahlawat
View: 228 times
Download: 0 times
Share this document with a friend
16
 Lovely Professional University  TERM PAPER  CSE 526  Software Testing and Qality Assran!e To"i!# Co$"arison of varios %inite state Ma!&ines for testing  "r"oses for a given in"t ' S($itted )y#  *a$e# Ro&it Roll *o# A+5 Reg *o# ++,,,556  S($itted To#  Mr' Sd&ans Pra-as& Tiwari
Transcript

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 1/16

  Lovely Professional University

 

TERM PAPER 

  CSE – 526

  Software Testing and Qality Assran!e

To"i!# Co$"arison of varios %inite state Ma!&ines for testing

 "r"oses for a given in"t'

S($itted )y#

 *a$e# Ro&it

Roll *o# A+5

Reg *o# ++,,,556

 

S($itted To#

  Mr' Sd&ans Pra-as& Tiwari

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 2/16

Acknowledgement:-

. wold e/"ress $y gratitde to all t&ose w&o gave $e t&e "ossi(ility to !o$"lete

t&is ter$ wor-' . want to t&an- t&e de"art$ent of CSE0526 for giving $e

 "er$ission to !o$$en!e t&is wor- in t&e first instan!e and to se t&e resear!&

data'

. a$ dee"ly inde(ted to $y tea!&er Mr' Sd&ans& Pra-as& Tiwari w&ose

sggestions and en!orage$ent &el"ed $e in all ti$e of resear!& for writing t&is

ter$ wor-'

. will always (e t&an-fl to $y tea!&er for s""ort and gidan!e dring

!o$"letion of t&e ter$ "a"er' . also e/"ress $y t&an-s to $y friends and $y!lass$ates for en!oraging $e to !o$"lete t&e ter$ "a"er'

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 3/16

Introduction:

 

T&e si$"lest ty"e of !o$"ting $a!&ine t&at is wort& !onsidering is !alled a1finite state $a!&ine' As it &a""ens3 t&e finite state $a!&ine is also a sefl a""roa!& to $any

 "ro(le$s in software ar!&ite!tre3 only in t&is !ase yo dont (ild one yo si$late it'

Essentially a finite state $a!&ine !onsists of a n$(er of states – finite natrally4 &en a

sy$(ol3 a !&ara!ter fro$ so$e al"&a(et say3 is in"t to t&e $a!&ine it !&anges state in s!& a

way t&at t&e ne/t state de"ends only on t&e !rrent state and t&e in"t sy$(ol'

 *oti!e t&at t&is is $ore so"&isti!ated t&an yo $ig&t t&in- (e!ase in"tting t&e sa$e sy$(ol

doesnt always "rod!e t&e sa$e (e&avior or reslt (e!ase of t&e !&ange of state'

• T&e new state de"ends on t&e old state and t&e in"t'

&at t&is $eans t&at t&e entire &istory of t&e $a!&ine is s$$aried in its !rrent state' All t&at

$atters is t&e state t&at it is in and not &ow it rea!&ed t&is state' )efore yo write off t&e finite

state $a!&ine as so fee(le as to (e not wort& !onsidering as a $odel of !o$"tation it is wort& "ointing ot t&at as yo !an &ave as $any states as yo !are to invent t&e $a!&ine !an re!ord

ar(itrarily long &istories' All yo need is a state for ea!& of t&e "ossi(le "ast &istories and t&en

t&e state t&at yo find t&e $a!&ine in is an indi!ation of not only its !rrent state (t &ow it

arrived in t&at state')e!ase a finite state $a!&ine !an re"resent any &istory and a rea!tion3 (y regarding t&e !&ange

of state as a res"onse to t&e &istory3 it &as (een arged t&at it is a sffi!ient $odel of &$an (e&avior i'e' &$ans are finite state $a!&ines'

.f yo -now so$e "ro(a(ility t&eory yo will re!ognie a !onne!tion (etween finite state$a!&ines and Mar-ov !&ains' A Mar-ov !&ain s$s " t&e "ast &istory in ter$s of t&e !rrent

state and t&e "ro(a(ility of transition to t&e ne/t state only de"ends on t&e !rrent state' T&e

Mar-ov !&ain is a sort of "ro(a(ilisti! version of t&e finite state $a!&ine

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 4/16

Representation of Finite State Machines :

  7ra"&i!al re"resentation of a %inite State Ma!&ine

8ere t&e nodes are re"resenting t&e states of t&e $a!&ines and t&e vales on t&e arrows

re"resents t&e different in"ts given to different states of fiite state $a!&ine and ot"t !o$ing

fro$ t&at state'

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 5/16

Ta(lar 9es!ri"tion of %inite0State Ma!&ine#'

current state input symbol next state

start state f , g

f + &

g , g

g + &

  & , g

& + &

ypes of Finite State Machines :

:n t&e (asis of t&e ot"t generating s!&e$es t&e finite state $a!&ine are divided in two $a;or

!ategories w&i!& are#

+' 9eter$inisti! %inite State Ma!&ines <9eter$inisti! %inite Ato$ata=

2' *on09eter$inisti! %inite State Ma!&ines <*on09eter$inisti! %inite Ato$ata=

!eterministic Finite Automata "!FA#:

.t is a finite state $a!&ine t&at a!!e"ts>re;e!ts finite strings of sy$(ols and only "rod!es a

ni?e !o$"tation <or rn= of t&e ato$aton for ea!& in"t string' 9eter$inisti! refers to t&e

ni?eness of t&e !o$"tation' .n sear!& of si$"lest $odels to !a"tre t&e finite state $a!&ines3

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 6/16

M!Cllo!& and Pitts were a$ong t&e first resear!&ers to introd!e a !on!e"t si$ilar to finite

ato$aton in +@B'

T&e figre on t&e rig&t illstrates a deter$inisti! finite ato$aton sing a state diagra$' .n t&e

ato$aton3 t&ere are t&ree states# S,3 S+3 and S2 <denoted gra"&i!ally (y !ir!les=' T&e

ato$aton ta-es a finite se?en!e of ,s and +s as in"t' %or ea!& state3 t&ere is a transition arrow

leading ot to a ne/t state for (ot& , and +' U"on reading a sy$(ol3 a 9%A

 ;$"s deterministically fro$ a state to anot&er (y following t&e transition arrow' %or e/a$"le3

if t&e ato$aton is !rrently in state S, and !rrent in"t sy$(ol is + t&en it deter$inisti!ally

 ;$"s to state S+' A 9%A &as a start state <denoted gra"&i!ally (y an arrow !o$ing in fro$

now&ere= w&ere !o$"tations (egin3 and a set of accept states <denoted gra"&i!ally (y a do(le

!ir!le= w&i!& &el" define w&en a !o$"tation is s!!essfl'

A 9%A is defined as an a(stra!t $at&e$ati!al !on!e"t3 (t de to t&e deter$inisti! natre of a

9%A3 it is i$"le$enta(le in &ardware and software for solving varios s"e!ifi! "ro(le$s' %or

e/a$"le3 a 9%A !an $odel software t&at de!ides w&et&er or not online ser0in"t s!& as e$ail

addresses are valid'

9%As re!ognie e/a!tly t&e set of reglar langages w&i!& are3 a$ong ot&er t&ings3 sefl for

doing le/i!al analysis and "attern $at!&ing' 9%As !an (e (ilt fro$ nondeter$inisti! finite 

ato$ata t&rog& t&e  "ower set !onstr!tion

Formal !efinition :

A deter$inisti! finite ato$aton M  is a 50t"le3 <Q3 3 D3 q03 F =3 !onsisting of 

• a finite set of  states <Q=

• a finite set of in"t sy$(ols !alled t&e al"&a(et <=

• a transition fn!tion <D # Q  F Q=

• a start state <q0 ∈ Q=

• a set of final states < F  ⊆ Q=

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 7/16

Let w = a1a2 ... an (e a string over t&e al"&a(et ' T&e ato$aton M  a!!e"ts t&e string w if a

se?en!e of states3 r 0 ,r 1 , ..., r n3 e/ists in Q wit& t&e following !onditions#

+' r 0 G q0

2' r i+1 G D<r i3 ai+1=3 for i G 0, ..., n−1

3. r n ∈  F '

.n words3

 T&e first !ondition says t&at t&e $a!&ine starts in t&e start state q,'

T&e se!ond !ondition says t&at given ea!& !&ara!ter of string w3 t&e $a!&ine will

transition fro$ state to state a!!ording to t&e transition fn!tion D'

T&e last !ondition says t&at t&e $a!&ine a!!e"ts w if t&e last in"t of w !ases t&e

$a!&ine to &alt in one of t&e a!!e"ting states'

 :t&erwise3 it is said t&at t&e ato$aton rejects t&e string' T&e set of strings M  a!!e"ts is

t&e langage re!ognied (y M  and t&is langage is denoted (y L(M)'

 *ote # A deter$inisti! finite ato$aton wit&ot a!!e"t states and wit&ot a starting state is-nown as a transition syste$ or se$i ato$ation'

E/a$"le#

 M  G <Q3 3 D3 q03 F = w&ere

• Q G H +3  2I3

• G H,3 +I3

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 8/16

• q0 G  +3

•  F  G H +I3 and

• D is defined (y t&e following state transition ta(le#

table for DFA :

$ %

 S %  2  +

 S &  +  2

Modes of !FA:

A 9%A re"resenting a reglar langage !an (e sed eit&er in

Accepting mode:

.n t&e a!!e"t $ode an in"t string is "rovided w&i!& t&e ato$aton !an read

in left to rig&t3 one sy$(ol at a ti$e' T&e !o$"tation (egins at t&e start state and

 "ro!eeds (y reading t&e first sy$(ol fro$ t&e in"t string and following t&e state

transition !orres"onding to t&at sy$(ol' T&e syste$ !ontines reading sy$(ols and

following transitions ntil t&ere are no $ore sy$(ols in t&e in"t3 w&i!& $ar-s t&e end

of t&e !o$"tation' .f after all in"t sy$(ols &ave (een "ro!essed t&e syste$ is in an

a!!e"t state t&en we -now t&at t&e in"t string was indeed "art of t&e langage3 and it is

said to (e a!!e"ted3 ot&erwise it is not "art of t&e langage and it is not a!!e"ted'

 

'enerating mode:

.t is si$ilar e/!e"t t&at rat&er t&an validating an in"t string its goal is to

 "rod!e a list of all t&e strings in t&e langage' .nstead of following a single transition

ot of ea!& state3 it follows all of t&e$' .n "ra!ti!e t&is !an (e a!!o$"lis&ed (y $assive "arallelis$ <&aving t&e "rogra$ (ran!& into two or $ore "ro!esses ea!& ti$e it is fa!ed

wit& a de!ision= or t&rog& re!rsion' As (efore3 t&e !o$"tation (egins at t&e start state

and t&en "ro!eeds to follow ea!& availa(le transition3 -ee"ing tra!- of w&i!& (ran!&es it

too-' Every ti$e t&e ato$aton finds itself in an a!!e"t state it -nows t&at t&e se?en!e

of (ran!&es it too- for$s a valid string in t&e langage and it adds t&at string to t&e list

t&at it is generating' .f t&e langage t&is ato$aton des!ri(es is infinite <i'e' !ontains an

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 9/16

infinite n$(er or strings3 s!& as Jall t&e (inary string wit& an even n$(er of ,s= t&en

t&e !o$"tation will never &alt' 7iven t&at reglar langages are3 in general3 infinite3

ato$ata in t&e generating $ode tends to (e $ore of a t&eoreti!al !onstr!t

(losure properties of !FA :

  .f 9%A re!ognie t&e langages t&at are o(tained (y a""lying

an o"eration on t&e 9%A re!ognia(le langages t&en 9%As are said to (e !losed nder  t&e

o"eration' T&e 9%As are !losed nder t&e following o"erations'

• Union

• .nterse!tion

• Con!atenation

•  *egation

• Reversal

• Qotient

• S(stittion

Ad)antages and !isad)antages of !FA :

9%As were invented to $odel real w!rld   finite state $a!&ines in !ontrast to t&e !on!e"t of

a Tring $a!&ine3 w&i!& was too general to stdy "ro"erties of real world $a!&ines'

9%As are one of t&e $ost "ra!ti!al $odels of !o$"tation3 sin!e t&ere is a trivial linear ti$e3

!onstant0s"a!e3 online algorit&$ to si$late a 9%A on a strea$ of in"t' Also3 t&ere are

effi!ient algorit&$s to find a 9%A re!ogniing#

• t&e !o$"le$ent of t&e langage re!ognied (y a given 9%A'

• t&e nion>interse!tion of t&e langages re!ognied (y two given 9%As'

)e!ase 9%As !an (e red!ed to a can!nical "!rm t&ere are also effi!ient

algorit&$s to deter$ine#

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 10/16

• w&et&er a 9%A a!!e"ts any strings

• w&et&er a 9%A a!!e"ts all strings

• w&et&er two 9%As re!ognie t&e sa$e langage

• t&e 9%A wit& a $ini$$ n$(er of states for a "arti!lar reglar langage

:n t&e ot&er &and3 finite state ato$ata are of stri!tly li$ited "ower in t&e langages t&ey !an

re!ognieK $any si$"le langages3 in!lding any "ro(le$ t&at re?ires $ore t&an !onstant

s"a!e to solve3 !annot (e re!ognied (y a 9%A' T&e !lassi!al e/a$"le of a si$"ly des!ri(ed

langage t&at no 9%A !an re!ognie is (ra!-et langage3 i'e'3 langage t&at !onsists of "ro"erly

 "aired (ra!-ets s!& as word J<<=<==J' *o 9%A !an re!ognie t&e (ra!-et langage (e!ase t&ere

is no li$it to re!rsion3 i'e'3 one !an always e$(ed anot&er "air of (ra!-ets inside' .t wold

re?ire an infinite a$ont of states to re!ognie'

*on-!eterministic Finite Automata "*!FA#:

.n ato$ata t&eory3 a nondeter$inisti! finite ato$aton <*9%A=3 or nondeter$inisti! finite state

$a!&ine3 is a finite state $a!&ine t&at

9oes not re?ire in"t sy$(ols for state transitions

 .s !a"a(le of transitioning to ero or two or $ore states for a given start state and in"t

sy$(ol'

T&is distingis&es it fro$ a deter$inisti! finite ato$aton <9%A=3 in w&i!& all transitions areni?ely deter$ined and in w&i!& an in"t sy$(ol is re?ired for all state transitions' Alt&og&

 *9%A and 9%A &ave distin!t definitions3 all *9%As !an (e translated to e?ivalent 9%As

sing t&e s(set !onstr!tion algorit&$3 i'e'3 !onstr!ted 9%As and t&eir !orres"onding *9%As

re!ognie t&e sa$e for$al langage' Li-e 9%As3 *9%As only re!ognie reglar langages'

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 11/16

 *9%As were introd!ed in +@5@ (y Mi!&ael :' Ra(in and 9ana S!ott3 w&o also s&owed t&eir

e?ivalen!e to 9%As'

 *9%As &ave (een generalied in $lti"le ways3 e'g'3 nondeter$inisti! finite ato$aton wit& 0

$oves3 "s&down ato$aton3 0ato$aton3 and "ro(a(ilisti! ato$ata'

Formal !efinition :

An #$F% is re"resented for$ally (y a 50t"le3 <Q3 3 N3 q03 F =3 !onsisting of 

• a finite set of states Q

• a finite set of  in"t sy$(ols 

• a transition relation N # Q  F & <Q='

• an initial  <or start = state q, ∈ Q

• a set of states F  distingis&ed as acceptin'  <or "inal = states  F  ⊆ Q'

8ere3 & <Q= denotes t&e "ower set of Q' Let w = a1a2 ... an (e a word over t&e al"&a(et ' T&e

ato$aton M  a!!e"ts t&e word w if a se?en!e of states3 r 0 ,r 1 , ..., r n3 e/ists in Q wit& t&e

following !onditions#

+' r 0 G q0

2. r i+1 ∈ N<r i3 ai+1=3 for i G 0, ..., n−1

3. r n ∈  F '

.n words3

t&e first !ondition says t&at t&e $a!&ine starts in t&e start state q,'

 T&e se!ond !ondition says t&at given ea!& !&ara!ter of string w3 t&e $a!&ine will

transition fro$ state to state a!!ording to t&e transition relation N'

T&e last !ondition says t&at t&e $a!&ine a!!e"ts w if t&e last in"t of w !ases t&e

$a!&ine to &alt in one of t&e a!!e"ting states'

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 12/16

  :t&erwise3 it is said t&at t&e ato$aton rejects  t&e string' T&e set of strings M  a!!e"ts is

t&e langage rec!'nied  (y M  and t&is langage is denoted (y L(M)'

e !an also define L(M) in ter$s of NO# Q O F & <Q= s!& t&at#

+' NO<r 3 =G Hr I w&ere is t&e e$"ty string3 and

2. .f  ∈ O3 a ∈ 3 and NO<r 3 /=GHr +3 r 23'''3 r - I t&en NO<r 3 a=G N<r +3 a=∪'''∪N<r - 3 a='

 *ow L<M= G Hw NO<?,3 w=  F   ∅I'

 *ote t&at t&ere is a single initial state3 w&i!& is not ne!essary' So$eti$es3 *9%As are defined

wit& a set of initial states' T&ere is an easy !onstr!tion t&at translates a *9%A wit& $lti"le

initial states to a *9%A wit& single initial state3 w&i!& "rovides a !onvenient notation'

E/a$"le #

T&e state diagra$ for M 

Let M  (e a *9%A3 wit& a (inary al"&a(et3 t&at deter$ines if t&e in"t ends wit& a +'

In formal notation, let M = ({ p, q}, {0, 1}, ,  p, {q}! "#ere t#e tran$ition relation

%an be &efine& b' t#i$ $tate tran$ition table:

$ %

 p H pI H p3qI

q ∅ ∅

 *ote t&at N< p3+= &as $ore t&an one state t&erefore M  is nondeter$inisti!' T&e langage of M  !an

 (e des!ri(ed (y t&e reglar langage given (y t&e reglar e/"ression <,+=O+'

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 13/16

9eter$inisti! finite ato$aton <9%A=# .n t&is ato$aton3 for ea!& state and al"&a(et3 t&e

transition relation &as e/a!tly one state'

 *ondeter$inisti! finite ato$aton wit& 0$oves<*9%A0=# T&is ato$aton re"la!es t&e

transition relation wit& t&e one t&at allows t&e e$"ty string  as a "ossi(le in"t3 so t&e

transition relation is defined as N #Q  < ∪HI= F & <Q='

+,ui)alence to !FA :

  %or ea!& *9%A3 t&ere is a 9%A s!& t&at (ot& re!ognie t&e sa$e for$al 

langage' T&e 9%A !an (e !onstr!ted sing t&e  "owerset !onstr!tion' .t is i$"ortant in t&eory

 (e!ase it esta(lis&es t&at *9%As3 des"ite t&eir additional fle/i(ility3 are na(le to re!ognie

any langage t&at !annot (e re!ognied (y so$e 9%A' .t is also i$"ortant in "ra!ti!e for

!onverting easier0to0!onstr!t *9%As into $ore effi!iently e/e!ta(le 9%As' 8owever3 if t&e

 *9%A &as n states3 t&e reslting 9%A $ay &ave " to 2 n states3 an e/"onentially larger n$(er3

w&i!& so$eti$es $a-es t&e !onstr!tion i$"ra!ti!al for large *9%As'

(losure roperties :

 *9%As are said to (e !losed nder  a < (inary>nary= o"erator if *9%As re!ognie t&e langages

t&at are o(tained (y a""lying t&e o"eration on t&e *9%A re!ognia(le langages' T&e *9%As

are !losed nder t&e following o"erations'

• Union

• .nterse!tion

• Con!atenation

•  *egation

• leene !losre

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 14/16

Sin!e *9%As are e?ivalent to nondeter$inisti! finite ato$aton wit& 0$oves<*9%A0=3 t&e

a(ove !losres are "roved sing !losre "ro"erties of *9%A0' T&e a(ove !losre "ro"erties

i$"ly t&at *9%As only re!ognie reglar langages'

roperties of *!FA :

T&e $a!&ine starts in t&e s"e!ified initial state and reads in a string of sy$(ols fro$

its al"&a(et' T&e ato$aton ses t&e state transition fn!tion N to deter$ine t&e ne/t state sing

t&e !rrent state3 and t&e sy$(ol ;st read or t&e e$"ty string' 8owever3 Jt&e ne/t state of an

 *9%A de"ends not only on t&e !rrent in"t event3 (t also on an ar(itrary n$(er of

s(se?ent in"t events' Until t&ese s(se?ent events o!!r it is not "ossi(le to deter$ine

w&i!& state t&e $a!&ine is inJ' .f3 w&en t&e ato$aton &as finis&ed reading3 it is in an a!!e"ting

state3 t&e *9%A is said to a!!e"t t&e string3 ot&erwise it is said to re;e!t t&e string'

T&e set of all strings a!!e"ted (y an *9%A is t&e langage t&e *9%A a!!e"ts' T&is langage is

a reglar langage' 

%or every *9%A a deter$inisti! finite ato$aton <9%A= !an (e fond t&at a!!e"ts t&e sa$e

langage' T&erefore it is "ossi(le to !onvert an e/isting *9%A into a 9%A for t&e "r"ose of

i$"le$enting a <"er&a"s= si$"ler $a!&ine' T&is !an (e "erfor$ed sing t&e "ower set 

!onstr!tion3 w&i!& $ay lead to an e/"onential rise in t&e n$(er of ne!essary states' A for$al

 "roof of t&e "ower set !onstr!tion is given &ere.

Implementation of *!FA :

T&ere are $any ways to i$"le$ent a *9%A#

• Convert to t&e e?ivalent 9%A' .n so$e !ases t&is $ay !ase e/"onential (low" in t&e

sie of t&e ato$aton and t&s a/iliary s"a!e "ro"ortional to t&e n$(er of states in t&e *9%A <as storage of t&e state vale re?ires at $ost one (it for every state in t&e *9%A=

• ee" a set data str!tre of all states w&i!& t&e $a!&ine $ig&t !rrently (e in' :n t&e

!ons$"tion of t&e last in"t sy$(ol3 if one of t&ese states is a final state3 t&e $a!&ine

a!!e"ts t&e string' .n t&e worst !ase3 t&is $ay re?ire a/iliary s"a!e "ro"ortional to t&e

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 15/16

n$(er of states in t&e *9%AK if t&e set str!tre ses one (it "er *9%A state3 t&en t&is

soltion is e/a!tly e?ivalent to t&e a(ove'

• Create $lti"le !o"ies' %or ea!& n way de!ision3 t&e *9%A !reates " to !o"ies

of t&e $a!&ine' Ea!& will enter a se"arate state' .f3 "on !ons$ing t&e last in"t sy$(ol3 atleast one !o"y of t&e *9%A is in t&e a!!e"ting state3 t&e *9%A will a!!e"t' <T&is3 too3

re?ires linear storage wit& res"e!t to t&e n$(er of *9%A states3 as t&ere !an (e one

$a!&ine for every *9%A state'=

• E/"li!itly "ro"agate to-ens t&rog& t&e transition str!tre of t&e *9%A and $at!&

w&enever a to-en rea!&es t&e final state' T&is is so$eti$es sefl w&en t&e *9%A s&old

en!ode additional !onte/t a(ot t&e events t&at triggered t&e transition' <%or an

i$"le$entation t&at ses t&is te!&ni?e to -ee" tra!- of o(;e!t referen!es &ave a loo- at

Tra!e$at!&es'=

Application of *!FA :

 *%As and 9%As are e?ivalent in t&at if a langage is re!ognied (y an *%A3 it is also

re!ognied (y a 9%A and vi!e versa' T&e esta(lis&$ent of s!& e?ivalen!e is i$"ortant and

sefl' .t is sefl (e!ase !onstr!ting an *%A to re!ognie a given langage is so$eti$es

$!& easier t&an !onstr!ting a 9%A for t&at langage' .t is i$"ortant (e!ase *%As !an (e

sed to red!e t&e !o$"le/ity of t&e $at&e$ati!al wor- re?ired to esta(lis& $any i$"ortant

 "ro"erties in t&e t&eory of !o$"tation' %or e/a$"le3 it is $!& easier to "rove !losre 

 "ro"erties of  reglar langages sing *%As t&an 9%As'

• T&e nion of two reglar langages is reglar'

• T&e !on!atenation of two reglar langages is reglar' 

References :

+' T&eory of Co$"ter S!ien!e 0 'L'P S&ar$a

2. www'te!&news'!o$

3. www'!seed'!o'in

' Ato$ation T&eory 0 ' Prasad

8/13/2019 Term Paper on Different Types of Finite State Machines - Rohit Ahlawat

http://slidepdf.com/reader/full/term-paper-on-different-types-of-finite-state-machines-rohit-ahlawat 16/16


Recommended