0% found this document useful (0 votes)
58 views22 pages

Flat Unit-4 Notes

Uploaded by

l50711876
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)
58 views22 pages

Flat Unit-4 Notes

Uploaded by

l50711876
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/ 22

UnstIV

PUsh doun,Attonmata
Aukonata (ba ay fmplemeat
o acoy fnthesane
Y PUShdoOn
ty e desfm orA fona reguki (lavmman Mfommalnbut a
DFA m2emembeg afoke amcumt of
*A
fIf
PDA can Nmmbey an Ménfle amount of
NFA Ngmeted th an cx}omalsocke
PDA Í8 &fmp am
momery'. Ppovfde a last-fn-fut-ut
*The add{fon of Skack fb ubed to
o pUshdown autonnta
memOny magemnt dirbsliy nbounded arrount of P
can sone ayn
* PUshdouwn autoata amt Df fIE on the Shack
he Stace·TE an ateh almfled poP
cn fheStock and
pubh aneement onto the top of
*A PDA Con the stoch:
an element fionn the aP of clemenments
the stack the top
*T0nCad an elomnt fnto
nubt be PoPPed off and ae obt ongage ckgch danbe
mone pooerfal than FA Any
A PDA f6
Gan also be accP}able by PDA:
aCleplable by FA cohsch even amtbe
aeps a clas of guage
y PDA allo

PUsh on PP
0
sack PDA
fnput tae tb dfvided fn many cly onJtmbr
Tnpot tape;- e
only and may ony move from left to
-
The fnputhcad fs rcod fme.
aght onc 8ymbol ata Pointo1 okch Pobybe
þ701 las Sone
&-Finfte con-nol:- TheFfnfte con rad
cwnemt Aymbol whch fsto be
the Fnutwe fn ohch coc Cay Pobh and
3-Sack g- The btack fs a s an fnffnffe Bí3c.
end nypt has
neMOVe the ffoms fom one the flems onpojail
to stone
m PDA Hhe stack SB vbcd ponon}&
defned as a aoletfon of i Com
Tne PDA con be
A: The Ffnite sct of States
Apkabet
s:The fnpot &et
The SnfHal ate
0 inn.
astart Aymbol cobfch fs PPREd omhesa
: canbe púshed and
aslack Aymbo b{ch
of fral Bates
: 'a set cuvient
wsed fon moving Bam
6: Mappfagfntfon oKch fs
Tansifon Functíon 6(ahax)
state bo nott bhate- (on)
TYPe3FSM-JFÍnfte aymoontof fnoaionn
R-G fnfomalfon
CFÚ-’ TPea ’ PDA -> Dnffte amoumt of
Stack
PDA=(a,6if, 0201F)
aopeatfons

+POP
PBA =FsM+ stack
Stple+ ahoples
PDA 7FUPples
TatontancoUs Desrpfon - (TD)
fnput
D 18 an fnfonmal notatfon of how aPDA(mpotes an
SRvg avd male a dcdsim lat shzng is acepled onted
TD of PDA T{ple(4, io, covent Slalle.
Sfate sg tobe roNd
+ (fallen T)TUNSTILE NOTATION
+sfrgle move * mutiplelscqucnce of moves
ED check the aephance of srg

L jab,aabb, oaabbb-
aaabbb
he given statrg (0 aaabbb,zo) (an.aabbb,a
Sunsfo table
S(ao1aj2o) -orazo) aopabbba(a0,abbb,aaz)
lar0,abbby2)H(aorbbb, aaar)
Sl0ib1a) (a1;e) (aptbb, aazo)
j obbby20)
ilanbya) -an,e ab bothane not match so
HOIC
elinnfnate
Oooibbi2)+ (an, b; ao)
E, zo)
ACeptcd-»t (93,e)
aabbbC, 0aabCec - --
1fabc,aabcc,
Shng s4 aabec gabca t(ao,abcc, ao)
8(@bra,2) =o,a20) 0 bccaaz0)
08014,29)
cc,20)-(a cC,aa)
o1aao). ao, b
baoibia)
-(51) ad Cj20) (a2 E20)
S(a21 e,20)

aaabbcc aaabbccc}
n=m) L= fabe dabcc
nm) n2a m - 0 3 ,
m
n>lim
a Psho)
a'b c. of c's. b oncharge
eaut to no
noofas fA cPOP)
arop
8(30raj20)-(4na2e) aTOP 2:

6(Dr
lal
6(@1icia) =(a21e)a 1:jab1cj
6(43, a)
e, =(99, c) POP

(le2,e2o) =(a5,e)
(on)
F- s
6(401abcC, a00) (ao) bcc, a00) S(a0,Cj20)+[ag, e,c)
"6lab 1bcC10020) }(4)CC,a0)
Czo)
8(40 1CC) a20) (a
The arguages ot PDA -APlanee hy Fial sate ?
constOLEt PDA fo one bvgucqe L= Jan n] nzlj
PUsh all as on ko the sack
sBPO:- YnfHaly occscarge the bhate a pofPa'f n
SR: wheneyon t
the sack unHL sack ss ermpy.
stepa
StcRS) ReRat
=jab,oabbyaaabbb---
mput sBvg 16 a aa bbble|
et us jake the la
20
6(o1a1a) (oiaazg)

ga?o) -(,e)
6(39, bi
8(,bia) = (a4ye)
8(an1e120) = (21e)
Sháng aabb azo)
(o, abb,
6lao aabbze)
aro)t (a) bbyaazo)
6(a0)abb b,azo)
bbi0020)}(an FiralSfate.
S(ar0 F(anr¬)
a20)
Slgo by
Ex conb}ot a PDA to nccognike Ahe argvage
Ljwlna tw) =nb(w)
ax

Ababe
6(r01bi20) roi bzo
S(01aa)
6(ar0yayb) =(ao, e) E )
6(vo, bya) - (ao1¬)
6(aro1bib) (apbb)
s(20 B,20) =/afr2o) acceplonce by fnalsfate
(on)
abab
6(ao,ababizo) I(ao, 070)
6(avo bab 20) (ar0) 6)

6(aro, b azo) (ao, e)


6(a016,20) ( , G,20)
accepBanee by Hral blatc.
-babb
(aro bzo)
6(babbi20) (aoie) 80,¬, bbzp)
6(abbibo) gefccted
20)E (ar01 b2o)
ex cobhut aPDA A0 acCeP} a og uage such klak)

ababa
8(gbaba20) (ao azo))
BRaba azo) +(ao1e)
6Cabay20) (ao a20)
6(bayazo) + (ao, e)
F(01azo)
(ar0, azo)
6(a, zo)
(voazo)
1a,20o)-
6(30 (oo bz0)
6(a0rbi20) -
- ro ibb)
B(ar01 byb) ie)
fluo1aib) - (a0
6(a01bia) -(0ve)
-(ao1e)-Noofas
6(av0,eia) -(vo)e)-Ndofbh.
6la01eib)
ACCep}ante bË Cnpy slackaFtoE
EL Conb}7Uct a PDA to aCCPt Ahe argage
L fonyan) nzi L-fabb, 0abbbb
ef ven shfng epoo
aabbbb
6(401a20)#(v0,a20) aiala b,aja
6(ar01arao) = (aro ,aa brola
6(0 b,a (aa) bbb,)
bbbb,aazo)H(ay,bby0)
6(30, aro)t(q2 b2o)
bbby (a2,by
S(ao 20)
6(a,b,a) kaje) G(aoslaai0,b1b?0) (aniê,
bb
20)al
20) (h
=
6(a216,20)
012é fe)SnpyAtatk.
bnguage woR hee
pbA to Negnßk
ex) Cons}noLt a

ai20) = a01azo)
S(a01 (0b20)
8(aoiby20) =
6(4o1a1a) = ao1aa (ee)
aib) = (01ab)
6( vo, ba)
6(a0,bja)
(40, bb) lane)
6(90tbib) =
0(40rei20)
(a01ei20) 6 8(
brb)n6
6(
nE20)

=
efz0)b (ti20)-b
(arfi
e)-by

2rnpy ffnal
sjabeslate
21e) 6(a1bib)
6lannca)
6=(ibb)
6(01a1a)
(o1aa)
(arob1 6 o"
Empty
(a2,
20) C, a) slace
b) min
= =
6,30)- (21¬)s1e) -(niba) n,mz) ko
Fhral
Ffral aabbccC late
8(11Gb)
state(a1Ez0) (ane)
6 (ane)
'l01Cib)
8(01bib)
(0tbb) a(
8ÜOLa20)o1a30)
aro1bia) -

)=(a20)(ae) = =(oi
ba)
o)sprtduutfonu.g 4
te e
then23ymbols Henc (g0,a20) az0)= 6(v0
lojal doca the
pnodvcfons Oicate e
P.s v,T fon plefe Com OCHrc
FOmabs
then
fao2040 slats
roblem main the HcIe
(s1go.a.40]Lpa4r3,
oitha s}arts V:
ed shatng4p V=
P,ANSGT,
5)
of funetim6=TunsiHon F$k
vaajabes t V:s}ake ctof
labt fsock 3|0
asf:8 M:
=(ae) (aye,70) 6
(a) biaj (an 6(uya) &(*0:b1a)
(vo1aa) 8(0A1a) (voi20) (*o10120) 8
ó oPDA
lomfniskc
PDA and EqÁvaleMce
PDA of
have to olethe
6}ate ao tosce&

also o altoate

Hc the shace fs asym


6(yo191g(vorga) henpme 4Þrodcbon
Prodbns
a
aastac
Sao a agl>n a a o, aed

f'ao a

&Producfo)
a

8(an,bia) =(ana)
Eanivalene
S(1u4) e)
a
Z0

of
e PDAb
ond
PrIodvuion cFals
nhiru)
EX Corvot the folloofg PDA fn}o CPG

S(a), l;2) =(ixz)


-(ane)
S(Pux) =(Pe) 6(Proz) =i)
Bpat&ui

a~48stacks.

6(a))x)
6(Pry)(Pre)
no Pnodotns

6X CoNOt PDA Eo cp6:

S(401a120) goazo)
S(90 tba = (ana)
(bia)
8 = (ia)
=
(ue) 6(41a1a)
tonsnals the stepPA above the Hoc
ajb (i) D(416is)
6(aeis)
(ai
bsb) = bsb 5-
(,asa) 8(,615)- SJasaI
s-c S-bsb, sSasa ,
from) fConves
on EX
PDA CFot0
above the Here
the sBePs
(aieB) B1)8
ol:ennírals -(an) BS1s,
(1E
B) 6
13)s) (,
(4'1e,A)= ( AD0S,
09) $>AB,68
=(iA5) (1¬,s)
B-16|) A-)05D S-SAB,
A-Je HIc PDAcons}ut
faman ome fon fO
(re) 6(iaia)
Tonfyal Fo) a
(rd) 6(ue1A)
}onfnalA Ynon FOn J:
-PDA of
to CF61 Convenion
EX oNni on co to PDA
S asa] bsb ) apb bPa Paplbple
Sasa S(a,e,s) = &(as asa)
SJbsb &lae,s) 6(4n bb)
5apb 6(ane,s) =6(aiapb)
s5 bpa 6(ane,s) -8l4,bpa)
PJap (a)¬P) =8(a1 aP)
8
8(aneP) -6(aibp)
Pe 5(a1¬,P) 5(a16)
above tormínal! ab
Hrc thc
6laoiaia) (re)
ôlatbib) (ane)
EX orNOSÍon cPh to PDA
sJosiloo]u!
sb0si 6(a1E)6)= 8(4,05))
5>00 6(aie)s) =6(100)
6lae, s) -8(an)
above fominals fboi1'
Hoc he

S(ann)=ne)
voeofw
Detorrnnisfc PDA fn(o)
: ocwR} ois
Er conslot agpDA fon o's '3 o1c110
be deffned as ant no Df
0 Can
cO20|020 o|10
2o]1203n1

osaazale
ollC)lO

1C110, 022)(an1cilD)zo)
6lr0
S(anjcnoz0) (i, co, 20) 8/20, 0,zo)=(aro1w70
(2) 1O120)o1 70,lo) -,zo)
6(10120) F 6(1j2e) (ie)
o129)
(a2) 29)
(g,e,l20) 8(, 1,00) >

Dla210 120) 6l42,11z0) >(2,120


miei120) (as,e) (3lbo
la210)I120)-
Te0 stacls PoshdocOy) Aabomata
PPA Cnafng stack slach
webave to se Top
Rat hone hu toPfc aabbcc

I Hoe }he slack acccPt a


sigle clemcnt fA accpt paceihoctep
aCCep sfrgle'a taaabbc
tooslacb
8Haelhe Bame emgalplabeks
to'aa's aabbc
also
perfomI POP OPoakon
35f bach b aabbcc)
4-Then Sane a'e'

aaa bbbcce--{ aßume topof


2jabe, aabbcc e, eleible Hestaefse
laelaile)

sBacky noofaben
oNcnCS
oycnes Push fnto
stcPO whencvo à
sherO
$8 Pofonshace

ev1cocce POP b fn sa
ooken
BL' Nsn a Too slacs PDA fonannenan/neNt
1Sabcd aabbecdd, aaabbbccc---1
h on lo stace
serD: RCad a's and Pus
Peod c's b} Popig
to slaCea then
slcP) Pead A
SCPS: b on
bAn sBack d's bt poPPfoge's
slockt -Hen Rcad
skPEO: POsh e's onto
from stack

F
sack)
stach

S2
Z0
b
b

(6)
F.c
20J
5
FC

6(go,a;202,) - (uo, azD;2 )


s*0, b,a,2) (,e}b2)
&l4osb,aybh)=(n6,bb)

(43,8,)
6/a dc2) =(3,¬,4)
(PfEo1)-F'nal

pDA fon Ahe ongage


a T00 -sjace fllchne
er Desfan lee tfdof
Problem we
bothSiasspeelene
HOe
fne
aaabbbecef
Lfabc,aabbcc,

S(40, a j20,2) 00,C2012)


6(301a1a2) ronaa02)
bajz) (an,Ebz)
6(ao
8(401bab)
3| 52
32
6(43, Cja,b) *f2,ec, e)
8l43,¬20, 2) (af (2o/21) Ffral

Pnoblem nepneted s}cps.


NCe le [alatubEH,

alalblata FC
S2
S

OalalbEe
62

You might also like