0% found this document useful (0 votes)
14 views

TOC Midsem

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)
14 views

TOC Midsem

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/ 52
a a a a a a a o> loclss Ph + Syllebus DAlphabel. Lenquager» Sypnbolt, Grammer ‘ DFA. DEA: pitta’ CFf--frite autornat » 3) Regu exprewions_aremmar 9) Ppa A _aubmta S) Context Lee language CCFO) A Content tee Grammer ‘Che » erachhee CIM) UIM Sencitwe _qremeer theory Desiqn of TM, Tuning Thevis —-*— machine part dene — > Deerdability 2. _Undeenbatatity 8) Reducabihty i os aire Complexity + class P, clare IP B) Space Conplexity —Psra ce, ee * Bocks)- Ihoduc? 1b _ theny computa” C29 gatibond Lomichael Sps0r | R Sek Ahern), Functions’ Mapping (Relations). Dserete Mth cca «flan Tura => fiir ot CSC Brith Mathematician) wreuorTe = * TOA ( Theory of Maorittorn\ TZ Algorithm & Computerble are inkerchangable fermi here [2 understoind the Imita of oe ; é L- To identay ta Bert it Geeta bla a Ot ve § % po Re inferctable. wblen, > inmita™ of harcleoae Dhettant tthe problen — Urelecstand the Complex da patten recogni” modeling natwal languages. Compilere & oterpreterc- | informa” security - * bengquage- ai ¢ (Compute eno camied cubby binge, symbdes, « + Aiphatet Fnite set of cymbole; "7 Sis rrembers art Called (ethers Jehowarcters p heaal : poe Fat epaillon. — Brnite sbhing of symbols. (Empy hloret- é cay’ P ~ Acoord over alphabet Ea trite sting of symbole taker fom = a 2 2» > » 9 BPelehalah a over EF is a et of eek ee hae tien sac ree i > Ki all the pee 9g hee > Universal lang, ae tine Sa ~ Kee Language ae < GAS. = sk vs kOe ee + Sample = language’ — Evenl- event: SA sring «owe faub) pohee ak b occur : BiPoiposisals pt LE fenjoabl bem | — poupre-WioRD: [2 2€ =e te ney ' —_pacnibRomes [AN strings od some fortcard Ba lackeoncl | = fa, 6) aarbh 46% beb, ay 3 Definibons —Teorernt ) Proofs: ast bad L Bie A venti te Spe ches Ta Rea lr statement ead a ip Meee a Soni eee Cpropesi?s Lerma) og{oe/osz (Tutoriale) —> (et ODD-OPH be the language of that conta odd no ob A odd no be: be th complement « Rove that bee: ‘ fa, by t shings over the ap Let obf-opp fab} Y ODD- ODD > Jab ,Qa0, bbb Abas bab, + += } Compliment a of the language Cpewe nis —— 708 ae torent J v aN na 4 atthol Coe a ee ig Hee oe I no ae A 3 exe be 2 Palinctrome abel bale let a be ory elemest in the cli palindromes We pabindvome | opp-OPP then fr VX E Palindrome ; ot choutd alco belong te ODD-OPD lA Nata i {(a)(b» OGD laps aba bab, bbb» >> [Oe ENG Ge Trane } oa! 1-0 g4 //2~9 023-0 ba Aiek. Ore = akira ie ' thon b « ADOe abab (EL SF " babe abbe WEAR ape Obp -opp Universal — bbp- opp) PALINDkomMé €& Opp- Opp ever) [p80 Fe BiB O Af Pal af a ROOD ——ptodd no ay 4 odd) Debs Mi ce Op) = op v aq iE DaRee an EIST SNS * PDP OBD = Gwen) gests) .R. Céven no be) ee fasye ye aby >C ) ee Can, ayn? » Wwe PAUNDROME._ ether ne ose no bt thes © be cxen Pvt@ AR) CPvQ) A tpvRD” Using Beno an ries > (eve) Frowe rade PA COV &CPARD VV CPAR) ~fPvceap)) 2 ~([Levadin Covey) BSD HP A ATONE) ee Cpvad:y oCPVR), os oP A (-B VR) BE PAWO? V CAPA~RD a i bet ha Ply gp 8> Q's wee! ne" { Patalyedi= Crag) vc Mra) i Ce. Mi ct). Oe detest PN NO __ OI eB DH Ay he Lee Pic Selita we Pilon)? ~ (OVC) eae: A wavered] ~L Pang) V (werne) ] ~C = OP WE yg AR Yyroi DA pe ee Tee[S[e Comected + Hey clic Greeph - ; g ©. Tree ¢ Byees 7 + Simple, Undivected, Brite re Ni ‘scle Loopt hs Bi- partite Graph None! qv + Lead > dearee of vertex = | + Tree: Te ‘cpeph fal Wee Bipowbte: The graph te Bi-parttlc leah: re graph har a leat Interne) 1 The areph has a vertex of degree 22. 5 cidocades CONF) propost” such that it tool say Le a graph i 4 bree, then itt bi-parbte and hes a feof ,but + is not 4 be Hen te har a verter of ps: > GA oT2 L eReprecesting Cssica) Staternent# Nau are planning 2 tine, party. Your guest liskimust have. J. Atleast one ct: Kaustav, %& 2 Koustay onty if it alto how Snjay 3: None or both ot Rakesh and Gautore 4 Klo mere thar one of Voldemort) Rellabix S AVAVHV V és OS nepn = .gve. (~KrO @©= @naq) Vv C~CRaG)) i» RG @We ” ~B A~DY V Give AB AHWD)V Ye A~B AD) iHritik, Vicky Dolares __[n pairs > Gis, 28) Vo CB A~6) Vip aww) —! P ee No more 2 than | ae (@= Ca% VB A C-B V=D). A CyDv aVo) CNE. ss oven A Gy NON ace) Ses DAE Mea) Vv Ca AD viCe able c ows with varie 2 is Mes neaetn gate Gt bemenkt Ee Ce te ( Prime ) ees Ciny Value ie ateocrekd ait Reet? A tate Sh esti vatalles, euebh eee any Values of the Venables, ik te ether true or folee Cie, becomes 2 proposi~> Domain: set of — permitcible Values for the Variable — Argument? Ne arguments in’ the predicate Roig eS k anqureet FT Molten Gulipagtatane emotes ht (Caan) ai ect ye Ne a BEC) no arguments Predicate Boman 4 ee Zz Hawa) tf 1 2 Se 2 | igMother Cury) | SS | Precbiate - PC) pid ai Mois y’ element tak * Tree ic a fly th my soup: i fridenbal Ax: Cx iea Ply AC% is 9 my oP J 0 fe + rece risks co auch that to ts vee aah makes | Fo: (wer) booed moo © SE SCSCRCECEE EEE EHSES SO * Breryone fan pase this cubject QR + canRase (1, subject) Oniversal Quanbhe AdjpCry) : vertex X RY ave b Some boo verbres are not ax Any: ~ ad; cury) 2 be vertex has an adjacent vertex eg a 3: Brey vertex fs adjacect nother vertex | 4 Brey pair of verbo are adjacent exarpple exhaustion conchasion conbadiic boo thducken an4_CV Ramanujan Statement * Bveny rabuca|_o_ic_lntereeting: * Peoat a ic the. smelles® nabual number which ts not joteresting + = but his property mokes “b interesbh . Cente) Hence, very natural number be lnteces try Hardy! Xyzaisih a CU PUPP EPEPED 999.9050 9-7, Fist Ponannn nA MEME ia, dUhea ae Wa we Parameter tobe applying Ht ! pA pot the bal Late $ CUD ther 7 A st Iugpotreris (kL) —9 SUb1I Ds SCa), Gr time for all. ¥ Por v ve NPD = aRAw hd: wi: SS Induce be Assume thab PCk) is fue Fypetherie = acy tna (Aves. wa. Dede PAM Pa ene chee (kat: (AVP Ve-. VbeV Patt => 6 OV i) => eh A P+! => mPAOR - 4 AwPel et alee 4 By Method of (actue”, CRs. we - Conclusion | THE bue tr all 9 © SCO): [424--4N- nCntId 2 ¢ PT: al) horses are black “My colour: CCCECECOCCC CC CTTI ttt; “Art of Comp Pogrararsing es “Dewi Fun Tere _are_20!'Y_many prime n04 Crroor ey Conireapic tion!) fe Sa > duel > Pee HRs: *PR AI ___Q= prime numbe: + ____=: Infinite prime ner. eee VE_it_iwabon«l = ee = n= C04 tafe 2 (mina co-primes a yt yore ee Sree elo: A set & countable of either te is finite ____ 2 \E can be put in & one one ee A. ——Corcespenclng Bijec® _esith N- a DD DD AAA Diagrolizabioo- >labat Claim: TRe_set_ of languages ..#6 wnceun table. let there be countable. languages Ae, Os bijec? con be established. ae @ a 6b aa bb-- 1 ae Salto mate Se eee Ht a_sbs to, ee 3 aoa = = Our _ascump” (aes _eorimg — pees "35 be pe ae Tee. raocr | [vat noe al. ! P28 is tue for pe tates | : { 225 | 7G A ome i . I Lee x Not plnax Planae ‘i a See baht A \ 2) ESTES ee ee - es { Problenme |= __ ee Upeeieean ave ae ie a Goagee Coen ee emails containing a_tedain word rrailtiles: |a. -3: Refommatting sbings in & coc bared program: 4» No visits to a cebsite er any Spectal Ink. aocen \SD ee oe on Ar 7? i? 4P JP SP SP EP RP BP OY OD ee Fee * Applicat oF Regular Gypressions - ( Pibleme -! 4 >> ) Useful bool to tesertbe pattern 2). Useful in seve! pregeroming languages 3) Used ih ection likes vi, Som shrearn-e dit *@) Filtes like \ e Gea, geek yak: pases SD Roqpamming Eee like a, 9), bn pee x Regular Expressions ee eo langue . PU > Empty language: f 5 Lenguaje 22k conastyy , © ( = on of errpty coors EAA ke ere fos ] consists cl aed Tea , of B shoe conch bo .— 3 ae » abbeb Grouphg Bese iab bab} dicate by © —> trite ae corte + Anile Cab Ube) Ce vg) = : ——-——} . fabasahqy boevbsg] -abi: fo ) pues able » of 1, since * ‘a! PallovsecA r mnstance> al Kleene Ste Star \ndvealed Pg oi 2% ©] more instances ZAr0| more (a)! > goatee et"). act Prnore than one EVURE RP Occ UTE ! | LS * Caa U_bb)* Z = Caat bby UV Cac LbL) OU (aavbbyv Caaveeye- EU (aa bb) UCaavbdy VU GaubPo: j &, aa, bb, aaaa, aabb, bbaa, bbbb, aaaaaa, caachb, oe Per oLbEs hamat hance enn + Regular Expressions CRE) a for some a tn the alphabet = 12 E: erephy tring ~ language 3: no stings ~ language 4 CRUR) here RB, RRa are _vequler expressions ba regular expression. 5. (Rit) eohere Ri ba requler expression. 6 CR) there Ri t+ RR * Regular ley e i= CRD -A language Hhak con be defined ky a RE ~ A ashing ow € RL BS is mintchasl Sloyeethemeommaeinon q- @aUbb) U (ab V be) Can Ubby* Cab Obey LSeyent- EVERY vague language XyzaiA TOSI GER, Su gona: ped PITS egg posed sy qq — Lay a Pare aS. PP PP 9.9 79 > "Oonnnnonn pre tn D: (o-9) [rreqular BP: Be ppt: J) - Finite Audorearbon Cradi- dha Delerreinictic. fi is — Used & dle cheke on et = Corre me amie 4 regular Lerguage — Used 8 dhyng RL = sek th lenleogerphical analyse ClextcaD > Inbuis every FA hor a ctewt — but can: have eis Cr cites : afl hat alleast oS eae 2 ate A a jolie . | e \ G&G rrtame stele | Qe onion | Ae pond | ee oe oe of ee POSSE EEO EY > > % * Every sbing thet is Pasted tnt a DPA always traces unique path trough the transibens for the initial sted — ends at a tral state then iy accepteck, Tabular Representa” of pA aise o Aine) 3 Acceptance of setng th DFAY eso Sting i accepted Ly ah = its path ends Ka ie & stale —> Olheriise its refectect Recognizing a language Hy DEA: 2 lange wage it recognized by a FA — sct of sbrge Tt accept: Alphabet e Bee bb Porn it are usecd tv build) there seeing Stites CQ) each crate pesto hore all possible ol {phaleet _treansint Trangtions (& —e)* Resrrine Fle frorname stale te olber soit Fal aa only ane cet /o, xpiterl rite Autornata (8,2), 6 F) | Xeaah CR dag -dag > as DD ODD 9 6-9. O6-0-9.0-@-9unionna * Secit FA s- =- Fab} AN coords accepted 2 No coorck —acceptect 3. Only empty coorol accephed cS 4. Only Permempty coord accepted “OS on Ping amee tst By Cc eee ait) a @ Oss) 2 (ov tengin of ebetng 252929 Da states poring FE ttate. + ENENI- EVER! BES = Za0 as Rxero be accepted Com stent = tinal cg DDD DDD LDAP IES +ODp- Op Dee: SEO ple [Be mr Membership: FA | Casy Pa | | | L Compton A] [easy Non- Determninisbe Finite Autorna? (NFA NEA) = MOR (=e) 56'S eee pa i y Tranci™ = Combing” ~ for come states & letest Hrece are PCR). ans E label may tnclude € Tee skate | Lees x OP. “ai one Fanei® poritele move than one = bra ae have fransi™ yzal IK a pes 5 apenas . esc LEG b i (OC —O-2 5‘ ls abbbabbbate « accepiecl } Cw Qe r “ v } eee [0 / ‘ Seg ntchl poe oO Roy F oper = | Paths form A Petit Os | ee ee ee ea 9 PAS NEAT RE \\ 6NEA A we er equiva Ay Lege erpressive Poet ith & Kleene's Oren :- Ary language echich 627 lnc clefimnect by RE, PALE A “01 _GNIFA canbe dlefinect by any of the other methods BE te NFA Rs (@ Re: aC Caby¥ vu Cbd? * bai O- @ al Gaby U (KY O @ a oC ee Jee 6 mee 0.520 a era 5 a A Sa __.) =e =O = a on NN ie itt > > > rose al bitet CUO Pg C®) Design an FA adhich accept all the ctinge th brary hoe decimal equivalent i Aividible by (89 ffehs ( Tutoel> Prapiente ack - vised: (X,Y) ae Supe vis. oes Si fre superuiter Cee }( oP Alan Tur q Purch coast the OD supewitor of # ae EB Supericed CAtonze Church, Mer Terry) : ise a D 2 nto person Supenisea tneir ae a + Abt WD superitor, had a phD Superuiror 3: wb a pl Pax de Vy SE m39 —> ~ $tyr iu (Cty sCup rn Wy :Caseg ad a . supervited only “ one persone p 4. Den Tung supe mache Meta x) \accay Peeled Sd Y ‘ SNILY ONIE soe for 4 Ye: (sy) su: (sla aed asa a. Cs Arma My ( sth ay?) CEETELELELCEL LCCC TER ETT 24 is Sam Ltt herictttary Ht tt hax the folloraing —— I een sbing ttn Le there: eee beara | tate cam be dleleted fromm ab gre ander bing Le | Rove Hit every non ermpty heriditary language contain a oe comply — ae By CorbadicboD mL: dees not bane tirapty A aa he ete _L\ssump? : aa a@_nen-crmpty language: _Chedditery yo, ia Consider “Wa sbing_C shortest le length? roe exis Apply the property => nel pg trai 2 Corchadie 3+ Design an NEA dox the folloesing RE — Carb Caavb) f-— (Cup) (cob) mo (ad bbb® a [— (aby aa (ba = eee Gabba) Cae Ubed * Canubed = Coub>* Caa JED __ a pL aul) (ae a ()* @ ar aa (bay bay” Sa Oo C.—— © Ome eh oa eS »O->D- 1O-= OO rr) 8 er 5 1 Re i ep oS 25m, @ ——— ee LAPANAAL AH AAAAAALAAMMARAR ® ia oa \ ) ~ = J tent cate $ tor each WEN nlexbStofStates NFA foeat tok O TS Sat al “SULHEEGOCEHEKEOORREEEEEE EOE J mi i ] SNFA: Generalized NAA Fa y SNE ks A pease! ie j L each __ef language Concbuct a RE defini eo c low the alphabet fouby ork Hey 2 lette D+ ord: that conta 2B! oy exactly We opt m : b ool : that ende colth a double letter oa : RE j bb making 4» + fo not end with a double letter a have even length WAI ching, that have exactly one double letter hit Vi) -An doings in ciich the letter bb te neve bippleal ie me weve torkains the cen bbb-(a*( bUbbD 4a* )* Chubb UE) Oa 7 OEE GQYbVE nave, viaGaor0e = wo aN @ Be enh n nde 9200 £20 0 6 6 OSS GOeeteee Oo PY Ae strings tot, nro double \cttes . He Pe rot end ath « Ceara Cay = ye does not ater esith a C starts adn Deepa (buy. Bea. Ca” Daye EE WOE aa. Coa® Choe) wore Hre base Fe esc’ be Cab® Caved ‘ by Q@ @vbyCavbd CB (00) CoUF CaF VU A SOMO) Glee Lelass*Cave) aub alk A & —o*40++0\ odo ee O ae ae at ge aay oto a 08 4 Te */®,v * Q ee a os nile Bn oe Kde 1a" daca audv.n,) ie ee ee DBRPDDDOOS @© NFA & DFA toe din ets.” pr ee! Vv COCO-B-O-04 v a2 os 23)0¢/23 * GNFAY Geneaticed NFA ensure a single Fira) state Cro outgoing brani.) -ensure a single start state (no incoming transi) ral 6NFA cath woes ie... Ps dhe date: ‘nstates sy ete t gk Re. by meging oe stedes i CQ bibse a a oy 0 Ae eel o See Bete Qn) — ee, ed Noto: etateC eee Hae 4: some Be fy, any. ene gate Joukfor any Wen. stereos trond? form VN wy PemiRe o> ‘P< the bans? from W — ne bow fom 4 © a, ite b out —— fom GH? T# | RAivect: Reon he yond? EF ; [g=2 Las 7 din \ ance a2). dak * a a @= = ‘ eR sike — Uh +3 34-2, Pout I , List @- Sr fU bre es a\n— | E es me) 2 eee =? out == m o Rais : he Ub ea ome ’ Fee (= Nb. pit @ oes ? rE ei 3 & © pdt [i ae I eon ft ore ee eee eet a ee I Se gf Oe He Y,% , be 6 6 @ Sbbbbo&b& »® OOS meet S22, C5 % ; (aves) U Chua Ca0aath) U (bbe SCORCH TIRITTON LA “Bape of Regia lange sles nian e > Symmetic Difference a Ces GB 3) Concatena” — Covtesian Bocduct 4._Intersee” Ce Ss Set ean: clocedt Under complernenta? > bee 2 be the tarmplement of 4 vequler lenge > Ee = By Keene's theorems ia FA that recognizes g __ => Cormplermnent_of FA extcts- Sa — accepkeA by mm is yequler = Se pes cation a a cs ae =e language is clored Bote union * oe let a ay Rise ek Sttpoece —AANRADN CONRNKRDERDREOHLL T 06690999 % Cavbe ObathS back fae} & fz} gonad ene ea 16, 2h @etuned b Dial \ teeta oe OL, $92 #13 : Cyae oa ath) @z2e}), eo £3,441 $309] BAY Ge = (O=Rer Sf, wind oe | {sir 0 Ae, “perre a) je : F fesse? ot eh aD aoa lp States ee Bi Je, aur} Seon fae} final on Stakes ; he ele eae 12 el { L( Y 41 7 pee Rees 1D) ty 1D ian aa oe 4 _1e9 Paty | a iP Onn a Pett cree ritttttttttiittttt LbL DELL LLU L LULU LOC UCECECL Min = DEA Algo: FA simpli-fica” " ip: FA = Colour all final states esith one colour > Colour Ql) non-final states asith a different colour = Repeat — >for each colour usec so far do consider al states coh that colour — FF tere vows do not have sarne colour pattern que cach diffecet rowpateen a diffecent colour == UI no een colour hos been added inthe itera — Gyre each colaw & New number bo genoa aA Op: equtvalent FA coith feoscde _eclourt. Sol oel>3, H (Cash no os & os = ERVAL= } ab aakb, ahabaabb, ~ ARITHMETIC _ EXPRESSIONS AE — integers —> fet AG.) ao ao fee Aex Ae | qpocee! Krese Ae (AE Gee) ~— Backus Naur form Cate Boku lone! fee) = SA Ji _Backu: et al A — mte Comm acm _3(5) Cvel 3 iscue 5] 2 _EQUAL + [sé] 3b followed J. Must contain & We ching). 2a tolleseA by b- type lnquag LS3— ab) | axtpe lenquege TS 26) by a= oe 6606 . 6 666666 B66 = Ae |4-clare] wlelo thet has equnl op as & be- ls Contains cine [Her & fase | 2> Contant an S= bype. bog sees fas) 3- starts coith_bollesect by 24 type |A— bAA x a 3 contains _doqle.letler Pa 2 Se Sie 2. cockctine oS Ape trg tpg EES |_* 3s dents ith & followed by 28 tec: B= a SB) XKyzaiAh mae eo LP AK HR 4 nono DELO DOE LEELELELLE LL eee: 1+ Conte’ free Grammar CCFG)> | t- Alphabet the lettes ' phabet ave call 2 Another set of symbols Start symbol Ron- termine Ipre 3 Finite set of produc” rules + Context free language i the set of bing by the start symbol of a CFG Follocoma the produc” * Sai: c CFG y Sie Se a 3 Y rte 5 Red y Per s—as a Pees, CNFE > SE os 48 a ; i Ia)\oa23 Netiak -Wbes iets SOE — FOVAL: base bea Vaaast Bea : aeaioe 2 Stam ‘ [255 , Bie haces zs’ ie: > (2) g—bA (O “S— Laxaeeue © Roel ®) S~bas @ sees Come baat, (PS beerePRE ay (9 S—> hbaaas 9. Boa CD 6 —baaa” IDA ALLIS ILA, lea lan. eS 3 + Dyck anqueg @ feCo>) > - | S>é ie. > aCe —_. ea WE 4 B> OS . x Gcoey> 5 R— CRR aN se a> S—>(sD Paoai-eeva—/ Ys sue | Cae rae ot oO be | s—st\ AE binany search bees Cro’) pee SE Gcpression ( 7 ae Z : a Be ele |r me ct 4 | £4a Ident Fis raAwrerrriyTtrpPppPpPpppreps iP = Th SS Tt — I daw o 7 YON — uw T 4+ é€ i | i t ! oa 2! + r oe VO op pe Lay oN ans ene ene , Int | l Fat ie So AB botnet See ee “s guint? £3 AR = AL | Ss > ea hero to HR A & rs ) \ é \ 4 b Me & / $ FSCO T TCC CCC CECE EG [fales) ~Semicord: a sting cohere all ter gle eee eee of tye CAY uae CEG fs_a__reqular Grammar Ik te 9 one of the foige sm pe ae oNT— sen Q sage =< NT = set of deemgnal AUTOMATA Cppa) Win} —NFA coith a stack Gn be used repreeent CFG ~ Usecl_in the parsing phase of some Compilers a an < x a eae Re OPera™ ony stack We En, € | ba—é Lypush i i. 2: Pop yet 2€ 3. Special symbol + Tranci™ KY — Zz Chich rneam when machine is reackiy * if thece is Y 00 Sp aA tre tack ,it i replaced ty x. SP KE Then ne letter & reach Ine no letter 4 popped fron the etek eee ic € IZ ik © hen re letter & pushed! fom the stack ie bet SE falc ie IP PDPPDIDVIPLRACRROPPP PDA. tAp Input alphabet 2 Stack alphabet 3.fiite set of stoles leas state Some Calleck final cterkee GSA SeCOME eRe? (is stale Se Depo. LA sbing © acceptect by a PDA if there exids atleact one path thar PDA br thi: sbihg that ends Ma Smal skate the 2. A sbing is rejected bya. PDA all paths hrs PDA fr thic bing It crashes Gr ends ha Non —fnal state Theorern:- CEL. & PDA —> We reed) bb shows that fr every CEL Hee exis a PDA thet vecognizes it Ree) CEG. can generate a CAL ~~ CFG consists & femninals De —temrinels, a start Syrabal ach produc? wile Ne Ge cencbuct a PDA fra glen CFQH PDAS stack alphebet sill contewn the stack syrabale weludling the put shing's emnihale’ ancl the CRGY Menten, 2 he Poe tency taill Minte i produc” niles of C4L ‘blceee proctuc? rile Amfjee creak ait of bens 01 POA dhet PPA arct push B onto the stack, ACTIn) p.cbigeF femite \ S We al Mead temi bance € bend frat pop A form Be stack tithout pushing anythrg {POA mnibal stale Comesponcts te start symbol of CK S=_ Foe — Hik reaches an ace phn dale cath an emphy doe ~ Gan shrnrlede the parsing process ofa Tete TIE PPA tan erophy ilk stack and Yack an accepting state ip biG _ic_in_the language generated by CEG. ib mCFL —Comdsuct @ PDA thet recoynwrer ory CFL gencoted by a CFG = CFL & Ppa = cert lererg Bb i We need to shes that there exist a ppd shat recagnizes L coef wel 9 a lef moat dente” tr L ldecr: [ft mot deriva” con be vitewed ast = growing aprehe of co that toe rece tobe conect: = managing the vest_of © Cinclucting all_abn-terminal) tsth a stack! rarer Kogert ae? ES stack ees pe xX Spex’ (x = ae S— pe Vez. Yoart Zoey } oon lan at oe Bev er cdc somes, Pilex!- xX »abyez- $e Leronmale At, -e) F* rok bee peel noting, pep rothes | pe “ \rn? ya 2 ~~ Produc” No Autre: ex pansion pt | Pinke | pate R4 quae that thes neq to generate — the PLUS _ | i E— Ere o | nal (ESS ZS Il eat X-parse brees Combigquout) 2 dmerent Gframmnare*= E> Tre oy &>T pS eee FT Toe ; ele c . Unet amdquou) LR pasex:- i ~ Eoltom up \~ alba CRGe have such ~ Left +o waht | posers + DCFG RE CRG. ~ Consbucb a wight most deriva” 5 reversel: Dayzal a ~ [mplemnerkeA using a deterninste PDA. | ~Shift IRecluce@ SRS pease” sfqla3, [PDA <= CFL) Pte a a Eating rec 4 —We meee to cha that 3a CFG that generates L Pes make serre f ene ak oy nized by some PDA M ~ Then, exe ghee proctu tyes M — Modifica’ slack .™ i pug at - E> NGS popy "push 2 PS. > SS 7 } nok part of our alphabet — A sbing ts accepked by M' if one df tH path tu M' stave eS) nh finnh 2 Final stale Aesth an aD Sack) ok start and fnich Ba ey : Pe Foc(any) paitoh stakes P and @ (Dan cigkodet 8 ang “E (Apq general, inc accep voit stark p Cemphy stach) acd ecd_ak 9 with an emply tack a me “8 3 (a) Xam PULUUEE OU OCU OES Goal A grammar such that fr coy cbhg chich fe accepted by Mo it can be devivect! Lorn Ae Conticler computa” th mM fr a Shing © cchich moves fom pe q oth empty. stack at ‘stat ant Anich Case=I* Tre computa® hac an empty stack. at some other stoke ‘Yon the path then exe can break computa” from pte 4, into 2 pow bs —> fist part qohy fom ~ toy? Cx acting A encting cmmaky \ ston pact goby teem OC In eK ] oy Ara) Cs Cron-termine) stated \ lv] te = > pe 5 BIE (GB): “) 2, z ph he , < oor : : Gase-P. The cormputar” never has an empty Stack except pada, 28 iE ctovts cind finfthes colth on empty stacks 5 Fist bonct? must push a symbol We stack Sete Gancit? must, pop a symtcel fron the stack Q symbds must be Same (say 2) elie the stock csoulel howe been exephy at SAG PA the Symbol sterys at the bottom of the stack al\ the Mme a on ll ——— ~~ FVevVevesyuVvuVTVUE eee gg eee ot c 7 Rock ~<_¢ > Ast Crake oreannnes ) n\(> ctinuaO-d pages back) (LR parce!) —inibally empty a ~ stack Cconsising pf! both terminals A non-berminals) CP Ru- initially full stir a ctoting the dp sing) Creet_of sting tobe py —ShifE + involves moving symbole trom the ip fauffer onte the stack — Reduce: # handle Appear on typ of cack = RAs CPR = poppeel Las CPRI> pushed wcteck — Accept: if only start symbol it present, 4 ip butte ie _erapty then the parsing ac’ ls called accept: = Bor: reies chift_nov reduce faccept ae" cam be wel 0 EE ee ees Pewee err ever rere eo eee Exarople + Stack Buller SRB (1) — hy so \ is bP < Book® 0 Bob (a) i es SEN t+PC Stack Buber olp E> Ere E> EE) E—ilY) etre aor Sere etna! Fon COANE) PL grammar i sel te be i5 CNP if evens procuc? rule ee 929 - termine! etther: NT CnT(NT> Chve produc] oC Oe aR CNT = T (dead produe?— “arg. -Aavthe: » Theprera for ery CPL Ly the fonmermphy) cools tn L ton be Stor each fernine! ave ik 0600 eneeeepanding NT that |= 7 Ye ME xo Nay > zeny xe ZY poduee & Break down sales thet proclucer ot E 2 non-Bermina giving whee bo produces X fy \-E linn” of E produc™ a ss etre Ya ; ___y= Px | 2-2 BRO pir PAI eae ce Cee ee PXQX - ae — PPP P2PRPRPRA?®? TSeCOPS EEE SE Rue, (Step) |. forevery product + &> &o bcd é eS 2° vw 6 xe (Ce preduc XH the beely of RHS reer —~ for every rule: 1 cet nee vules coith all posible em oP eceuscAer oP eRe by eamamaerakatelat 8 ) tot aR keep the old wile Crenmove XE) “Keep. doing this bil ro & prodite® iv left: 2 Poy every produc : XY Cunt _proctuc™> xo Vs ee anbed Td ane ven, a8 prostiltee(x C2) ~for every rule cath Y in Lng: ~ Creake A%O tle Ckeep the old rule) Gemoe XY) Reo ples BIE Sep fee coh 1A LUE incleoct of 7 (3 Give each terminal: Coretponding non- terminal that produces it ie Gra G) cee t a non-termral Xe and) cone rule X-® replace all necs non-terminalt 1 RHS- wT ie a the NT qroups iO the X22. 222425 tae ace ~ create recs Nils te produce ee esactty i: ce = make sure all ruler look [ike Zeus > 2sytr Xo YZ) x Ze Zus nile

You might also like