0% found this document useful (0 votes)
76 views24 pages

FLAT UNIT-4 Problems-1

Flat 1 unit

Uploaded by

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

FLAT UNIT-4 Problems-1

Flat 1 unit

Uploaded by

Gopl Kuppa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24
O_O \ Conskouet a PDA fl . that aceophs Pluc wR | «a 10 st aden cot AF a == iy dot Zo b te slack symbols whech es ho Hom % ha iglack+ pushes & asyrnbot in ee anon FE By Fon each move PDA, Stack - hon the Jape oad guoaches C+ Slops pushing tho Agnore Compose he glace Symbol with be anpue cagraeoes if ie matches, POP bho ateok segmio® poss until ik proaches tae Fira slate o% empty gieck Jot PDA be. & z . ito, Pe C§% 4,423, fort, e4, & Boy Ap eto f 223.) sia tpunsiton farcon fe Arel SRI %® is Be anipal state, OP soadsg fo He ig te PDO pra aynbols o's amd re ae ae aoading Hao. aeput gginbok Cc, quate goes & tee Slate By. From te k tae state Qe. stare ¢,, the PDP gee The transi lions Da, BLO, %W)= { C4, 02093 PC Gor Za) 2 40%, 12693 € (4%, ero) - = CR 0093 6 CMD Ny Kee 1 6%,4193 joe Sactsols ants 34%, : le 264,103 Goale 2 ($1169 | 2041603 é Covey >, — fca, D3 3 C45-0,0) . te Slate * 204,093 Lees Osepe + 8C2,,0, 09 — £@ 623 12s 89), 0/49 £04,093 gop va Syinbels fee 804,,¢,2) = as er2e 142,693 Iara) lle 0 ;2o\e Teaasition Diagram E le PRES Tein 4% the /p String 1O Col es locor) p (%,10col, Ze) 4 Ge 50 CS jee) Pay in Clo lie ee (ng Credle ©))i45,) [aay a ee I— (eA Ceci) fae eee Ie em hoe all inputs Gt congumod, Stack '$ emply. ppm Hoackecl te firal slate. LZ. given input 4s accepted . : n Condsuct Pog = L= farzro met In yim yt a D=2,m=3 ao bhb ccedal aL Tea] Logie: g'g ant b's push on B Met wo SCE fox each C, orm b popped -f2om a red After sroacking all c's all bia we fet a oA Oe Prom fhe slack - wiule soadling Avatlable ana Slack. § Ba-each SY one OB pppred from b= Glack 3 (4 AZo) = C%/420) 3 C45 4%) = C15,0%) 5 Tus ster i% ropededt, Being for all emaing OS Bl4o1b/9 = (4, ba) This for ona b. 804, ,b-bD = (2,,bb) THs Aopoatedlls Cory for Famaining abl b) > PoP -opara tron cl, 2 (9,,c,b) 4 5 Pra oe i ve) fox fisk ¢. 8 (4,,¢b) = (4,6) Tis siop is paportadly desing Por nempining all c's aca di = 8 (45rd &) . CCl ac. te) = C458) for Hert CI5-€) vomainary atl d's ‘ Ton Alop ts hoperteds | Coy ey : dlaing, Z fc i 7 owe do ks final sate a Oreal empty He alec ale _ Bob boecdle | wn APTDIIILIM tT ms pa “for” ROP gy ete pepe. Kee | B Eey (a a 3 He (Pa. 41 90.%,9,). oe fabs (4%, 43) c ble dale | >@, vale EX Sioulaltoo tha -i/p Shing abbecd (% absced ) t= ((yiabbeed Zo) of) $f bee bbecd , &Z0) (3g. bec, bao) — (ap cody b bAZ0) - (22, coy baz) LK (91 14,20) cB (43,612) ie Ce ‘i Fe) Ao —— aes come “and PDP gorched fh ‘qirod alate: Given ip 1s acceptedt.. chive Poa that accepts dda Oy ie ND {othe foe oy Hoo ANN Whode. 0 2 he whole He ty flnat fate ot . 1 ) a)?" \nau 4 Sabb, aabbbh 7 | p dor logic The PPO accom ls T/p gtsiag. With Symbo by The ner Iola cote abel tee no of als a ancl & pron Cho /p aymbol a poads ta Cha @NPul String t a, a AS pushed onl tre slack andl whan two Hs top most Symbol an jood in Ete anpul being lhe x porte from (ao slack joo ola wrih single rn wo To malted. 1, 87%, to, FD PDA will be [P- (@: & unctio® can be copineal 28, phe doxansi tio? fu Cte Zo) fod _fuvst 2 (49-41 Zo) * 6% (h0) for aomaining a's. : 2 (Io) (do: be ©) ~ 649,12) for Prot bh, bo change 19 - ~ Sagk avd change the Sate 3Ca b =(4,€) for Seront b, charge , Lhe Slate peng PoP nos ato. foom stack C44, b 10). C4 a ou 1:0), Fouad ue ge Siete uate ements nue Be me wa ie @ Slate gq, ond for e peaked © poranise® __instate 92 h Hoy yon b 3 ‘ Ca, +25). Cos,26) ae gauh ee final Shake, oe 240/41, 22, 253 2 = farby Ce §ta3 > ” N ° nN > ft33 Q/to[ ato bale bala eae ‘tk aabbbbhe array \,, % Io ti 4rd) 12 Pash \\pr\\ per No opaatin hy opaaker t yr 7 gimulation 4 UP Sting o-bb &(qp, abb ) }— Cty bb: Ze) I— ( Io, bb, O20) J— (ty, b &Ze) = C t,€ 7 Za) | eadlapesaucacred Tha giver Jp 4s accepted . a » pase pon be owcorh He sretrgs oF Me fem one whow sa i 2 poe fay [nzi3 L= $ab,aabb, aaabbb --..? Tdea| Logic asta phan we r2ad an oats us simply gush ints slack, 48 AS reel Gore tha state and Simply pop ta cee 7 a From the Stack poral Te = foal gelate. Zo = = Fertiol Stack aymrol . lok ow pow be, (nena Were Ql 2 25, hoy FD we The 9 tnangitioo function 3 can dofined as, SC Uae Bande, tae FO™ past & (4p 12/2) = (%o a2) oa naxrainicy i a's. be tre: by %) C9116) for temst b . charop Ine Slate 5 powtoam pop opaalion b, 2) 4 (4,6) fo4 Damointey ROM La, Foose PoP 9:(% eutod.= C4 sae filo) Te Roach tae i final gjote . Ar 24,4463 Pe tte, a3 1, be Lo 2 @ e+ [us pale aioe On tot bale ole a Ex. The Simulortion “b be oe a aaa bb loa) - Tstantaneovs Desceiphon pa t/p aaabhl 308, aaabbs: 2%) t- l4y,aahbb 2%) + (%, a bbs, 20%) ee) 08 bb,449%) Ef 9b, 4 Zo) he 02, a &) io (8 1 &r%) la gon ee as accophect , x 7 = = ea Strings % foe ) Develop & PDA thak accopls tho form a 8 whow 9 7%! L 2 L= § ay? jay L = fabbb, aabbbbbb---- F he PDA oar Alp stcvings with Symbols a anol b Whore no- % bly oda Ehrica Cha n0° gos begpe [Bdos.: han te Ip synin€ ‘0 sone te ip staing, ik 4S pushed onls He slack. ane! When thao bo! wpe Rad in the inpul ShiN7 the pop mast Bytabol hal popped Pavia the Atack « sto. match 3b's wilh siogle The PDA Sige me ot “na, sgniticn fonction Con “be, fied a8, 30%, Ar Zo) = C%5, AZo) for fragt O- sh BCYo AO) = C100) for somaining al als. 3CIo, b/ © = (%,,9%) fea fiast Lh, Change Ho Shake, and no opaotion in slack. _—— 8 (4,,6) © = C4_,0) for Seconel 7 © Change Ene State and no opaction in Stack. ie 38 Cha, bead = (ise) ‘Por third b, 7 change tho State and Pesfozm Pop oparation ia stack. 3 C43,b,0) ~ (4) ,0) fox fourth 5 move & sleet adh no pppatio? : en Spaek. it eet Ie “ton PreLay Es Zo) = C4, , Zo) Te on ye a= ? ter de, d,, 2,4 B= fayby (= Bo 23 Ioo= Zo Zo (, Ze F fm} gimalnon tle Sea a we (or) ° qastantaneont Deosew Plion foo ¥P a ahhh B45, abbb) t-(g, pbb. 2%) EE ( for bbhaz (4, bb az.) Po (4a, O20) Gia bre fhe giver ppprts acca tet Si mubaby © —— 0% tre

eventhough skacl 1 nol empty, aber” 4 Canning fp St0g,. 4h bee tintte control tacks Is tee fil state en 1 acca tent ag Othawite rnot Aaccoptect . = Conversion % CFG to PPA wt Gee (MrT. Pr Se Be OEP ly Slack congtomer ppp accants bY a : ral fo tepies: 9 bees a P-( a, 2, , 6b, 2) PDO = Koo 7, voT. 6, 9,8 ( 12 ooo sya 4 ory e2 CEG 5) al each ae 8Ca, €.AD CORED ne azaleliot PS 2) bon ape Eexrareal 2(p.a.00 = Coa) oct pepe for the ollewing Guammat ie [he cfolfouing Grr am na cen guict RDA for 62 (L808, Sa,b}, PS) Pra SAA a . A»>snlb 4 P L193, {asd (80-eOL 2a) 34, e589 = fce,An), ca, 2j ee) ) * ica, sa), C4, £9} 3 (9,a,0 >£%e)- ee 8 C4, bb = (9,6) pote 7 (4% abbatb, 8) }— (4, abbabs, AA) IE (4,4 bb bbb, san) J (4, apbasbans) J (1, bbabh- 48) L (4, pbabb, ba) IK (4, babb. D I~ (4, pabh SPD: L- (4, babb. pp) [ (9, bab» bAB> -(4,ubb, ap) L C9, wb, enn? ~ (4, abb, abh) LL (4, bb, AA) EL (2, 6b, b8) L (4, 6-4) I (4, b>) b- (4, 6 €) See: ig abo Congura4 erp ly. 5 the Alp ston Diferences betcoreery PPPA and NPDA: a | an >< DPDA Coetewnantic PRAY te Lt 16 tess powentur I. than NPDA 2°t 15 possible to comet every DPPA to A Cosresponding NPDA- OMe language accepied by OPDA ts the 6ubset Of the tonguaje accepted by NPDA tithe language accepted | by ©PDA is cated OcFL COctermenigtrc Context FEE language) cohich 16 a Gubset 1 OF NCFL Non delermnigttc | Corkext tree tanguage) aceped | by Neon: | & Fon every input coith the | Cument Gtate there 16 Oly One move Mz (Q,E,0) 221 F/6) 6+ OKExT— exer Ex. @-® Ex Wew® la. Tas not possible £0 NPDA CNon-DeterrrtIntisic PDA) HL 18 move powerful! than pPDA- ' Convert every NpDA is A Conesponding OPDA 3 the language accepted by NPDA is noba Gubset of the language accepted by DPDA: u.the language aceepted by nepa is coed NCFL CNon deterministic Context free language): S For eveny Inpre Sth Ccunent state coe CAD have muitipie moves Me(G,E 1, 9012 1F18) Pi * bt @x(svEyer exh

You might also like