Basic Concept ang
UNIT Automata Theory
|
CONTENTS )
cnn BA to 140,
Part-1 + Introduction to Theory
sf Compotatien: Automata,
Alphabets, Symbol, Strings,
Formal Languages,
Computability and Compleity
Part + Determinisie Pnite oxcenscww nnn TAA €0 1-94
Antomaten (DFA) : Defisition,
Representation, Acceptability
oft String and Language
Part. NenDierniti iit eon T9601
‘Automaton (NFA) oa
Part-t + Bguiealence of DFA and
NPA, NPA with Transition,
Equivalence of NFA with
and without eTransiton
sve IATA to 1-218
var 208
5: Tate Anon win vata
‘Outpat : Moore Machine, es.
ea tn, Ete
tho nel ae
ear
fom hate
ashes
Samat
cpicveal
AACSITSem4)
Basic Concept & Automata Theory
rurodustiont Theory of Computation: Automata, Alphabets
gym Srings,Fomal Lanawogeo, Compute and Compleiy>
ee
2A (CSIT-Sem4)
Aci
Tong Answer Type and Medium Answer Type Questions
Gua] What do you understand by term alphabets and string
{in automata theory ? Explain.
ARES
Alphabet:
et abot is afte, nonempty set of abel
Ln ibn’ nal Repti
Aaacanrntion torn ofthe Latin alphabet (2 B.)or digit such 280,
torepresent aymbnls.
Forexanple
Ee label
hia the alphabet composed bythe symbols, bande.
string:
1. Astring (or word isa sequence
diets
2 Forexample given the alphabet
E=lo,bcl
‘We can bl soveral strings using the ambolsa, band:
abe
‘of symbols from some alphabets oF
abeabeabcabeabe
Guede] Feplain the term language in reference to automata
‘theory with example.
‘Answer
4, Alanguageiaset of ll strings chosen from some *, where Zis particular
alphabet.
2. His an alphabet and Z.c3*,then Lisa language over alphabet
43. Alanguage over need not include strings with ll the symbols of So
nce wehave established that Lis language over Z, we also know that
Tanguage over any alphabet whichis superset of 2oro Astmata& Formal Langoaes Acar, |
‘hear of Automat
‘4 ese ran nat htm NEG
shouldbe finite
can bave an nite number ofsrings but reat,
lt
Although they
‘rings drawn from one fixed and finite alphabets.
Forexample:
1 English words area st of strings over the alphabets that consi
a
theleter
‘The language ofl rings consiating of Os fellowed hyn 1
a20is ‘FOG
(01,001, 00011.)
4. Thesotofstrngs ove and I with equal number of0 and tig
(0,10, 011, 1010, 010, 10,
Bae HS | Explain arithmetic expression with example,
1A arhmetiexrsson (AB) is ail ombination of input
that ae edt compater or haan beingand able to snewer de
result
2. The recursive definition may be defined for validity ofan arithmetic
expression. The definition includes
‘4 Anynumber (positive, nogative or zero) isin AB.
bh Ife'isin AB then
i (ais also in AB,
fi -eisatoin AB,
© Ia'and'8'are in AE, then the following will also be in AE.
i a+b
i ab
ii ab
2
ob
6 borat*b (Exponentaton)
Then Hh
(4+8)*2isvalidexpression but
465)*2isn00 ont
QuetA] Define the grammar.
4A (CSIT Sem) Basie Concept & Automata Theory
is finite non-empty set of terminals, Sometimes alo represented by =
or V,- Generally terminal are represented by a,b, ¢, 3,3, 2, 4,Pr¥
3. Pistinte set whose elements areinthe form «+f. Where cand pare
strings, made up by combination of Vand Tice, (V7). «has atleast
Se aymbol from V. Element of Pare alld predutions ex production
rule or rewriting rules,
4, Sisepecalvariable/non-terminal known a starting symbol.
PART-2
‘Deterministic Finite Automaton (DFA) : Definition,
Representation, Acceptability ofa String and Language.
2
iene:
‘automata (DFA) and how itis represented ?
‘OR
Define Deterministic Finite Automata (DFA).
Dna aot waited
‘Ae i ect ea
‘fmNton—
te automata et of five tuples and represented as
2-—-Arteerministic init
M=10,2(laof)
Where,
QA non-empty finite set of states present inthe finite contol
Gy 8 Gy
‘Anon-empty finite set of input symbols.
‘Tis a transition function that takes two arguments, astate and an
~fnput symbol, it returns a single state. The 5 is ‘represented as
B:Q*E +9
state in@.
es/accepting states from the set
a
sr minis, feorresponding ta
aly one
state Le, there
au
dy Iti starting state one ofthe
“Bs It is non-empty set of final sta
belonging to @.
3. Let'’ia the state and abe the input sym
Function.
bol pasted to the transition15AC
a Lanewaes (carp,
‘Maryan Formal Mees
ett, mny tee new ae
afistheospst oo tanto funtion i888 allows
negetalnmeeen ca
rena ist teh TS
oats | Construct @ DFA for the language that contin,
strings ending With ©
‘Taswer
lt M=(Q,%,5.%F1b04 DPA
inital tate =a)
(o.
Pe final state = lf
Q
sun —(Ge-—*
7.177. ] Define Deterministic Finite Automata (DFA) and design
\ZDPA that accepls the binary number whose equivalent is divisible
ARTO 201
bys.
iow]
DPA:RefeQ 15 .
‘Numerical : eae
Got] eww Dea
DPA forte
mals EA
Baie Concept & Automata Theory
{6A (CSIT-Sem-)
rigiss.
‘Answer,
Fig: 182.
Design a FA which accepts set of strings containing
Qu
ly four 1's in every string over = (0,
TARTU 9014-15, Marks 05,
‘Answer
such ag 1111, 0101011, 011013000.
0.
DPA should acept the strings s
Let DPA be M=(Q,5,5,9¢7)
Inthis g, is dead state.
‘Que li0, | Design a DFA for the language
L= lw :every run of a's has either two three
‘Answer
‘The transition diagram for languageLAACCaTTSom-) _ Bae Comp Anos DT
gy gy
» 6
We koow that fis regular than complement of L that is Zi ls
hb 1
meta) regular. Tht
egy) be aA hat cet langage then DPA tat
GST] ore the fit atoms which acetal the ar sects langusge 8
ontaining both 11 and 010 as sub-sring® bl H=(,3.809-P)
meal awh aspen flags Litany an =
1 DA atonal ate and every Gal stl ton
Thee of strings forthe languages 110101, 1100102, 101011, ‘4. Thon the required DFA's
2 Thostrng ibe acted bythe DFA both the sub-equence .
i ae present. 7 Mand -@©— » €
‘Both and 010 can fiw eae other in the language : ©
F] ora DFA of tollowing over (11:
So, the DFA corresponding to the given language can be represented by
ings with even number of sand even number of 1's.
i alls
LA Scag of length at ost 5.
i. yaaa wp inert 00 1086.00.01 2108
‘oe The transition diagram isgiven by
Phe ease ransiion diseram.
pou accep the string of lng 5 ssh a 101100000 mn,
OL, ote The transition diagram iegiven by1-9A(CSTT-Sem.4)
[ae LIA] What do you mean by language of « DFA?
1. The set of al trings that result in a sequence of state transition from
stat state toan accepting state.
2 Now we can define the language of a DFA M = (@, 2, 8, 9). This
language is denoted by Li), and defined by
LM) = $w / 5qy,w) isin F)
3, The language of Mis the set of strings (iw) that take the start state q, to
one ofthe accepting states.
4 IFLis LON for some deterministic finite automata, then we say L is a
‘regular language,
Non-Deterministic Finite Automaton (NFA).
Questions-Answers
ata (NFA/NDFA) ? How is it represented ?
(Answer ” —
1. AGinite automata is said tobe non de
2
ie
Ente apt
Il ae ofA end mea
\ %
140A (CSTT-Sem-) Basic Concept & Automata Theory
[Fs Anonempty finite se of final states and member of @
£. fe ls transition function that takee a state from @ and an spat
ta from © and Bis represented
hie 5: Qs ule)» es
The graphical repre lew
ta & & &<=8.
“iss ] construct aNFA for the language Z which accept all the
seen which the third symbol from right end is always @ over
: a oil (ART 2016-16; Marks 10]
rhein ow
PAbe
re M=@2,5.q9P)
‘The bis defined as follows
ab
Fig: 116.1.
Gaei7,| Design a NFA for the language L which accepts all
strings over (0,1) that have at least two consecutive 0's or 1's.
misitis clear that NFA wll acept the strings of the pattems ike
By the:
(00, 11, 101000, 101100,
‘The transition diagram is given by
orTheory of Automata & Formal Langusdes
GER Won do you underatand by lanewage of NEA?
Pan NFA acopis a string w if tis possible t0 make any sequence
sn NPA ace eile reading the characters of, abd g0 from ty
Start state to any accepting state.
2. The language of NFAM = (Q, 35,45 F)is defined by
UM) = wig, OF #4)
TALACSIT Sem 4
4. Lapisthesetoftrings win suchtbat 6 (4) contain atleast ong
creping sae
Equivalence of DFA and NFA, NFA with e-Transition,
Equivalence of NFA with and without ¢-Transition.
Questions-Answers
"GS6TA07] What do you mean by NFA with c-transition ? Wh
with etransition ? Why we
needit?
‘Answer
Ifa finite automata: it
Iain stomata lied to permit transition without input symbols,
atone ith eo, ene or more transition on input symbols, then we get NFA
enetd tte contents io diferent
‘example : We have design NFA for accepting language
senses Ls (ab)* Goat)
is problem frst divide the language
pair
First construct NFA for L, TyUly Where L, = (ab)* and L, =aa*
©--Q--©
Feta *
‘Secondly, we construct NFA for L
1-12 (CST Sem) Basic Concept & Automata Theory
ee
Start
Fig1.192,
ow we combine two transition diagram se, Fig, 119.1 and 102a8fllows
wig: 1198.
Jn this transition diagram we use e-transitions, to reach at states q, andq,-
GasTGR Explain the working of e-closure, with a suitable
example.
“esting in * willbe accepted by NFA with c-transition, if there exists
a erak ne path corresponding ‘w" which starts from initial state and
fends at final state. :
‘Since, this path may or may not contain -transition.
If the path contains e-moves, then we need to define
‘closure (q), where ‘q'is state of automata,
es
function
4. The function e-closure is defined as follows :
_eclosure (g)= set ofall those states of automata which ean be reached from
‘ona path labeled by ei-., without consuming any input symbol. Consider
the NFA .
Qe Qr
Fig 120.1)
closure (c,) = (gy @y» Gal
e-elosure (q,) = (9 43)
e-closure (q,) = (a,)=z
NPA: Refer Q. 1.15, Page 1-94, Unit
1 [le stands for
nite automata,
“More than one transitions possible
from one state to another on same
inp symbol.
Transition function 6 Je | Transition fnetion is written as
written as 5: Qu EU le) 2
i
IDFA cannot be converted | NFA can be converted into DFA,
ora
(Qae123] Can we convert a NFA into a DFA?
Bee]
1 env sanconni NPA DF, For evry NEA ther ext
. pguvalent DFA ae ‘en
cual defidintersotlngag acptanc. Sisco
iting ate sonata whoo mae anton
: spitpet gis as permite, :
scan ava cnt ie somata wich
re ta wich wilt all moves
ofA‘ a petit tl npr then pe
: wb exactly one trtonon eer input
6139] expan ts
we procedure :
DFA. for converting NFA to equivalent
eT]
=
egret
113A (CST Sem.
heey fates Poe ogre
_ ae eras NPA. wnat are various plats 2 Alergy
petwena A and DEA? RIBS
AAA(CRITSom-) Batic Concept Automata Theory
aacanaes
a
ee
2 Troe BRA n th oh renee epee
Sees
rete ene
sos
eae
‘add 69,2) = Upe 9, 09408, where the 5 onthe right hand side
eee
er ere
a
State found toadd in
stat accepting states of M, are accepting states of M.
‘GeeTHE | construct DFA equivalent toNFA where is defined in
the following table
rae | ae eg a,b)
c
Bq. 0) = Urey
b
A AB |
aie || ee
(ear TT]
aE
Pree
‘BA, b)= (C)
eS yas. o DoW = 8)
Sea eae bate vial- mG
BIC, al = (eh
setcun
2 eee uc. e toi
lab
‘8(IB, Cl, b) SB, b) UC, b) = (BUA, BY
= (A,B)
, oe
con
1A, Bl > 4,
wack
‘Transition table for DFA,rg izer
Here (state is nothing but interpreted as if there isa input ‘aon state g,
then there is no path fort and machine will bein dead stage, :
GueTE] Convert the following NFA (p, 4,781, (0,1)8,P,(a,8) into
DFA where 5s given by
Now let, p>
q>B
roc
85D
fas) 3B
fara
blog
baron
Gnslor
Gae196, | Construct a NFA without emoves corresponding to
Rear APA Brplaincach ep ~
Q Q
(=
“pig. 1.2651, NFA with etrandition NFAY
ewer |
‘Transition table for e-NFA‘Step 1:Find the state GENPA without transition including initial tate gy
finastates aslo umber of statesbut the names. canbe
s the set of states in the
i There willbe
the state name
lsure.
i FORT awit ectarure of ini stateof NFA with transition in
Fig 128.105
1s la) Hon nt) (Newinitial state for NFA,
without c-transition)
Rest of the states are
‘eclosure (@,)= (9) (New state)
(New state)
closure (q,)= (91
‘The final states of NFA without e-transition are al those new states,
rae tan final state of NFA with e-transtion as member.
$30 ay 9 yr) and) ll ae final states,
So if NFA without transition is
Mx (@5,8145:F)
= (1a dr Gl ye Gl)?
lay 9
= (1a Ge Gy 10D
‘Step 2:Now we have to decide to find out the transitions as follows,
closure (4y.4 42)
= eclosure (59g, 2814 @), 2) VQ 0)
eclosure (gy, VU)
closure ()
= Wo dl
Bldg G93)
Sinilary
8 lag 40), )= sure (Bay 4.4), 8) .
= e-closure (8(q,,b) U8(q,, 5) U8, ))
= eclosure (Ug, U6)
= eclosure (q,)
= ly a)
os yd)
-elosure (8/qy,c) U8(q,,6) U
closure ($U Ug.) %" Meet)
cclosure(q,)
8 Udy dy Qh
isa coat Sem) ‘Bosie Comangh te Anca’ Tao
silrly wean write .
Sim gy ane +
B cagag d= ay.0)
¥ layaj0= (1)
sa.a=4
3a,b=o
8 y= (a)
[NFA without transition wil be as fllowing
so transition table for
Perel ea ad
aes dr) 88 4s
(ay ae} 984,
a) 984,
Let assay
and
Sotr
Fig: 1.962. NPA without ctransitions:
Queiat|
Convert the NFA- to DFA.
b_
-19A (CST
ee)
a eeeee ing eavalenes
fi, Check with the
“comparison method forte
pone
i
Fintwecover NPA to NEA,
Trans alee NF
ue) oan a
=
0 1
1 $ $
Ferre Td
elasure of (0) = (0)
‘Transition table for NFA
oe @ 6
o | a2 | a | tetas
wa [zi [| 2B
a [aa | o asc
‘Transition table fr NPA:
o «76
4 afte
z Ble
c Ba
‘Transition table for DPA willbe,
tran mA wih op ae NFA
SeDPAte gina hinpete because there i only one
aoa conten) ee
iQ
Cc. oO
Se
Wig 1273,
ung one
= ‘L = (wela\/string with even number of a)
same set of string.
so, oth PAs re oquivalen as they ace
GEC EaRT comput te opilontomre forthe sivenNFA.Convert
itinto DFA. _
aid-o9
Fig: 12810
Sse
closure of (1) = (1, 24)
of Q)= (2)
of @)=(2, 3,4)
elosure of 4) = (4)
"Transition table for NFA:
we a €
1 ¢ (2,4)
2 3 é
3 é (4,2
4 ‘ é
‘Transition table for NFA:
Let (1, 2,4) a8
(2,3,4) a8B
aE a
(12,4 (2,34)
2) 23,4)
23,4) (23,4)
i) ¢“re Mackin, Mealy
Machine
(aes
‘Answer Type Questions
‘Long Answer Type and Medium
ee
QaeTws, | Explain Moore machine with example.
ewer
‘Moore machine is «finite automata in which output is associated with
1
each state,
‘The output symbol at a given time depends only upon the present state
2
chine and defined as
a
3. Mathematically, Moore machine is a six tuple mac
Q: A non-empty finite set of states.
PE ee
fewenmueed
6: A transition function which takes t it
Se meee = se
ae a oi ae
Se renesmeaed
area ee eee
roo,
oe
‘ii tai hm in ge mt
gy: Initial state of machine. a
aa
Fn re
Teanga tnt ev rape
Representation of Moore machine :
‘Moore machine can be .
Sonat a represented by transition table as well as transit
be Moore machine °
having following transition table with ¥ = (0, 1)
ee
psanccamTsens) ene ee
ea cco I
)
eT * 1
M=10,5.4.8,%.0
Q= Go Inte)
5 (0,1)
42101
aq) 0, a) = May) = 249) = 8
for each binary string treated as
machine which prints the remainder, whe®
We have to design a Moore
decimal equivalent is divided by 3.
‘Therefore, (0,1,2) :
Since, 0, "gare poaslremade hens dcinaounber ae?
eed three states in Moore machine.
Mod-$
the3.
‘Therefore, we m
LetMoore machine B= (Q, 8,500
Q= (ey In)
(0,1)
a= (0,12)
qq) = 0. May) = vgd=2
qq isinital state.
‘The transition table is4A (CSITSem-) Basic Concept & Automat
eee
Forinputa=0 | Forlapata=1
Present stale
Biate | Output | State [Output
% % ° a 5
% 4 1 a 7
a |.% r a 7
% % 1 a 7
M= (E85 ha)
Q= lay dodo)
z= 0.3)
Fig 20 = (0.11
=
[email protected]=0 RG D=0
tet asume inp string I, eine equivalent 6779 * oad seo Mose
" “ Rqeo=1 May Dat
rGgedet — May =O
when we pass 11] to M, it ends at
7
[ESE] Explain Meaty machine with example.
‘Mealy machine:
output is assecated with each transition,
1 Ttisfinite stomata in which
2. InMealy machine, every transition for a particular input symbol has a
‘xed output.
3, Mathematically, Mealy machine isa six tuple machine and defined as
Here the outputs associated with each input.
Where, M= (Q,2,4,5,2.9)1
@: Anon-empty finite set ofstate in M.
E> Anon-empty five st of input symbol complemen
4: Anomempt fae tof outputs. STRAT] Devin a Mealy machine, which prints *
4: ital tate of of input bit string over alphabet = (01)
5: A transition function which takes two arguments, one is input
state and another is input smbl. The output ofthis Function i
Single tate and represented as :@Q*1->Q Fertig i 10110 then 1 complement of 0LI0 wi tes,
. [is mapinginchie finn wich map @* E10 giving the inp a Mealy machine which wil point outa 01009 =P
‘output asocated with each transition. Is represented string 101110.
nese Le pnd M,= (QE 85,890)
‘Thus, for this type of machine output depends on oe
Tm fin pends on oth curent state and the Hin
Representation of Mealy machin gaa
Q= la)
= (0,1) given
‘Mealy machine canbe represented by transition table as well as transition
Let M be a Mealy machine having following transition table with = (0,1)in alan intial tate
ets pas inpat w= 011 0M,
eae
‘Output string is’ = 100 which 1's comple
[Gan] wrth procter
airiy machine wth an exams
LL Draw the tabular format of Mealy machine
Dee te me racine inh ESE Tol
eer ely cho :
am
ment of w= O11.
wrerting Moore maching
a
Forths output lokino the present atte clume and output column op
the Moore machin. The output for Que (Next state for Present stay
Gran and input UP ofthe constructing Mealy machine) wil be the
Sagerarthat tae (Q,. 00 prema state inthe given Moore machine
-Bxample : Conversion of Moore machine to Mealy machine,
Given Moare machine:
‘Present state
‘Next state oP
=o | Pt
x
a | 4
% | &
% | %
one We=0 i
[Nextstate| oP
o
T
0
%
4%
%
a 7
chine, for q, as a
ennstractig Mealy machi
ny
%
%
%
resent sate the
{org asa next state the,
120A (CRTTSem-t) Bani Concept & Automata Theory
GATTST] Wont are various points of tterence between Moore
er aenly machine ? Explain the procedure to convert a Moore
ching nt Mey machine,
= between Moore and Mealy machine :
Firterence between Moore
Za | Mooremechine | __Meslymachine “|
| etput deponds only on | Tx utpst dep
present state treonition input) and present |
| sate
ition function ts | Its transition function is excess |
Fite set of | into D (output alphabet),
| ‘pt ah
| \
‘Procedure to convert a Moore machine into Mealy machine : Refer
(@. 1.33, Page 1-25, Unit
“GaeTE.| Write the procedure for converting Mealy machine to
‘Moore machine with example,
“Answer
4. Draw the tabular format of Mealy machine.
2. Check the next state and output columns ofthe given Mealy machine,
3. Ifforsame next state in the next state column, the output differsin the
tutpat column, break the state g, inte different mumber of states, The
saree is equal tothe number of different outputs associated with 4,
‘Put the states ofthe present state columanin the new table. The states
nich are broken into number of different states put the broken states
in the place of those states.
Change-the next states in the next
set of states,
Put the output from the output column of the original Mi
in the new machine.
7. Draw the tabular format of Moore machine.
state columns according tothe new
jealy machineei oe
-jtesand next states ftom the const Se
5 Rader td mae .
rr a
ay machine For the tat eg 88a nex
mtptraced Mesy machie if output is then for g ate a
chin the output wifey Peat
nanan thou depends onl 0 tbe presen gy
Fa Mar gang ater enpa RECA et an ou 2
mes tbene nated Moore machine can accept ey
typo
1 Teeuite Merman drs totacet tring. we hare
aoa bning st) whoe Sate transactions S28
‘ental with howe ofthe existing begining stat but output gf
eample: Cooversin of Mealy machine to Moore machine,
‘Check the next state and
Foc pgtes tate and otputcolamns oft given Meal
Rel tbegatsnaae past Pol ry wanna
pet LS hoa PPE fog sane stat \, ‘near ped
eg il eka ede nea Oa
gta and estate
ss (cSITSem-)
From this the Moor
Present state
- Baie Concept & Asta Theory
machin willbe
Next wate
a0 | WP-1| OF
«| |?
Ta [4% 1
Ta [4 7 |
) | |
ou [om |
«|
Ce.
andthe tpt 1 Tht ant
agate Therefor,
beginning states,
wwe are gett
ce which snot ac
acceptsteame ths situation we must add anew
Te Tame transactions as g, but output 0. BY
ve the Moore machine will be
(Next state
%
yp=1 | OP
°
T
0
%
% %
bebroken ag nd
wine 49404 Ate bresig the motied Mealy mach
. co
ca % ca 1
0 ta Gy a
mp |
GaaTas] Deweribe Mealy and Moore machines with example:
ig. 1.96. into Moore
‘seq inthe modhed rg esta
sree
inthe outpat Dand 1 resets ree because there
Convert the given Mealy machine as shown in Fi
chine.ao ntcar sem) _
ssoaccsmtion) on
Fig. 120.1 gives the transition diagram of the sequred Moo
a. 131, Page 1-284, Unit-1 zs
Page 1-21A, Unit-1.
Minimization of Finite Automate, Mill Nerode
irieerem, Simulation of DFAand NEA.
Nemerial=
Nem rcoavert he transition diagram into the transition Tab
bette een problem :, is mt associated with any out La
Fo Go treat outputs, 808 4, nsec
{odiferent outputs Z, and 2, ated ig
2. Thaswemustspltq,intog, and, withoutputs Z, and Z, respect
‘dq, intog,, and, with outputs Z, and Z,, respectivel
‘may be reconstructed as Table 1.36.2 2, respectively. Tabie 3) ae
GEETHTL| What isthe need of minimization of finite automata ?
‘Table 1.36.1. Transition table
| a=0 ao 1 theladguage (regular expression) produce hy aDPA isalways uniaue
| wate | output am 2. However the ever sejon)Prge produces a unique DFA isnot
| a a | 4 a 7 3, Hence for a given language there may be different DFAS.
| & * Z a a 4 By minimizing eo agua mimized DFA with minimom nurber of
a | 4 . A By min nations which produces that particles SOE
a Z 5. tate gui tinines how computers manipulate FCT Tanguages
cn DEA rons) DPA size determines spacetime She
machine 6. ence froma DFA with: sige needless time to manipulate
Next state ‘a regular expression.
Output
xt Gauci | Define dead state, inaccessible tae equivalent state,
te distinguishable state and k-equivalence incase of finite automate.
& 2, | rae
om Zz 1. Dead state: Astateaq, is called dead st te ifg is notafinal state and for
se Z Dend state Ap ths state the transitions confine ‘that state. 18
Z, al the inp petaion, we can denae g, ¢ Fandae>) 4
ae eee eeHSLA gp,
tse or AS
tT tae wh 0 EET be rey ‘
accesible sil
: Jace edie sa
me
Fig 1381.
: Here q adel ate and, since state
iveent tate: Two sates, and go init automa
taM are,
Bulent
equivalent if 6g, x and, ) both produces
2) an 2) final
hom prodcesvonfioal states for all x & 2% Tae ton
a4, "Tis denoiay
[Pa erry aera Teal er 7
eee adenine Many
. vie vers forall €* produces non-finalseset
erator
Nem 4 ap) produc led
eka vata ese allege
: cele
eT] contrat «
‘transition table given below.
jum state automaton from th
psa accatr sem)
ea
ott aes 0-equivalent
: a mate stein ee
final states
44 Hence divide te 9 af staves into two parts Q, 808 Qy
gg BD. BoE GH
1c) A. ‘om.
A oe equivalent becuse hey ae 0
1
pets are 1-ditinguishable.
te divided. Among the states
put either or 1 the next ate
‘
: , BH fring
rent subset. 8,
D, Fl
. (0, Fl
: PPD se, Hee then ae testes
“gg BDFD?
* 16) Meats is (A. BD
3 imitates (C8690
3 et on of minimized DEA
GAT state and prove Mant Neroae theorem.
‘he flowing
Let Lc 2* be # langue
three statements are equivalent
UA) for some DFAA.
Db Sis regular,
4 Pere union of some of the emule
equivalence rel
4 Tatan equivalence relation Ry,
Upon only forall «27518
‘Than R, is offinite inde:em
Nar hore cation Of ain
‘The Myhill ssvolves the
Tanager init own ight
tisfyng 2 could be shown isa re
ass of Ris entirely cont
the index of R, cannot by om
some ena fe.
and tert, tif.
ence Sine sight invariant then fr every gy
2 etwas err, a. Ths, Ris refinement of
4 Wee prove that ,iright invariant. Let us assume that uf op,
spr cs we must show that uyRyvy, that means, for ay,
JE pe eLeoi el. Butthisfllowsfrom the definition of,
itwe putw=y2
venom construct a DPAA,, acepting L. The basic technique is to
* ears the equivalence cases o 8 (of which thee is only a finie
suber. So,
ere 19.5.8, qy f= (ly | € 2 dy Byo Fy) We Pt
a= ly
ly,
i Forallw c2*,0.¢Land dy (lly, 0) =
fi Fay=llly | eZ)
5. Wether hiss welded especialy hat i) male
sense, tat i, the definition of By is independent of the choice of
representative w of the equivalene class []jy. SO we have to show
that ih, then ily = By (ly = By yy 4) lay. But if
woh,v, then wake because His right-invariant, therefore
aly = aly S08 is well defined
& Finally, we'have fo show that L = LlAyy). This follows from
Eley t= bly where lg, )'=¢~clsure ig, and e~closure @)
iste ofl states reachable fg on pat
QueTAt:] How Myhill-Nerode theorem can be applied in
minimizing « DFA?
‘aewer |
Sep 1: Bild vo dines mati
DEAatbe eden de Tada tne ae
‘part will be put dash. a
Epa onttetices
Step: Oneoh tee mit Xoo pin the atin were
17 Maoh at, 9a erage istinal tat and i
lke dias aircon ot
inte nn inal tat rs ae
gue on nl ete herein te dna
pairs
‘Take a pair (p, q) and find (,), such that r= &p, a) and s= 614, 4). Iti,
the place ofr, 6) there is Xo, inthe place of (p,q) there will be x.
a
Basie Concept & Automata Th
mtorsangorane
et
(a aman teen
eset
the given DPA:
valence theorem {0
Lat apy aos bP)
2 pralte, de) bo0!
L$ Pi feldie) (0,0.
sk ‘tho reduced DFA is 5
There 15 ig the reduced DPA
ene re three states it
fasTesi of Automata & Formal Langeseee
“Transition table of DA.
a w | w
% 4% %
[oe [a [uw
% aw | iw
= fe %
| a iz
Let us eppy equiva
ws pp eqialence harem athe gv
Pore to 0469 hate
Pe tet fy Gl
Perle a lit ead
Pare Nea Mal ty GQ al
FA et al hl ah gl
yay eh ah tah
states without paingy eee the S-equiv
ng whoa ete sates contain ll he
1-98 A(CSIT-Sem-t),
Basic Conept Automata THOT)
sespegien DPA ety nisin So minnie DPA
qa maa oven
(DFA) and how it is represented ?
ams, Refer Q.15.
9,3. Design aFA which accepts setof
Your is in every string over E = (0, 1}-
pax Refer @. 19.
strings containing exactly
@.3. What do you understand by Non-Deterministic Finite
fata (NFAINDFA) ? How is it 7
Aut
fer Q. 1.15.
@.4/Draw DFA of following over (
‘All strings with even number
(i. All strings of length at most 5.
asm Refer Q. 1:13.
. NFA. What are’
NFAand DFA?
nase: Refer Q. 1.21,
Q.6. Convert the following NFA (p. dsr
DFA where § is given by
0,1
‘of O's and even number of 1's.
various points of difference between
8) into
2), 10, 1, 8oo
1-87 A (Cay,
/4
Theory of Automata & Formal Languages
amen Refer Q. 1.25.
Q.7. Describe Mealy and Moore machines with example. Cony,
the given Mealy machine as shown 1” Fig. 1 into Moont
machine.
© Of, GQ /%2
A
Ss ;
Vy
Fig. 1.
ams Refer. 1.36.
“A
OY Minimize the a'
utomata given below
pon Refer Q. 1.42.
@O®‘Theory of Automata & Formal Langues SQ1A Com,
Basic Concept an, d
Automata Theo,
(2 Marks Questions)
1.1 Define the term finite automate.
deem isa set ofirite states and set of transi
iit automat ton ape eymbal oven from bs
12. Define alphabet, string and language.
ARTO 200716; Marks 2]
Iphabet:
Fa A espabot isa finite, non-empty st ofa symbol
FA: a canvnton we se tho ayo represent analshabt
Aa ca yor letert HTainapabet 6.) or dg
such a0 represent e7mPol
Forexample;
ean eth tyme ke
ance
et or word ina sequence of symbols om sme alphabets
digits —
_ 3 Boreal
T= label
We can Strings using the symbols a,b and
«abe, a2, abeabcabeaboat... |
Language
guage is set of al strings chosen from some 2*, where Eis
Tanita =
isn ite anche is alge overlabt 2
13. Define DFA.
‘KBE A deterministic Gnitequtomata or DFA is defined by the five tuples
where, M=(@,5,5,9,F)
Q= finite sotof states
E-= finite set of input symbols
8 = transition function such that @ x => @
4, = inital state
F = set of final states from Q
pcs Sern)
Basi
a , ——
‘give one basic differen met
1A. OI EA, for eachioput yan een De St Thay
% FORPA, we have nero, atthe; PP ARag
symbol ‘OF more
NFA.
15
on- deterministic faite ay
oe nape fe omy
M= 10.3,5,0,7)
here, = finite sett states
ott mn
transition fuse
initial tee Hh at Qe
Set of Boal states from g (hon
‘What do you mean by NFA with e-transition?
If'a NFA is modified to permit transition witout
Be ea Nuch atransitin {scald eiruntve ne oo
fas NFA with e-transitions. Por example,
yy ny Oo
nlite 8
Fig.
18. Design a FA to accept the string that always ends with0O.
“ ATU 2016-16, Marks 02}
ae Here, we ao going tconstrot DPACatwilacep legit
{00, 100, 101100, ..).‘Theory of Automata & Formal Languages S@-5A carp,
7 Design aDFA to accep the binary number divistig
ARTO RET a
mote
setofall states that ca bee [Reva ate
alld ies eched 5
called car toe gg
ge Sisinpatei
r
ign «DPA fo language,
I8 rp erhere number of Oe inert ot
V8 i ag
=
1110, Design the DFA that accepts an even number of a's ang
even number of 's. (ATU 2016-17, Marks op
‘AME: Here, we are going to design a finite automata that wil acc,
emis having even number pfs and 6's and their combinghgus
ice. bb, aa, baba, abab,Bbbb, Baba.) ae
‘The transition diagram willbe
14, What are various applications
ul tae stmt?
i ot tat ton
a ple
ieee
—
Ce
118, What is a Moore and Mealy machine ?
[ARTO 01515 Mars]
ise 0 PA bra tay te Bb snes mecha store ico
rte Agnetha | oor shit eran ae
ooane ame erates pach areas
| Also, this finite machine has a fix output.
Seen numa
peepee pr deere arrepent
se rn tela
Shamed alien
116, Convert NFA into equivalent DFA by taking any stale
[ARTU a01T-18 Marks (2
example,
‘MME Let consider following DFA:‘Fig- 8.
DFA minimization using equivalence theorem ;
‘Transition table of DFA
5g, 0) )
+
f f f
Let us apply the equivalence theorem to the given DFA :
P, = ((c, d,e), (a, Al
>
sjalslele
aialele
[sb] ale
J P, = (c,d,e),(a,0), (0)
Sf P= Loe e), (a,b), (P}
Hence, Pye
‘There are three states in the reduced DFA. The reduced DFA ig as
follows
Transition table of DFA:
Q 5(q, 0) 5,1)
(ab). (a, b) (c,d, e)
de) | @de) 2]
" p p
©