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

Tafl Unit 4

The document discusses the concept of Pushdown Automata (PDA) and its components, including state transitions, acceptance conditions, and the relationship between PDA and context-free grammars (CFG). It outlines the representation of PDA, including its states and transitions, and provides examples of how to construct PDAs for specific languages. Additionally, it explains the acceptance criteria for PDAs, such as acceptance by final state and acceptance by empty stack.

Uploaded by

foyew12154
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)
5 views22 pages

Tafl Unit 4

The document discusses the concept of Pushdown Automata (PDA) and its components, including state transitions, acceptance conditions, and the relationship between PDA and context-free grammars (CFG). It outlines the representation of PDA, including its states and transitions, and provides examples of how to construct PDAs for specific languages. Additionally, it explains the acceptance criteria for PDAs, such as acceptance by final state and acceptance by empty stack.

Uploaded by

foyew12154
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/ 22
DINESH vasHis ONIT-4 ae R Cughclowow Dedomata ? — A. Peshdlewn atctemata i a frale memory device. A schemalic scprese- alate machine (sith a A PDA hag thee entation oP PDA 1s af gheton Ir Pog Wel. aembenends 1. Qupict Tape. ube TABS 2. Gaubel Oni CLE ie 3. Stack. Teh of seek Garde Coal endo feed, Pig tv: Posh avon Acdomad, Pach meve of the cmdsel intt .veacls a symbel Prom, mmput Pile, while ad the same trme. chomping the contents. of the atack vamg ‘the usual etack, obeaatons (Posh 2 PoP). Lach meve cf the embol unit (S deferment by the carent mld symbol as well as by the symbol on the tob of Stacr.. Defrution ef PA — A nen det sth hal iS definect by Sep- tuple. Renna (estecnen adored m= (8,8, ©, 8, %0, %}F) tohere A. ts Penvte. cet Crem embly) oP intemal sfates a control Unit: sitet ieee S| Scanned with CamScanner 1s ape! alphabet ‘ ‘ 1g frie set of yrrbels callecl stack Sembs alphatet SIs @K(EVEA 3)x7 Porte subset of & Kora the pensrten fonction. %» Is metal gtale of Gente! Unit 20€A Zo! ZET ts slack, staet aymbol FIO FCA cet of Pral cater. Reboesentation of PDA — a gtate BRB mbed- stl afer ep ef stacx, Bemaitien Symbol aie, Boneion alex teamnertien - # slates are sepresented by Vertiaes 4 transitions are. aepeserrtoal by drecteal erlger.’ 2 8 jXD= Ca,€) G-bi.® 5) ve Scanned with CamScanner Lustentanects Description (ID) > : let a pusholown automata. m= (4,2,7,5; 22, 2, F), then its emPguoatien at 4 given instant cm he dlefiredd by ED. An ED meludes atate, semaming mbit sting and semaming stack. = tng So an LD (2,0,B) where £E A, wee per The relat beticeen foo consecutive ro" an - be vebrecenrtcal wth sign -— (2,00, 29.) bP, BY IF $49, 2) =P, B) Acceptance By PDA — ® Acceptance By Pinal state © Acceptance. By empty stack. @ Acceptance. bp Pinal State. — 9? M=C&ET,S, 20, Z, bp) ts 1 POA anal L(m) be the language accepted by ts Pmol stale, Then acceptability of the language Prom rafal ro te tovillem on © [Gaye 20) (2p) €,%) tohere 0 € a" «ke T* Scanned with CamScanner Bode LMM Hh (of, % Cnn 3b)}— & (6la1€) so (€fz0, 2) Cafes 925) ea) §iy9,28) ~(21, 4) 86414, = (1948) —panertien Panett. § Ay yO) = (2a92) 8 (is,b,99 = (225) & (2:54) Zo) =(?a,20) iP shiny aabb 1s accepster! by The above PDA (Yo, dabb, Ze) Gy! abb, ¢Z) fe his’ bb, 4Q 20) | - (2s, ky 420) f- (hay é ; Zo) ‘ a7 (43€, Zo) “93 18.4 final alate, Heece stomg aabb Is accebtecl by LDA. . 5 ae | checking Scanned with CamScanner ‘© Paceblance by empty stack — op M=(B,Z,T,8, bo, Zo, 6) 6 49 POA And L(m) is the language accepted by its empty sta ct, Then the acceptability of lomguage. Prom metal to us waillen as 19 (f0,10,20) P= C#1,€,€) where ae 7 ¥ Take the eccample given in porn-@ and spine 20 9:,€, 20) = (24,22) wets $(%,¢, 20) =(Pye) and check shmg aabb (20, 0nbh,0) L- (21, abb , 8%) F Ctr, bb, at ze) t+ Cheyh, azo) bt (a, e, Zo) bE é3,¢,€) Exe 6 pean a pon thal acorpt the fellowng: LaLa e 713 er * ateb| lee. puch all ‘the a'S into -PDY Be 8 Lop 9,20) = (21, 29) I (4994) = (hy had \ “Now, 05 Pritt Se b is eneoursteseel , chanet state 0% by) = Cay) S (Bagby =(9;,A) step 3° Repeat there umut siemgs are exhausted 8 (fs Ay) = (?3,0) Scanned with CamScanner otep3 —_ - bfam poe accebting fa PA? Im, n713 by emph gle 7 : $ = 08, Sl M= (£4523, £%G03, Be 73, 8, 0,20, 4) So oape Slfe, 4,22) = £ LPogA70)% 8 (F049,9) = £ Choy aay3, $ (Peyb, 0) = £181,003 $(41,6,8) = £ Bigr3 é C21,¢,Z0) =LCPn, 20) 3 g (B,A,20) = £8,43 Construction of PR, Prom CFA —} let L=LGG) where = CM, £,P,8) 18 4 CFG,. We consPuct a PDA Mm as m=(LE3,£, Une, 8, 2,8, G) where § is given by. the fellesorny Rules. 7 RL, BLP, AANH=ERXD Aan PB Ra - 82,1, A=ASCHAY3 fer every 9 eZ Mey. 9P Pon reds a varimble A on top’ of the stack, ri ‘makes A ‘moves by. placmg RHS of any A prectuction aPter eraemg A. # 4 pon vends a temmal ‘@ on Pos and thot matehes ustth cearent ageabel mput symbol, the PDA poases “a”, In other Cues PDA Halts. Scanned with CamScanner 23. Constouct a PPA equivalent to follasimy cre = S— 088 8 os|Isle-- Also Tei. tchether ofo' 1s in NCA) si pon =(E23,2,%nl £8, 2,5) @) gy S(Phy8) = 27088) ae hsB)= (09) C29 DE °) $(%,0,0) =(2,4) 8210-89 “tat oi! (ga)0t,8) Fe C2, ole PRD ne “C2, 16", 88) b @,le", 188) Eye, $8) lt, a, oBB8) L(g, 0%, 888) Le BAA) A= (£20,%, 23, bisb,01, FA,b, Bok y 8, Fo, Zoi bp I) (3.0 PDA fo= bala 8 (9, %9z0) =f Po, 0703 2 $C 29,4) mes - 82,00) =(2,) 8 (ts by Zo) = (Jo, bzo 8(20,0, 6) -Lbisb) f(t} 9) = Bo &2) 76 bE $ (ps 0,8) = (bo, a) §(25,¢, 20) =2,,20) $ Cpe, byb) =(24 66) 321, 0,0) 2 Oy A) wens § (yb,b) =A) 8(Uyh, Za) =(FF ,Z 0) Scanned with CamScanner ppa Te CFG — 4P N= (B,2,T, 8,20, Z0,F) 1s a POA then there escsk a CPO such that 106) = NCA) . eenstauchien of CFS ae wae olefine. = (Vn £,P,8) iohere Un=$ VEER ET B38 28,2673 he any element cP ¥n 's either the etasel- gymbel ex an croered triple cheese Prost ancl thea elements are” atodes amd aecenel element 1s. @ pushdown agrbel « Broductton Rules! Rit g produatiens are given hy 8-92, Ze, 2] fer every 968 Raz Bach Move ercaing a pushelewon gyrmbel given y 8 (25% 2) =LE 6) tmrbedces preduction £252,294 3 t Each meve not esasing a peshalewn aymbd given b * 9(2,4,29=22 j22.n%m) tnbeduces many frocctons oP the Pom (22% 2) 2 082g PeILPs72, 937 - - Lim, 2m, 27 there. each ef the 2,22 ,%3-.2m tom be any 8. exams, Cmstiuct 4 CFG with gecepis NCA) A= (84 %3, £483 £523 8) 20,7 4) 8! §Crajby20) = ln 2%) 8 (20,20) = (258) § (eyby'2) = (te) %2) 8G0,9,2) = Ch,%) peta yy 8 $ (81yb)2) =A 2) in ateers ae 8 (140) 22) = (Bey) ae Scanned with CamScanner & Constouct a PPA eqanelent to Pellewcing CFG aoe $— 08B p79 09/1812" also Tait tchethe: U 2,8; 4,5) 4) + ole! isin NCA) sl pon = (E23/2)"" oa alk 088) BA on™ é gtd 62309) =(2,%) 32 LD =4.,9 : io! OBB, cout ie! (2.21? 8) _—— (2,02, " » e- ‘ E C2, 10", 88) aH E (2,105 188) Ka, o, $8) . La, o', 0888 0,0, Be8) [= B,,0) ne nae g1 SCby z= b%, 2% - ) £0448,4) = (4.0)99) gliye 4 HUE, 0) $ (3eyby70) = (Bry 672) # (fo, b) ={41,6) $(4y5, D =e YD) §(@2,¢, 20) ={21,22) 8 (2,96) = ‘G0, ab) >? 7 § Ge, bb 24 8) (21,4, 07 (A) 68 izb, bd =ByAd - $0ish,z0) = (PF 22) Scanned with CamScanner sal’ Let G=C¥n ,£%b3 » P,S) tohese Yn =S) [20,2020], (Be, Zo,2i J [Poj2 20], £212, 2] DhoyZ y MI 21, 20,201, C21, 20,311, [21,2, 26] freductor are’ PL! $—> L205 20/207 (20, Ze) 21 § (0, b, Ze) = (Boy 22°! 5020) aller) et? [oy 2 201202272] py! (20,28, 2o] 9 bE 20, 2211 LB) 22 el P51) 2p I-9 bfS0y ZI IL Pay Z0 p21] pe : [Poy 209 21] > bl%02) PLM Zoy J S8(Gojs Ze) = BC2en6) Pr: (fey 2%) > € rc) = (Peo zz) . Sone [heyy Qo) —> BCI, Z eC 22,25 Zo} Pt: (20,2, Qo) > BER, Z,2rT L212, Led Prot (20,25 wD [20 52,20] £20, 2, 27 Pry $ (QoyZy M1) —9 bC88,% PTL Br » Zs 21. ‘0. = 2, , Sleep) Une 2,29) ? afte, el Ag 2 (ey 94 EM Zo uy b 2) = Gye , A Bipb®) = Paes 14% 21] 46 , 0) =lPo) Ze) si uN a 9 (2159920) & d «Pas [ty Zep 20.1—2 ALP 2 20 Pras SL Bty Zoy BI-F alee hd py. Scanned with CamScanner @ Construct a PDA accepting (a0 | mm nt) by null store , A HE ej23, £9.63, £4 2035 8, do, Zo, i) tohere 8 ts. 8 (40,4, Ze) = (20,9 7%) § (20,470 =o, aa) SC2oyb)) =C4 0) 8 (At, by =(21,9) 8C21,9,A) =(215 €) 8 (91,2, 20) =(2:,€) SD Cevert it fo CFG Noto PL‘ $1 —¥ Cfo, Ze, Po) Pa $1—> Choy Ze, Pr) $ (209,20) = (Po) IZ) P38! (P05 Z0,2)}-> 4 (90,9, 20)( Jo, Zey Yo) ent (Bo) 20) %0)—> A(Jo,4, 2%) (21,20, 20) fst Choy 20721) 8 (Pay 4,20) (20,20 ») P6* C20)20521)9a (20,8, 24) C21, Zoy 41) 8 (0,9, a) = C200) P72 (Go, %, 20)—9 AC 20, A, 20) (Joy @ 20) PE: (20%, 20) 74 (90)4y 21) (21) 4 20) PA: (20,4, 21994 (Boy, 20) (20,2, 1 Pro + CBey@yB1) —> a ey, 1) (21, % 21) 9 Qs b, 9 = (4,4 ) ; eae Pit (2,4, b( 1,4, 40) “plat (2058, 21> b(21,9, %) Scanned with CamScanner PBL (Pty 9520) 4 b(21,A, Yo) PHS C21p% BO bC219 24) Ais (914,91) 24 § (21,6, 20) =l21,€) PIs: (21,20,21) 9 € Deterministic PDA — A DPaA 1s a pushdewm atdemalg thet never hag @ ehotce m rs move- f ppp M=(8,£,T,9, Io, Zo, Fs sad © be chtamniste Uf tf ts an audomaia eubgect to the pestaretion that- for every 268,48 ZVEAB and bE 1.9(2,4,b) antams almesf ome element: 2. OF 8(2,A,b) ts not Empty , then (2, C,b) must be emply Par ¢ 6% Neds. eThe Fast oale simbly segunres that Pr any given mpud- aymbel ancl any etack tob, almest oe meve con be mac % The 2nd cule ts thad when a A move ts possible Pa some. om figiaation no mped consumming aHemafive UC available. 4%, wpop m= (E823, (4,0), (4,2) 8 P20, 6) accepitry he language Pla%cayin%13 where 8 Us $(P,9, 20) = (Pato) ~ 8040 = CPyaa) §(2,€, 2.) =2;é) 9 (Pe, = (2,9 $ (24,4) = (2) ©) (aaaas7 Scanned with CamScanner ° £9,b3 orth x accepting set of all afamgs over en : ed & by Null stove. an equal 70 of & am PS g (4), 20) = (Je) 42) §(4oyby 29) = C29 P?2) 8 (209, 6) = (90,4) $ (90) ba) = Che 2) § (2 40 = 090,94 § (J0yb, 6) = Pn bb) 8 (2, 20) =(fey é) AL = tof atarngs over alphabet £4, 3 a Conrbouct a Fe tb a ol terce as MANY A ag b's gl a 8 (309,20) =(hiyZ) ; 7” > in Coy) Procets tours 3 8 (Poy %) = rx) oe oe apnecaaabead 4 8 C8494) = Brod) w= 5 S(to,b, 0c) = (fey) ‘ 6 8(2ojby4) = (Bey 44) 1 8 (21,920) =(fo, Ze) 8 9 (21,4, =(Po, XX) 4. 821,49) = By) fo. (21, by 20) =(21, 420) Hh 8021, by %) = 821 ,€) 12 8C21,b,y) = E1pdd) 13 820) 6,22) = Bs,20) Scanned with CamScanner 8 convest the QGrammas to PDA thal accepts lomguase by embiy store. s—yosi{A A> tnofs{ & bel” $(2,€ AD =(2, 100) (2,8) C4,€) GC2,£,5) =(2, 081) (2,2) 8 (2,0, 0) =, £) $0241, ') =, é) pr= (£23, £6513, £5,013, 8,2, 8,83 AY tho Some A Covert Grammar to PDA g— aneg [ana A aBB a B— bBB(A & Censfauct PDA fer S87 ofB A tall 8 op/talo Scanned with CamScanner ; PUSH DOWH AUTOMATA BI Dengn PDA Por fafa" Bc" mn 7,13 eis ad {oh é) Sol” (0/22 9% Lib/4,€) Lune wey Seas Ge 3 Gho € 26 ft ) Desgrr PDA Por be LOE a” In, 713 BL 3" ae ee” = Loja94) >) Gja,e) (ej, &) (a/z0 92 5 . fi 2 2 lush nee) fo) Cols, 6%) A% Desyn PDA Por L= a" bral n,m7) ene G9 ° Qfzo, 2 z Ee” 2G yO Ghe9 i Ay (aja, &) , ) Kp Scanned with CamScanner G4 Design PRA fer La fo greMa™ (n,m 7,13 “ 5. Design POA for La Sar meal” [ 0, 713, eg werign POA Por b= fa"b"2 al” [77,13 . This 6 not CEL So POA Tet possible. BY Deng POA for Lofa 8" Inz13 ae ee on = fs sa! 7 (afze, 492) : Q As efze peth 2 by on C2.) (5 L@ Shrew. : eh) Lhe eos 26300 bep one a Pon sol lqfZ,4Z%) Oman We) , (a4, 2) - B® Be Dengn Pon for Lola gr" frais : tae eo stack st Obs Ze) . — (lays (D) wo (oy ‘iam 9 24 9p ®4@ ch a8) Ma, OD Scanned with CamScanner “ gel "AI Design PDA Por k= LtoCw*/twe ary 3. Le all palmolremes there center is known, (ap,29) a 8) o/b, €) Ge he uf iw) isk) es (bib, bb) Cals , ab) (bla, 9) + Ole Deru pon. for k= Low"! w € Qt) 3. get” he all palmoliemee.cP exen length. Non -Seleom mnistic._POA (lz be) ( 6/b£)) itis, azo) a ee) a POO bet lo= Q994_ ib, B he (fo, 9024 , 20) -— (aja,a2) (0,099, 2%) { (Bb, 8) pL ade hes ve ee mos) ea) 25) (2 Foam Giga | (22s) Bee Scanned with CamScanner BM Design POA Ror L= fore? fn 3 UBM m7, 19 Non-cletesmmiste lomguaje Sea Lels mate a non dlelesmmihe POA Casa, 92) (afer? Cbs) é ‘on, woof hos LHS) ab re (aja, bh by eee? . ”* Goto f5 4 arb fs2 Bil, Dery PDA fr Lfaliiota'/ Uskagee ? | fn determinutre uyliefe. bl Do it by Urself be angen Nat regal, dekaminithe CFL, CPL. hea BP yma} Nek Reyukr, DEL, CFL Led B1 nmzl , Not aeqular DOPE, CPL L 2 3. 4 LP WAL | n.m7,1 mot repady-, DeFL,cPL 5 bm grPd"Inny , mot vegtlar, Not cmfest Pree, infiude logewpe_ | & La aM Bang” fm nyt Net epulis-, DEFL, CPL. 7 GBA Ka | Nef sequler | DEPL,, CPL. e as. [nae Mot sepalar,, Bebe * n 1 APB) tot oepaler DeeL, cpt Scanned with CamScanner EFG To POA B=! bet & be a CFG given by Safer fanen Aa BBla Bopacls ot 62% £ Sol m= (83, fab3, £,65,9,03,5,2,5,8) 42,4 sya[l, ones), (2,208)3 "9 (2,¢,0) = £2,988), § SL R= £(2,b88), (2,3 8(2449 = Ge) = | S(2%) -LE2) fg 02 Onvert the grammar to Poa thal accept tle same fongusye, Sosa Asinosle sl” 8(2, a S)=lG, ost), @,A) 3. 3(2,0,A)= {G17 (2, s), G28 $(4,2,0) =, ) SG) etk m= ( £28, $0113, £5,903, 82,8, 6? by 64 _Gmvert G to PDA - e908i foo | st 6(2,2,5)> EEDE IE, 3 8(2,0)0)= 6) $(2,4 =U, £) > (£28, S13, £01,83, s, 43,03 b+ Scanned with CamScanner -( j= ak” [9% | Sel [soe ve £883 Pl Sab T=S0,b3 Ab £ rs Ax Cnsfouet a gpemmay Pre get of all stomp of length d. sel [a on RTT OR * Qe tb) “h O# gaan | azalb fs a3 Conctoucl grammer for ge a, ac, aaa. A—aAle }) tes. (a LE) L guommor fer set of all ctomys over (a+b) SI g-yag/bsle px 45 Selick all etormy of ength ailear# 2 * ee * Gaprrn) Gany” SAAB A als . Beab/bble | Ms tea" [17D Q4 Scanned with CamScanner 6 | [ehh 7) | AVe[blE | As Fo cd-ef all Her dasdip uth o erated oF . 2 “9 zp 0 (ath) b 4 chsh cond, evthg tart Affexeed ayrabels a (ett) & + bletn) 2 —————— | srahtlet® | | pan[bale ewe) evdlign uate fame zpmbel aya fa bn babe p—an|bale. = = bode 2) tating L yt 1 Coratpct Creannnas, Per A (n>, WS o9 aSh [ab fat Ni e , td of oll cece wir yp wan Dodo safe bsble ja[ble Ceentedd lerglh > ¥ ae $9 ose [psble ‘even length palirdocmep. gs abh[tSblelb ocd lerytts felineloeme. Gd of all doves of even lee. sone! fs) uy) EAA A> % 3) Scanned with CamScanner ia & [= ang [rym 71 an & SAB A->aala B-? bBI/b (DB pe ae [nal st” 6a AB A-aAblab BeBe. G ‘fe PB Cd" [omy | 68 Azafblab B-> cBalfed | h & be ab (ma! cM SA as bifabb @ Ie agra” |nim | sf , gs aSdfahd A> bAe(be “BO abol [ad dean Cordert Pree gremtra- Is net possible Ae ft @ beare™B [ym 7,1 Pres aqgebb Ss AN JAS b “Am. aA b { ¢ Say aS bfaAb Aa cAe 6 aes [nx ! Ss" 9348S be fabe. FQ lear [m,n Qn aE S38 late A> afb{be QD peangerg fam>) ab? Be” [mma S— AB n> anb [rb 8B bBe/se _| A Scanned with CamScanner

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy