TOC M2 Handwritten
TOC M2 Handwritten
as ih inpul
tantion s in h
In ene
synmbol that it
thu inpat
) Consume
nd tot the input, t
input
¬
taniilon.
Sifmbol is Consu med.
Gocs to a state shich may cë moy notb bame
,oich sar shue
9
psuviou Aali
9 Replacs the
Symbol at he top c the stack
by ng sting
The Staing Could
Cou b0 .¬, which
which Cotrusponds to a pop the
Stack.
Pt Could bu the Aame ymbol that apþaad at dhe Zop
made.
stack paovioul change to the stack is
Solution;
The Gonsists o paltndromus even
lanqug
ovee the albhabe o,t
An inpot mo! pushdown automaa acepling
hove mol
deatgnad pruuns a qum
a that e
a , we
lal ,
) Stat stala upnenls hile in state Vo
-the AEing .
en the end G!
stote then
On the Atack , by puching
Btack
othea
Jotanches
Luad to aceptance
and eventualit has w. folloned
btack then nput
enfly the translion to Stal c
aept
the inþut by making
by w So
Let o mark the botom o the stack .
PbA LR Can be dectbed a:
Ihe
y thu Trþ
I. S(9,,0, z.) (%,0z)} 9 Staut State 4, and
the stack is Zos push input
on to the Stack.
an go hom stale 4,
oto 4,G,
One
Lan
3. S(3%,,6, 2,) - {(9,,z)} ópontanonsly on e input
S(3,.6,0) ={,,)} input" Jaauing tap
sc4,,e, i) = {c4,,0} J &rack
nput matches
S(%,,0, o)= (9,,¬)} In stat ,, pop
nseth top the stack, then
s(%,,1, ) 2fc,e)t te o the btackConsumed in stati
.
ic
Ko)t injut
altthun
5. S(9,, 6, Ko) {(g, make tanston
'o,tl
the
inpuat
ofoo
Skast
(o
E,olo
taom
the
The
Fis
anstyle
Zo'A that many movs of a PDA
upent one ot many
G PDA.
Not - ii wd to upnent uo ot
Erample ;
PDA
LoNe
loncider the
hown blow
The ID'% PDA on input
(9,,1,12z)
FG,,,I) -C,e, L) ,, e, zo
y)
Problems .
) Subpote the POA P=9,4.to,i, ,z}. 8.9:,z, P)
has the tranitlon funelions
1. S(9.0,)= {4,xx)}
e &(%,0, x)= (9,xx)
9) S(9,1, r) -{(4,0
4) s(9,¬, x) (p,e}
s) S(P,6, x)= (p.e}
) S(p, 1, x)= (p, x*)
) S(p.1,)=¢,e)}
dtasling tom inital ID (.w, z) Shous all the suachale
TD' When the
a) o
intut c) Dl0
Sol.
5) 0011
F (4, e, XX
xx*)
- (P, e, XZ)
- (P, ¬,z)
) old
(9,o10,) H(, io, xz)
+ (9,0, Xz)
)
E(4, 6, XX*)
E (P, ¬, xx)
F (p6,Z)
) has
=%,,¬)}
S(%,,o,y)
Jlo,¬, ) = (4,,xz}
S(9,,0,*) ={(9,,v*)} , )}
S(,,¬,z)=
S(%,,0,Y) ={(%,Y)} S95,¬, z)-{,
)
S(9,,4, )-{4,)Y
an evulon a c
iS un LP).
hat string
(Bo.o110, z)H4,,olo, xz)
- (a..O , YXz)
yrz)
(a Yrz)
¬ , XZ)
)
Eo,.¬, z)
OO thL au tomalon
Concuntng iput stsing
which is the Atat fot
tuaches
state q. wh
PDA. Hence ,
is in L().
) 001 00
c, ala
4) btain a to acept
PDA
Atat.
by a fenal (, aaabbb,z ,
Voy
aaki,az)
Sel: abbb, aaz
D 6%, a, z) =(%, a)
F(4%,b56, aaaz
S(40.a, d) =(o, iaa)
F4,,bb, aaZ)
9 S(, b, a) = (9,,e) ,,b,a z.)
S(9,, 6,a) = ,,e)
F{9,,¬,3)
) s(,,¬, K) =4,zo) F(4,¬,Zo)
y4,a<e
Sast
b,a<e
Sol
) Deign
PDA e the glloning longg
*, nalw) nslw)}
Lwe(a+b)
)
Sol. in ohich numb of
PDA Shoutd
than nwmbu o
a's shoutd he
Stast
Vo,
¬,a fa
in which mumbet
PDA Should acept th lsings
Ihoudd be qaualbe than numbu t
) S.a, zo) =(o, azo)
S(Ao, a, a) =(o, aa)
s(%%, b, zo)==(%,bzo)
S(9%, b, b) =(%, bb)
&(4,, a, 6) =(%4,¬)
S(4., b, a) = (V%,¬)
,e, =(4,,a)
b,ale
a ble
,
bblbb
a,alaa
b,Zo<bzo
)aizoazo
Stut
s(%%,0, o) =(o,00)
by
Stack. enbly Aeeptane i.e
input thelonsume *
stack zkempt imhame hu atand Aece_tance ie
inal
ate At by
enlaing the
and inut consuming By*
hut.. aueptig
accepliág an
by
vooyt au Thwe
aepls PDA which
a Language
aq he
poA:
PDA:;
zo) 94,¬,
F(9%,0,0%4)
(4,00
Zo 00,
00z) 100, (9o,
Zo)(o,
0100, oo100,
I,olo
Qole G,ojo Staut
o,olo0
zo) (%, z)= S(4,¬, 5)
(9,,¬) S(4,0,
=o)
(e.¬) =0)8(,,0, )
0)
(4, S(%,¬,
=o) )
o)
(9,, =o)
S(4,1,
(9,,0) 4,D=) S(.,
(5)
Aeuptoue by Firal stole
Let P-( a, z, r, 6, t,. , F) bz a PoA Tun
sa Janage aapled by P by tinad Atal iu
Aomu stati 9 in F
ard ary Atack stsirg a.
That is, Stasling in the nitial ID sik w
ta inþut, P onums w asd estes am
Stat.
knovs that 9, ¬ F
Hene, Le is acepted by PDA
Aeugfance by Enpiy Stack-t
be), the
=(a,E, , S, 4, Z, F) i a PDA, Ihen
P by empty Atach ia,
{wlc,9, zo) 9,6, e)} or any q.
w that P Can
Heve