You are on page 1of 17
7 NORMAL FORMS FOR ConTEXT- FREE 4RAMMARS (11) Yn CFG3 RUS of & Production com be any string of, variable & bevminels. When produciow sir G poisfy errLain rebrichions, ten Gu A0id to be iw a “normal: foun’. : We shucly 2 novmed fowmse amore many normal fous i Novel Fovm CONF) fi meibock Nevrrot Foum Cane) ee ie) a> q ; ew Ot, we CHOMSKy NORMAL FORM (CNF) CP or dis fe CN af everug production ds of the pou” aa: : we AG avo Gutta eye oo does not appear OW Pe dione f.7Sc 6 whun A is me Leg) » Wwe assume Uhrot aeRO ) ais ge ae eet Bae tes Oe ee pees et Lege RepuctioN TO CNF He Ris canih om tue oo Yreorene 2 For wery ; Gq in Chomeky guovmol fou oo PROOF: - Construction of Grom ee j ; kid ster klimmimation F mutt productions Sg ee. Se : ; ( afi ott 2. elimimotiow of demote on : CVn. > ° here PA VN an construclid We defime Ge os fotlouss ‘- onl : daw P of the form Aa BU, tas ia Wkchec,padin te in Voronin leader die Nhu! « Scanned with CamScanner & KY ya consider AX X2--. Xn with some tevmunol on Ri : pdd a nee variable Cato Vi the f dw P,, the RHS Consists of ther o DSA) OH foo or more variabler, (2 ,f2S) Ds follows . Scanned with CamScanner Scanned with CamScanner GREIBACH NORMAL FORM CGNE> i A CFG qunrating. thu Aut avcrblad by & PDA is Au GNF. | *-. A CFG is iw GNF J ja of He - ! Arad , whew EVE amd ae > (x mo be AD and SA is le G ip A ELCQ?. When A ela wwe” auuumse thot S dors not appear on RHS of Ong NOTE: A grammar iin GNF ia o- nabunal, qunmnadigotion Cf Oa ae Fr LEMMA 43 Lt Ge CWwr EPS) be acrqg. We A—> BP be am anager : A production Am P. lt the B- productions he BP i\@e| |B « Define yf P- tA eva FA—> BY \asvesy apie ares) FS equivelad t G- C To REMOVE AMBIGUITY WHILE BACKTRACKING D 4 peng) Proor '- 4 we apply A BY dm ome Aurivotion for wel) ue frowe Lo apply Rep; for ome | ot abot MeP So, ASB: whe effect of applying: p> BY 2 el’minating 6 q hy jn grammenan GJ the Seem © A Bit for 40m i a qprormrman Ge Perce etian) cg) ¢ LC4,) . simeLaady , winslead of applyng. A> pi? we CaM apply ABBY XBRL to get A pit . Ghis proves Login € LCG). go ah|ba| aalAss gobs LOM example P= 7 A—-Bab » nea A> adab| beak | aaab | A Scanned with CamScanner t Li Ub G=CWws2oP, ea. N92, PrS) be A CFG: let the Act of ie percictbconse be A> Rael ts. | Bilas «LB CPs ae oat with 2). Se let G, = (WU A235 TPS) where Pas defimed 4 (iy Ye at of A- productions aia P, tue Pee isle --|Bs A —> BZ \G21---|Ps2 tid the Ask of Z- productions He PrOre zor ailaal «lon Z— wiZ \4221-- sola Z un Show (i) Ye production fo for otter variables aw ou Gi ds a CFG 3 equivedeut wg (to REMOVE LEFT- RECURSION ~ Loop WHILE ae BS it Sg La Z— ie oe conde sidiements ~eonaés o Bond te Wee ines é opnindan O a eftmest derivation poe A> Ady [Ad |X - HOD Batt leans LEADS TO INFINITE PROOF: - To prove LOQ?rS LCG) 9 Gwin G: he only produchions toe P~ Pi 4 A> air WiBac re axe used , them A By te. ie TERRE? Scanned with CamScanner To prove LCGOS LCG), conscler a Leftmast darivertic, of co dn Gi» Whe only productions tu Fi-P ane Me A— pZ[ p21 --: [Bez jZ ray | lola, Z2KZ beZl the Y the mene sortable Z appaors in Lhe Course Ob 5 derivabion of 095 at Ls because of thu abppbicabion ARIE dw Some eortivr stp. Atso Z con we eluminatad only by a. panduchion of the fom 2d; o 272 Gor Som © aml | iw a Daler atep- So, we get edie UA the course of, derivabon of 0. But we Rneur Bat oo CELE). é + loaz Gren ee sean ——aleip Nelo Kp AelbO Ny procuctions net Remi 8 eos hee cA Zz reels ee Eee : pu to GNF Pheer + ian al a crG G tu QNE. user CFL L tom re Cuten AEL) 3 then comstauct o. STEP2 : To get procuchions sm the fom Bee te Aj- productions Ai + AVP phe j >v » comet Cie eeepc) Scanned with CamScanner 7. b the form Ar — Ay at. jri. Prove suck (pp mocicfiakion ix possible by tnduchion on i . Me Austions. ¥, we fou some Ay produckions of tae foun Al Aly, then we apply dumme & Oe i, of wash prnductoons Wh get a, rine aariatie Ad Zs ack A= Parduchlons of the form Am oe A? NT whee j>2 hus, the i a boats for taduction . Tbe tobe f ) Ay-productious » A, poi _ oy Ace procluctions . Be 7 to -. GNE eguivelat soe Constant oe & Ques: eatin Ravssho: js aa CNF- uy CONE & eee » Pine given mn” C Rename ) Sn, napediicdy nweg M— A, ANa ok Aw : : Cas jot ane le gue Ree aa, =sA P) sg A gare ‘3 js da requ W A, Ac ANY 1 1 ae oC pe Ap AAs Al (aA Puctiens Wl: ~ Thus > A> A Nw ah ? tae bet SN GOP ere ni Step 3 '- be hp ArAo At we weed to apely domma 2. Scanned with CamScanner ou to Left neeunsion Cas f i) Ue a2 me the\ cs A, aA, Az—b Ay 3 aA\Z2 > Az b22 mt) Z, —> ALA, > Zp —> A2AiZe (Re i Step 4:- i) She A, - preduslions OAL VADSD Ambon 5 2 “id Among “Une Ay -procluctions » we sotour Mi 7 dimimete A> AA, Ublng demmat. one a) A> @ [aAiAr| bas] AAIZA2 | 622A Nace SN ay eee Zo Pp Bias 7 SAUZou ih © [bar lAAZeAc | 6z2A4 1, ee Za mCP Ea | bAiZ21 QAiZ2 ArZ2| 22 AZo ae aki Aize ee AD tence, Me equivalent Ge (Zz ss Ra Ze Oe Scout 4 [aA ZeAe Ka a[abiAc| bA2 | bZ2 ak |plaA Ze ae {bAd JaAiZ2A1 | b2Z. Ar | bAZe JahiZoA1Z2 | b22A122\- Z, —y oil oS mes OA) AL Z2 Scanned with CamScanner Ne ph He de. a grass in dn C5 proceed to SH * Peisans,k26 by Aj) Az Ag Anspechvely As A Azle Ai AeAa » Ars AsAi\b > eee i ai. (> the Ai- parduchons 3 Pau i. oan a Lin poguined i Aegutiod fou 3 loam Kg kas & modified Cos Mea : spat Aa- producbous 2 See” Az |aZa | bAshe® “ty : ee , Ap ab % mod f ci Lod eget Gue gous. Te Wee A poduction Engh te ey Agh es ap BAS Mas \aZah | bAsA.ZA1 one pe Tee B 13 i ty Ar-productron be qe Ai —y bAs|aAiAs| DAMA As| 42:4A5| bAghaZsAiA, Scanned with CamScanner Shp 5. Whe Zy-procluchions to be wedified ane Zz, Ai AzA2 3 Z2 AlAs A2Za Apply lemmad & We e Zy—> bhs Asa | QAAsAg Aa | bAsAAiAs Aa As | a2sNAAA| bAsA2Z2 AAs As hy Za > bASASAZal aAiAehahsZa bAsAsZeAAg As AuZs Ye neque ees As Me GNF. PUMPING LEMMA FOR CFL pada A Wace Se 9 5 gon = matte TM nurs tmynitouctact sings from & gover SST thor tArtan - =i TE ds used to prove bAsNy Ai Ay Aa hsZe la2shAyA Az + Ut G be a CFG WH lemme ie Pa a rekoy eg eats ee PO ae tp oem jmduudlion on ky» te Luratle of proof + We PR frais (Rca Abe is 2 derivation he Pe Na yehiA2s hook ea un Aotiee of, Lengte 4 the ithe Bae den ges PA is a devminal( when the CIS ALTE nate. Gera) due urhese Scanned with CamScanner J gp, the ytd ds of Congth 1 Thus, there is a bass p- (Ic) the AL for hed Cot). Wt Tbe Om A- tree Wath a4, . pall of Lamgth Luks tham or equot to k- As k Hue mnet aT toa cxnclly tu wore with, tabets Ai 4 Ae Te foe nuns vith B vena on roots fave Lhe Lengiat polit of Lema Bers 5 rani nee qT and Th - R CONTEXT -FREE LANGUAG Es) 5 UMPIN LEMMA FO qHEoREM' CP a ne a modurad mumber n such that idten uv’ el wilh Iglz7 apo. EE ae. aaa 3 shrimy Uy V9 U2 & w Ive 2 tily = luwxl 4” a oll R20: Ww who hy. Crees PROOF: We dooiole whaher or not A EL. When DEL, we - |Teonsider L-2A% % consluck a Prammor G=CVy»22P> 5) Scanned with CamScanner ae CNR gumenating L-743 Cwfem AFL» we Ww) G im CNE generating. L)- Wt \Vul=m amd n= a. To prove that m 4) the requis mumbo aie stonk Wits ge Ly Isla 2t ardiconchuct a derivation ime T Cpa trae) of 3+ 94 te Lungtle of the Dongest poll im T is odmest m, by proious lemma las 27 Cs ia the ytd of To Buk 1917 27% Ts ual Go, T fos a poh » doy V, of Length ea, the Lot * Also [ywxl > lel SNA ta B-drees, we get 5 ube, eeiane 2 > uwy , WOW" gt vBx ard pipw. & S > UBy $ * i ke + kis ty CL. he Fon ARemiemel == LU yinemat i” Gee sipe ee Wy ait oon Scanned with CamScanner Scanned with CamScanner Pp, z : a‘ ; J € @d) We Rowe to prove the “ouly +f okie we Oppl Punping tervma to write im Siena ae uy eb alongg 2! ie eR Seen pratedly , we com get Bicens! 19 Gus, () & proved. on 3 dumma We neigh cdm, dy Pumpurg Re we get Ao, wkuoxky eb eee. ote =u | ba oft, an dinginte el with Igl2%- Ye [Zl <2n, ch, we ig Sa : ywe con Opty. the et Se ge wrwnodp, gob wuny ee om the fusaping tamauac wie get O- i ual te Wel) Seat ue Ungth is abmork % Ching 4 n AtAALO se Ge, we ublimabely aot & sing eee Hemet the) |< u¥ nZizglcdu. ibe 4 = ULV eps 2 Ce ts then tal zt Ob 2 ce st ; : Ore ety sep 3: find a auitabte k bo thet Uv er nes fo a mot colint fue - roxy ¢ L + tae ts Scanned with CamScanner fa CRON NAL CONDI C™ | RZUE is Not coutent- preeigr, sept wwry= + bsc+ So. : on WCC alg 3 symbols 2 2 gibt corbecoy forsee tr) - 3 as Of 5 C2 Race oad ii leaiee ko eee gordi Boe napciooh oh er. ett. 4 aw a,bsc: Bipceias one 4g ate! ee av bh ee the jew wr "Woe > yar F . pubabun ce Besos be Besa ah aie NS: Werte Gore ome. ane of wre oor im VOee ii Iai thd a6 Moa» wings ae) ne ian a ato a uw echoteecec ae Guus, for any crower of v orn, we gob avontsadichion © Scanned with CamScanner BRR renter ranma cer ns aa Le Ous' Show that L= zat| piu prime % is not a CFL. Got": We ue te propedy of L: 4g wel » ten Jeo] 4s | Le let whee Ae Motural wo sTeP4:- Gubpete L=l6G) As CF yw. Yan, ge ael STEP2: Ut p be & primeno. quien thaw We weit, Z= UW 4 Se, luwy! ster 3: Gy puumpung. derma. uv? wore = Uy © L- js a prume uo. say 4 - let luzl =r then, luvv xry| = yiqr: Me gg is Mot Pume , uvrw «ty & L- Yin ow controdivtion » ** Las mot CEL: LgORITHMS FoR CEL . one ayhukhn a CFL OL As EMPTY a Agen thw for diniding. ; We com appl Bie constructiow x theorem & : Tp gw acrg et cay ep me foam cane ons anne rl a terminal 6 qeting Vu 2Wiee DECISION A Gd Maou tw for duerding whether a CFL L 78 finite Cpnatnuct a nen- %edumetauct Grg Gm CNF faa Land. We draw a direcked yeaph where vertices ae yaualtes in g- YW ABC ib a production , tite are - Anrected ef gu from A Bx AC: Lis finite iff the doeeted graph fas mo cycles . Scanned with CamScanner Scanned with CamScanner

You might also like