Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
43 views
42 pages
Unit Iii
Theory of computation
Uploaded by
janani.m
AI-enhanced title
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
Download
Save
Save UNIT III For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
43 views
42 pages
Unit Iii
Theory of computation
Uploaded by
janani.m
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save UNIT III For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save UNIT III For Later
You are on page 1
/ 42
Search
Fullscreen
VAlCSyOd- THEDRY OF COMPUTATION ® UNIT I - GRAMMARS Intvducion % Crramman - ‘Types 9} gravrenen, ~Conkxt Free Grammar (¢F6s’) and Languages (ceus) - Deiivakion ond Languages Amb gully ~ Rulationsbp ipadweon derivation and duivation trees — Simplilv cation 9) CFG - Elieindtion. owen aymbele - unit produchom - Nuit produdions - normal yorms - Gre! badh Nona Fon (GinvF) - Chomsky Normal Form Cone) Le UntRoNve TON TO GRAMMAR, Bramman t% a nike ast of formal rules that ane goneraling dyntactt cally correct Aantoncer. The jormal dolinition o qrammar. Je that | it nan our tuples ‘wate a Context free Grammoy Core) a= (wm hi 9 Whee & pb a qramnnon whicr comisls a vet 4 produdion aul. Ut» aed fe Qanerate ‘ishing yo Language. Le A Yale aot variables V' also calud ag Won—teuminals, 2, A yrile Ast of Aymbels ead dermina 7. 3. A Yas nek Of productions P' or rules which to of Ae form Ayo whe At voroble G <0 Shingo ero or terminal. 4 SE Vv & Ae Start Symbot or voviable .Grammar — consttacsils — vy v Gourinal Symnbelo Nen- ‘Terminal Symbols (vaniable) tq: Lower Case Letters fq: Upper cone otters tefar bees Ftefon- Ay vefAreit wd wai teh nr RLY Tyee hd PPS A cee Gs Cv ty PS) Wenene \- voyioble Te Tennunals g - Start Symbols Whose productions ore given by Ay RO Bae which produces the sting ba. sola. hy Ro whae Ve £418) ay b te Sorby saay a pga Ce BHD : pe LA tBa, BOY aun ba ehing 2 produced.Q. TYPES OF GRAMMAR, Grammar | arguege | —_Ruwnaba———Praduction Rule | See aasis ——__—_—. | Tyr 0 | Reomcively | avng Macnte | NO t L$ Brumerable | | yosbich on. Sype-L context - | ew fet inet | Suudive | No dutermintte ol AB YB — = itis ae 4 __ Mashine Type-& | context-free | Non- dakorminisite | | | Avy eee CeCe | ak Bain: Narn | ara ogee aeseeerseeeeeeet Type- 3 | Ce | = Fee Mtl ree A> Rewsesvely Erumeble Content -Seraitive / Context free ¢ Reqular ; ae que . SA ke " ~ Ss nae ce Types of SrammaurB. CONTENT FREE GRAMMAR Cerae’) § LANGuAge (CFLs) A torent - free grammar Core) i» a Yorma qramman which th ured fo gonetcla ai ponitle pattera 04 ahings oh a. given formal danquage . HO dakiud ay dour tuples = (vit hr 8) The context - 4ree Aanquasas (cet) ane vey similar Yo requis ask natavely Km dafoung programming danguages Gh Aperalinng ame notion of Pasting * asingtt ying onalalion 0} Progiamming languages we wn other Shing = PrOCOAIG appt cations Example = comburr a CFO Yor the han guage te i wew® wd o bing mite” 4 dela lor the CFG be ge Cy th PS)Griven: © ca the Antenmediate Symbol 2. Expremton i . e gourd. by api damg Symoot on both side of C. Tne porible Producions ore aca, bCa abeba , bacab fom given (ase) * . “he produciions ane eve E -y aka g + bea whee as Ge (we TP 8) ve feh ge Sayeed se fey to be gue £-y ofa Rue 2 E-y bea Rule 3By Rule 4 By Rule 2 i? y aca Ey ata Ry Rule Q ey aba ey a bEba (from Rue 3) ey abe ba ( from Rule a) ey abe ba By Rule 3 p> de® ~ b abab ( Brom Rule 2) wy paca — (fom Rue +) Ey bacab ( Grom Rule 2’) Gy Rule 3 g-y bEb ~y btb By bt ° ws Granmar torstudid for the Le {wewk |W ba ahing taavd™y Ey C¢ g-} ata Ey bee E> abtha £-y bacaby,ly. DERIVATIONS AND LANQWUAGES @ While vrfouing whathet tho given ugut shing belongs Io the given ceo, Ynere ane & Approaches. \ vashg tne rules {hom veody to mead - Rewrive teperente Q Ubi the ules rom ngad to bodys Dovvalion Rewwcive Inference + Shing ram each voniatdes*v' jn taken, it t woncatendlad in proper order ond tne resltieg ahing (ie) Rroduehions b snyered whale ow the denquage (cL) | ae voui able Sn tre aad. Twa Uke Of grammar vo secursiver an ference « Quivolion : Produdtion yrom Head to body i ured Cie) from Stott Aymbet '¢’ expanding Ai TL veacrer me fren shang. thie vat ef Grammar i» dwivolion . RELATIONS rere are two velakors lbetneon shinge Cvurt * GP ingle duivain bq: too x “ — oy sf Multiple derivation Bg ape a. ssExomple® : ® For the Language = Jwewk \ ws foriy* 4 check Whethor Ane aking B1ct0 hahovags to the vanquase Lor not. doln- let the cea be &= (wit 8) For tne ce, te producions be eae Que 2 Ey 060 Rwle 9 e oy XE 4 Rule 3 Reoussive lajerence gE cto yy 0 \elo fom RWet Eve = oF 0 “from Rule 3 ery tet yk from Rule & & -y 0£0 ging vied shang \njourd, For CFL Produdhana vied “t \ \ c e a a peo fer 3, revo € 3 . we oLcto & \ 1,3i ied at [sf eco] ue 8 oro = [vy bap aed) Rule 8 =y elev fa Fae ey Rule t vi 01t10 bulongs Ta given CFL OL = Qwew® Y TYPES OF DERIVATION ie Lake Mott a a. Bigni mont Quivelin (rm) uivdim am’) Lees moct DERIVATION | Posn step in a duaivabion ; o produdion ia appliad tn tHe Lol matt voutoe then ‘yw ead daytmott deuvatin . Example yak Oe (wisi es) > ve fey, € ge $4,144, & whee P » qven bY Ev Ete even e £ ~y id vara Puck the efmed t dei vabim Yor id aid widola To cont umes duivahion ig tid Id Given: eh eS ewe Rue 2 Ey id iscaull e oy ereé fem, Rule \ € + EF dm. > art tie ek 18 Am yiat BRE es Am a iat ide & ae Am ye yaald ed ie eT am. co iatid aw id Me tele mart tn deeivation |),RIGHT MosT AERATION = @ ebiaie __ ny fipeniat vasioile ta replaced ot each step i» callad Vightmedt duvaion ; Earle : for te dame Shing, id aid A, the ight mess derivalion a by , e ® ERE from Rule & er eke om 4 ne ewe 3 e aid +m gue | evere oe id on * ea eA Rule 3 vid m oh iaaid x iA gles tvid om 442 ga aid VA ia Me nigh mot em Aeivdin Yr ino ven grammar }.Converlions oh CEG Ded vating ® % low coe letes MKE a,b, Cz de teemdnal and als Yee digs 0) (1 2-- 4 ond characters Uke -¢ te ei) ore ano Huminala 4 upper cose letlexs ore Non terminals or vaui able (ie) Ai. RK lower core Greek tetas such a4 of, B are skings or Qrimmnar dymibele toraishing ef Aermbrale and lor vasiabes Lanquagyos o we Ch & a Oe Cv, 5, 0,8) be a Fa) amen Are tanguage | ( 6) be Yng Aak of Aorminal Shing Anak have desivalions Jvom the Stat duystoot« Llayz twa t\ 8 +o] The language qentrdad by CFA Called canter Fee Language (cer) Sentential Form “tu Stings Le produced \deived rom Ane Start Symbol vo called a dentertial dorm. % Ge Cut Pps) tO CFG thon of th (vor)*S gah bh @ Ametial pen iy © Sc, men db ep mat (om a ante pon § Bk ahen db ight ambedial fun. rnCzamgle 7] ghow hak the als and W's : ee gy ab\pale Ay as\bnala p -» bs | abe|t gy ab gy ba ove NYO B»bs 8 -yabd Bab dla: From gave nyas prbAA As Bas le w be & shing dl Giy whe cor A) AVA com 8 -y ab | BA fe ey Bae sy ab ea payba oS Ae g dates equah 0 of a's and we, Q, \adudion city we Sy aw Aes ov BoE 1 gy ab ye ab gy &S7bA pas ov AAS ao S -y ba ybae oo Sze S har equalnoo, a's & ble S YOR SBA ¥ aand () Ryose) appbaa (yarhh) ~y aabe (BY) ~yopan (FAY -yoabb (" Bb) -ybbaa ce ata) gy bbaa “gy aabb S derives Oquol no % a's big one we tondudd that $ duives the Sita w Conarthng 9 equal number a's and tle }. Iq out e tomider He CFA dafinad by produdiont — gor elo\1 \oso| ist, grow that Shing w in a palindrome y ond only wt gontiatid by the above CFG a. nape CFA for cFL obs Lor |n 714 wih on or more ole fallowed by equal number | 1's.PARSE TREE 8 ® Th Se 2 derivations con be veprerertad by bee ab ‘pam, bee’, In omni v mpilers pare tree in wad as a data Shucure to represent the Aource program. bet Gz (vite 8) be @ grammar. Te pane tree +H a le Bosh tatenior node to Aodaohed by a vatiowle oA v a. Bodh Mol fn Laloehed by aire o voyiable , 0 Atininal oF € 3. Han Guteder rode db raatled A ond it oildren are X Xo, Xe, Yom deft chen” Yabeld RX, eye XM too produdlion ir P we dh Ave, men Ad tonidered to be tro Label . Rromple: Corsbuct pose bee Apr the qpromnmnar ev ert gE orid ola: Tre porte Wee ts ombud 0b g /™ E+ E+E ee ©: S taatd ' The bret Parse bree haa “a | OR ae deri vain //,‘The Yyuold 4 o Parse free @ * Ww any ovaid oy toncatenaling Ae eaves 4 a par tree pom Joye in calla ytd of parse bee x the yind v ol ous duived trom vest . Hence root 4 Start Symbol. KRU (eater re labled aire wlth a dorminal or € , ‘tw the yilld ® 4ecminrol ig. Leample For tke Grammar dajinad by the produ lions 8+ Ade A-roale ay sblwle Find the pane tree dor the pields, tty Loot cil worl ily Soott dela? Uy 001 Start rom Aw wet == Sy ALB SYA aw [2 42h sy von Cy BY 08) ¢ SS wot xy ook ("! By 08) Sy o0ie (+7 By 18) xe Cr peasy‘Tre neraperding| Porse trea @® $ xi A 64 6 : IN € o © os Ane qd w ool j}. i o 8 IS \ 6 \ & iH otel ; bre start from root The pase . vo Tc sus oy DANS (ene) Ad 7 ye 0 OA tnrek) ; ey ie yy 00l8 (2 are) fs A Ay 001 08 (7 88) — ay 0010lb quer \e) : oy 000 te ete) e ¢ $ 2 goto tu yud o0lo! J.Wii) C0011 Start {ean the «root soy A 1B & okra (8 A oA) mood e (AO) Sy oooata ( A 08) 3 «sore, (AS 4} oo0lte Cv e+ 18) =} ooo Cv ere) * S sp ool 4, he Parse bree to given By s fi A te fi fe ee eee ee ae IN \ The qd ” o A e = 6oo\ jj. oAnyerence ( Durivelion ond forte Tree @ Given a grammar Gay, oP, S) The Apllowing one equivalent with erivatinns and parse trees. Le The Peourtive bnference procedure dotermines tat tediminal aig wa i we language 0 vasiobla A. 2 » > > x 4 p= € € > € we a | 5. thee va pase wee wih rect A and yidd w Cquivalene — Praqram. oye moat Di valion — Quivdin Right Mod Pervalimn ~—<¢—__Rase Treo a Ruuustive wyerere Wow ra a Joe mort deri voliin fom A, Amen “ue durely has a dot votion yon A Sie letmatt daivatin io aloo a dt valiba The i) dome dor right mest dei vation «Prom: Womider The Qvarnmad wilt produdlions By EXE gid check wihashet Ae ytd idtid tid Vo having Pavel tree with Twat Eornet data: e Ete Rose Tree dor rel idaidtid ¢ & Sere re (7 Exete) 2% e+ eé& ayiasiana( se 114) J/™ \ Me a e+ € ‘d Le apidtiqaidy, | Tam ya bas pase ee | ia 1d eit aid Exomple comider the Qrammar with — producions ERE KE & id Prove Wot idk WA Kid th detived by £, dol yy ide id wid ee im tueaid) > wa £ HE cpa ene) * wef ( a he aptanid aid Side e p (278) Am sa 4 woved aia ae e (rear i» Reveal. mfy RELATIONSHIP BETWEEN QERW ATION AND ‘TREES From \nterence to Trees Qheovem : hat rie (vise, S) bbe 0 CFG. the reeutive Grfexenve procedure jello that Aho toxminal Shing wo h th te Jan guage 6 variable A, Ahon Aner io & porse tree with root A and wild wi. Solution : Mo prove: WA SS wa, Ahere % a Parse tree with root A. Reo, & By taduciin hypothenia \s Basidh- By bonis bok he no 6 Ghepe ured lee Z. Then the tree hay duigle la} , Ay Oy OR, aK (ory Aye So tk producer the yi we & or wa, a2,-.. ak then anure in a. parse tree with rook A ond yiold w. A A | a g, % 49... On € Ronse Vee Ay one Step derivation(3) Q. Gnduction Vek tee no 64 Steps uned bent | hesume Anat ‘here @ a parse ree for all te varables B anf stings x hfewed drom & vaing n or lew sheps. Conmider Ya Shing wth Reed from Variable A ayes nt Sheps, nen boat step onsures w fo th lanquaye of A. Say A, ke Are Bay = Xe (Where *f be Aevtninal ) we Wy We. We Were , the eo Canes ole Aa & Yo Ri a terminal, then wi 2 xt Ui uy mohow varoble , Anen Wi Shing Anak wad greviowly byewed Ay be in language 1 in akmest M1 Sheps, tb) >A Sy us) wt Wk > em eT “ A Sw xt A J \ ae Raxse Wee Bese 4 dav dy ey Ci fee Oe Thus Me yd i oblained by AA 4 Ww, concaran ating fhe Sub trees fren A % Joye ” be hun Ahcorem Proved.From “ers to Rervakion Theorem: Lot Giz (V5) AS) be a CFG. Suppose there io a parte free with rook A and with ped we fran Anere io a. leftmost derivation . eae ho =P wh Grammar G& dm & Proeh fo Prove K => w Am Let va prove thin theorem by th dudion on tho wate 8 hrees, hoa + gy Aw haignt | ‘he parte bee w 1. A 7 wy Forse Wee of Wight 2. + Tha produclions ane Aw a 4 pew one Shep Lemos dui vali. > a 2. Snduslion + F] the dwight ©} Are pone hee in ty te parce hee is att ie aig =n - 2, : Parse tree with [oa 2 MeNigume thot Anee edt a kytmeat dexivalion Aw 4a vay Pane bee of height lew thon nn. Conidu parse Bree of height A lat the ofkeest dui velion be x Ke Xe XQ Ka Am the t's may le ster Aerintnal cory vawables cy H Xt fr femminoh » than Xi = WI ; - hee cl) ay xi Be vanatle, Aten kml ve ok te oith sd wi 1 Wwignt Wow Hann Ry raion yea * x = o we Wrwo-- NK Pritt Qo Ky Keg AK hen. * «Ke . sn Sy wyome Gt Ptah Pie FH km a Ky be tevinal cote dole Hei > wloble (MT tow pp wy Wao fhe “hwo proved. ci Xt A OC yb ahi dr dn© From Qerivetiim ty Rewaive Inference Theorem: Lek Gre (iT T Pre) be a CPG Gp tees A Kw, thee reuusive ‘njeunee procedute applied To 4 dsteumines that wi “a Language le A. oy vontab) ‘ sho Pree \ndudien on Vana detection Pass t A > ww (Productive) oh ay (wb te sanguage 4 A) Tnluchn ; Gf duivetion fares ntl SHR A YX Rou. XW rhe * ow Rreak won Wy WQ ... Wy where ch xe ag teamhah , then wi = xf * th YX wo voniable, then x? wer A YQ RK * = wy Ng... Xe ® Fy wy WR... XK * WwW i 30 Thus the theorem prrved jp.Appicains o1 eFe \e Rawsers 9. YAce passer - Generator 3. Martup necgeaa de XML and O79 Prample: Consider tre Giramman with 4a producdiins EY ERE Bayid Prove that ide id wid oo decived by E. BS BE + oe cae Am ide EE ide Woke id id eid Fyus3y Fy tA tania eid jen@ b- AMGUITYIN GRAMMAR ANA LAN QU AGES Thre to on ocemrance 4 ambi quaws aantercey th a Language dimitaaly Thee ino ponibliy haring ‘nto duikvadns Jor He Aame thing in 4, Ambiquows Gramm on, Rog Ge Innis) ambiquour 4 Awe» otleat one hing wt 7% i warring two dient porte trees, eaun ith We dae moot Sond done yold We Example: Hh in He Grammar sy ¢ +e | se s|q chao Wot Gb nt quo olny Lok Ws Qk Ak @ 8 an ee $ YGxS e% a KS 7 7 pee a s * s ar ses om \ im | i\ / \ Se ‘ze PARAS a oO tm \ Sy a kaka, | | a oy m {aj most“ny out: : @ ye Show tak Me qromman — dufired by gredudiny in ambiguus a. gg + as\ ale p> abs \a ¢. By erelene|a By» exeleweleer| 1 4. Stmeciftentiens of CFO * Edforabing vases Pxodudllon A tompiing me Geroaing and Reashaile dymbols + BYiminating B- Rrodudiins * Riienating yuk Rrodudions Ao onguage i a CL, then ik Anouba have grammar some pede orm. To oblah ae down, we requires dinplifreaum of Context Free Qannns *Normal forms 4 Cankext free Grammars ®& bv cL ob qonnatid by a CFG th which all productions ase 4 fon Ay be where A Bl oF Vanialdes are a Tumin al Tho dorm of erin ie called ar eharaky Wormal. form (ewe) W And the wh, we need 40 befown folowing speraliins , ‘+ Elimuinale uncles symbols (re) durnbela or terminals which do Net Oppear ov on dorivelions 4 4 foaminal, Sitage yon. to tart bymbol Ertmbhatle & produdins whith one of tm dem Ave Yor dome variable A: 3 Etmiate unit Produdions whidi af © tre fon Aye for vorighle A ond 8, A. BLImMurATiNg USELESS RRopue tions Lat Ge Wh tS) be 8 Grammar A adywbet x So vadul Sh ae, 8 0, dexralion s 5txp Su Yor seme h , B ard w where wir ir T*, othewice St fo uncles. Thane are fwo ways fe unefulnen .te Some tetmsral Shing must be deivatle from a. X mut oer cr dome Shir desi vaple rom & A unehal aynibst with be bet. qosraing and Aeachalole . Cammputing he Sensing ond Reathable dymbsls 3 x du fa dome imal Sing w. & 0 dotivelion ¢ By ok Xp for sowed @ fe Gyenetating dayrnbots vor 2 (vit Pps) be a Qrammon . Jo Commpute Me qorwating Siyimbely of Gr, we need So el plowing % Byun dymbel of Ti qorsating therefore UL qenesatia itsell « * y A -¥ % , then Ae also qussing qad et ods é Roachable adymbools bak Qe CTF) be a ranma «The ppllewing Steps ane used to Yd are reochatle syraoola . lows the a St reachable eA A to readable , then all produshions wih A, ort reachable .8. ELIMinatING &- PRoductions @). A produidiion which ee called €~ procuaion , He eh Ca) _ a to met powitle ta LOK) % auinnrale all €- productions fom G. Th also not powtble iy & to not fr i (a) ~y For ea vanable A, ah Aye, then A Called as nullable vestatle . PT Bar ECan Co whe ah o* natabl thee delat 9. ELAMINATING UNIT PRODUCTION & hunt produdim: % aq pwodudiim which of tte toon A “YB, whore beth A ond ® ane Variables. uid Pah ¢ UH tha dequence ef derivalion Stepl ane Ay ® = Ba =e... Bn AM Hen rena urik produalinns cre replaud by a non-unlt productions br wt ety ee te) Aya Therefpte (18) dur at A Bem by called unit par « vad Production Eliminahim Let cr be Ga (p44?) $)) with Unit Rods wes be Gee (G8) 1. PAA alk Ae unit paw 4 4 a. For cade unit pale (aus): JY here 4 production AY 6 voolace we dh A Yh GRY M groducium nn &.Problems : Example fi Comider He grammar — B -¥ gle moka vompale goutaling dyntols Bala “the ack 4 geneating Symbols ore ch MA terminals ane geet ating boy inal Le, ay Ub shee 2B hha no generating dyke ya & $0 & Kes) Aininaled , Leayze ‘ Generating yarodle ave Lease AY, Baanple A: Vat Me grammar py Mela AeA Pind He veadhable dymbosls. sane By rela haya Hore bt Start Symbol and has pro duclions So &, 0, B and a ane veashable '. The veadhalle Symes are fea 8,04),Consider the qrammon Rxample & ge AB ny annle inky € = udu pr bee \e oln tn Tate BY BBB RK OKRA Bye Aye . tratlale Symboola A Rw!’ Br é a. The produduoms gy he Combh nallable Syne wine «=e 8 are nullade edygrlbalo & : ’ 9, For produdions , 4% grammar G thon 8 + AB The your ways arranging wdhout € ane g >» pela le Win ons -p - bee AY anlar \an\o a+ vee| vt |eo |b g-y evlale Ar anel \an}o tl othe Gramma Gi! b‘i Bu, Brample Hs Given a ceo Gre (v5, 8) whore 0% given by (ai) e+ lett Ty Pltar Rhimnate unt produdlions , Fy fia dolq: Griven: Read ,aF E+ Ett Ty IKE Fo id i g T=" \) Two unit produdim ane t+ a) Reglace ce by va Rom sae gal aia Cretia) a4 t (148) xi4 (2 eed) 1K Ba itd The equivalent ofvammar wtthout unit produckions Evid lett Fy idla we b+id IlA ch G& ty converted ilo on equivalent cfm that las no “ar Aymbol, @- produiinu or uni produchions , Ways te abtodn Rquivalent CFE \. Bumrale €- produdions Q. Ruins ale UAL productions 9. Pumrale vaselers Symbols . Io. WoRMAL FORMS The two hype 9 ravmal fotiny are 1. Chomaky Nermal for Cent’) 3, Greibad Normal form Cant’) Choral, noma form Cen) A qrammen where ere produdion ‘a aire of the 49m Ay Be OO AWS Whang A,B ec of vavaloles cb Awmunrols « Gyedioath tworercl Form Cone’) A ceo 4, Sofa he be th Gwe th fooal Language theory y alt protusin voles hh fght Ade tugiss wth darminal dynbol optimally 4eltowed by dome vrarables.Chomaliy. Normal form Ewample 1: Comider te grammar ( Sena, Laby , fi nag produ citona ge bAlas tonvut ik alo ene yh -> banlasla py 068 \vs\b sale fad produdlions whfch ewe ty @ Crveaady wn the fring ewe) By b % ReflueHe eemfiale on Want boy new rable Sy bA Sy o8 he ws B-y bs Here , Sy bA = Op m 2 Sy Cea Whe = (,yb @ s)”we Sy ab ; &) -y Cob j gee Cab Ca¥ % A -¥aS A> Gs -y Cas Cay a By bo ~y tbs B+ Cys toby o % Revording he uk, sight hand etdo chould contain ony Qasiek h -y BAB B-y Abe Replae the foumuial ha Cyan Ce Cpxe): ay Cade (Or) No more ton & yyaat able , She A Cd By Cada pio AA aa a. The productions — rey p rh Da eB ge ton | Cob Cay a A> Ca a\ Co mila as mol Cabal to- b |.Tague Convat the CFG tht uve gy aelka sy» anila wy bee |b. Gretbach Normal Form Brample . convert te {puowtr a Grammar vib ANF. Aye Aah Sy AB hay AA \b (ea ay 68\b Ag Acfala ey aala dol Ryen: Ay -y Aa As + O ne 1K? hay ash lb + @ whe fat, hay Mhala = © Comider equator (3) Ag Aika Sub Ay AQ DS th aga ©) hay Agha gla Ce M7 es) + Agm As Ag) Cv hat Aah ) bw Aa hala hoy b‘From thin , Ay -y Aa As Aa y As Ay \b Asay Aga Aahg \bAs fala i oy A Wes AIA > e wore i=] Tnrtroduce new variable Bs ho -y & Ava Aa J bAs Ag la Be -Y Ay Asha Bo -Y Aare be hg -y BASAa Bs |b hehe he + abala The renultant preduduons 42 hy -¥ Aa As 4 0 fy -¥ Raa, Ib +O ha >» bas AzBs| 28s | bAaMa | a+ © Be -» AAasha \a,Aa fobs (i)AN\ produc on “a Should Star with Aetmuin ao- Sub Volum yr Aa & Aa GAL th Aa Ay Bg Ago? bashes A: | afs Ay |b Asha A lan |b A phehaBahs Aa) abe Ai Aa| bass Ay hal aa ws \bhs Ba -y bag hg Bs Ai o3 82 Ae \ abs AAs As Pal phaa A Aa da Aa\ at Asha hs |bashat) bAg fa Bs AAs Ao Ba\ abs hy Aa As Pe | Agha dy As hats] aAiAsAs ho Ba lbp erat A Ro : Me . Ay -y bas habs MNS Ag y bas BoB. Ay “Yad: hy _ Aa oBa AL phe Ao Ay hts ky ho YY bAg Ag Ay & Ar -¥ aay Be fg Yah have hs AgybAahs Bs Ra “¥ O83 Kay bAshe As “Fy.Example Q: Convert the ology produdio unto ANF S -yrala ny ce\b eh’ Gtven Ss A ala Ary Atala YQ Cer a4 ss\b hay nal. #® Spis Ln © Fat Ched gag no need charge A, xAaAala In © fai CW gar , need charge Ray a Asse -y fafa As | af, \b Sb On © he veoultant —productiny ane Ay Aafala Boy Aaa Ar | at |b. hep a> “The Ag Ay Ag M2 BY Tnbeduce new vaiabh BeBa —y har \ha Bi Ka cr aA) \b con be Ray OAi\ qa ,B |b) Ba he vepultant produdioms are Ay-Y fafa la +O aay afi \aaje2 \Pl a2 +O Bo -¥ AoA \ Aa Ay 8 A® cep 3> Sab ra in O nye fee |e “yay Aa\ a Arts Aa \ pa \ baofala Sup Aa ® BaF ahh | a ABB. ae | bAL | oA By lan taht GNF Produdins are Ay it aAhal ofa Aa \ bAa| berta la hy amr \ a Aiea\ bealb Be -y ares LaniAr Bal a 182A | apy. A 8a | 46 oA WB Bio \ bAr|pniBe.
You might also like
Tafl Unit 1 Notes
PDF
No ratings yet
Tafl Unit 1 Notes
44 pages
Chapt. 4 Syntax Analysis - Part1
PDF
No ratings yet
Chapt. 4 Syntax Analysis - Part1
33 pages
TAFL UNIT-3 One Shot Notes PDF
PDF
No ratings yet
TAFL UNIT-3 One Shot Notes PDF
94 pages
Homework and Exams
PDF
No ratings yet
Homework and Exams
8 pages
Context Free Grammar
PDF
No ratings yet
Context Free Grammar
23 pages
Unit2 1
PDF
No ratings yet
Unit2 1
30 pages
TAFL Unit-3
PDF
No ratings yet
TAFL Unit-3
36 pages
Flat Unit-3
PDF
No ratings yet
Flat Unit-3
31 pages
Toc Handwriten
PDF
No ratings yet
Toc Handwriten
60 pages
Chapter4 CFG
PDF
No ratings yet
Chapter4 CFG
43 pages
Flat Unit 3
PDF
No ratings yet
Flat Unit 3
76 pages
TAFL Unit-3 Notes 23-24
PDF
No ratings yet
TAFL Unit-3 Notes 23-24
27 pages
Chapter 4 - Context-Free Grammars and Languages
PDF
No ratings yet
Chapter 4 - Context-Free Grammars and Languages
60 pages
CD Unit 2
PDF
No ratings yet
CD Unit 2
65 pages
H5 Context Free Grammar
PDF
No ratings yet
H5 Context Free Grammar
7 pages
TOC Unit 3 (CFG) Context Free Grammar
PDF
No ratings yet
TOC Unit 3 (CFG) Context Free Grammar
90 pages
CS372 Formal Languages & The Theory of Computation
PDF
No ratings yet
CS372 Formal Languages & The Theory of Computation
33 pages
Chapter 3 Context Free Language
PDF
No ratings yet
Chapter 3 Context Free Language
84 pages
Types of Grammars:: Grammar
PDF
No ratings yet
Types of Grammars:: Grammar
10 pages
4.1 Context - Free - Grammars-MKN
PDF
No ratings yet
4.1 Context - Free - Grammars-MKN
77 pages
Unit3 Toc
PDF
No ratings yet
Unit3 Toc
97 pages
Context Free Language
PDF
No ratings yet
Context Free Language
31 pages
Notes CFG
PDF
No ratings yet
Notes CFG
25 pages
Syntax Analysis
PDF
No ratings yet
Syntax Analysis
87 pages
FLAT
PDF
No ratings yet
FLAT
40 pages
Tafl Unit3
PDF
No ratings yet
Tafl Unit3
51 pages
"Context-Free Grammar" From John Martin (3 Edition)
PDF
No ratings yet
"Context-Free Grammar" From John Martin (3 Edition)
40 pages
Theory of Computation: Madhav Institute of Technology and Science
PDF
No ratings yet
Theory of Computation: Madhav Institute of Technology and Science
38 pages
Unit-4 Context Free Grammar
PDF
No ratings yet
Unit-4 Context Free Grammar
106 pages
Selfstudys Com File
PDF
No ratings yet
Selfstudys Com File
13 pages
Lec12 - ContextFreeGrammars and GrammaticalFormat CNF
PDF
No ratings yet
Lec12 - ContextFreeGrammars and GrammaticalFormat CNF
91 pages
Formal Languages and Automata Theory: CH 4: Context Free Languages
PDF
No ratings yet
Formal Languages and Automata Theory: CH 4: Context Free Languages
59 pages
Automata Lectuee5
PDF
No ratings yet
Automata Lectuee5
33 pages
TC Module 4
PDF
No ratings yet
TC Module 4
22 pages
Unit 3 CFG
PDF
No ratings yet
Unit 3 CFG
65 pages
Context Free Grammars
PDF
No ratings yet
Context Free Grammars
36 pages
CTCD Unit 2 & 3 Notes
PDF
No ratings yet
CTCD Unit 2 & 3 Notes
31 pages
Chomsky Hierarchy of Languages
PDF
No ratings yet
Chomsky Hierarchy of Languages
24 pages
TOC Module 3-1
PDF
No ratings yet
TOC Module 3-1
47 pages
FLAT (3rd Unit)
PDF
No ratings yet
FLAT (3rd Unit)
87 pages
Unit-3 Context Free Grammar
PDF
No ratings yet
Unit-3 Context Free Grammar
57 pages
Atc Module 3 Notes
PDF
No ratings yet
Atc Module 3 Notes
38 pages
Unit 2
PDF
No ratings yet
Unit 2
86 pages
Lecture 9 - CFG-PDA-1
PDF
No ratings yet
Lecture 9 - CFG-PDA-1
107 pages
ACD 2nd Unit
PDF
No ratings yet
ACD 2nd Unit
33 pages
Toc 1
PDF
No ratings yet
Toc 1
25 pages
UNIT - III - Context Free Grammars
PDF
No ratings yet
UNIT - III - Context Free Grammars
16 pages
CFG 1
PDF
No ratings yet
CFG 1
75 pages
Ashish TAFL
PDF
No ratings yet
Ashish TAFL
22 pages
TCS Part 2
PDF
No ratings yet
TCS Part 2
85 pages
MITWPU - Unit 3-Theory of Computation
PDF
No ratings yet
MITWPU - Unit 3-Theory of Computation
72 pages
Module 3 (24-10-2024)
PDF
No ratings yet
Module 3 (24-10-2024)
14 pages
Unit 3-Theory of Computation
PDF
No ratings yet
Unit 3-Theory of Computation
77 pages
Atcd - 21CS51 - M3
PDF
No ratings yet
Atcd - 21CS51 - M3
36 pages
ATCD Notes
PDF
No ratings yet
ATCD Notes
29 pages
08 CFG
PDF
No ratings yet
08 CFG
41 pages
Unit 3 TOC
PDF
No ratings yet
Unit 3 TOC
80 pages
Module 3
PDF
No ratings yet
Module 3
56 pages
Unit V
PDF
No ratings yet
Unit V
30 pages
Unit Ii
PDF
No ratings yet
Unit Ii
38 pages
Unit I
PDF
No ratings yet
Unit I
24 pages
Unit Iv
PDF
No ratings yet
Unit Iv
36 pages