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)
45 views
54 pages
ACD 1st Unit Notes
Automata & Complier Design
Uploaded by
Geetha keerthi Medarametla
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 ACD 1st unit notes For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
45 views
54 pages
ACD 1st Unit Notes
Automata & Complier Design
Uploaded by
Geetha keerthi Medarametla
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 ACD 1st unit notes For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save ACD 1st unit notes For Later
You are on page 1
/ 54
Search
Fullscreen
| - eae | AWIOMNTA AND COMPILER DESIGN | NTE. | Trbeduction 40 Formal Larsanes | Symbols 4 Syrod \e “Simpy, a character \ Exe Symbol = fa, bc> RY Symloo\ = LQ S> S5% FS Sumbal = 7) fisaia-. 4 aoe alpraloet is a Binite , aon empiy Seb of Symools- EL ts denoted ey S he symlocls | ae called the \etters af the alphabet - | Ex= S= jo.\4 the Binary. alphabet . | = fasbse, 24 the set of all lower ense | \etlers a : Alplnatoet : i j Powes of alprolect is the set of all ehings of the length | kK over alphaloct 8. we use notation 3 | | | Ee S's go syser af al ahrings a lend 2 \ = §00, 04 510,41} set of all Stings of \enatn 2 | + {E} yeqardless af what Nee 3 i6,8 is | the ating having Jenatin Sa Shrings = A string, over an dipaloet S je 4 finke seqvence of symbols fom a\preloct Ss. : | | | | ee- s= fois Stings Ine Gs ON OomOum tOMOtay Ord se | etc| Operctions on strings + : | A> Length af a stingt “he \encth of the string, oe nurloer all Syrrlodis composing, Ane adying, FY le Gen | by \wil- Bu Wl = aablo hen \wl) 4 Wwl = otolo Aken \wl- & 2 Emply string: The empy axing le the hing, with geo Syvbsls ond aero length: FR is denoted oy 'e'. \el=o0 Sprain and sufPixc of a shina A preha) ofa) sting 6 ony, oureloey of leading, symbels” of that sting 6x= — etxing aloe Prefit': € , a, ab ,abe A. enfin at a sting Is any number af hailing symbol of that sting fae sting abc Suffix: €.¢ , be, abe 4 concatenation of shings- Concatencrtion of two ekings is writing Jack sting, Lollowed by the second string uth no inlerveming space. | Gaz let x-ab 24-04, Bnd xy, yx 9 Ky = albpa, : | YX = pqab | XY # YX.a Larepoges: arena A larapage L over the alphabet £ ie aaubrek of 20 Tht | \8 ® lemopage is a sel of ebings over the alven allpraloet \. Lee*. 1 is lanquace over 2 2. A larquage can be empty L= > | 3: Empty lanquage is not equal to empty sking, Opections On larquages = \; Upion: Union js the simplest aperction on trey languages) TR Li and Le ave suse lanquaqes then the Union denoted Lia te a Lanquage containing all stings Cw from both Vonquages- Ole Goto aio ie ay EX> La = fos04.40 44% te = fo,o1,co8% Ly UL) = YoroL. 40.44 ,ooty 2. Concalenction. The cencalenalion AB sf lanquages A and & is defined oy, AB= {ov loen. veg} | | Exe A= foo,\th | | B= Sol \ AB = Sooo S047 40 5 My | BA = ‘{oob) of44 400% 14 y" AB + BA| D Closure perio > DS Weene\ ator closure? oe SIV SAGisye y+ « D positive closure» Ses aus ios Fintle stole madiine- Fig. model of Fwite Automata a xead arly head and Akines The change cf conPiqueation . This operation defines on a St S a derived seb having, AS meriners » the empty sing and al) skxings Formed oy Concalencling, a Kine numioer & Stings i975 Me positive closure fa language ts defined a5 An ovlomala is aq dostrat model of a digital computer. A Brite atlomata consleis af a Finite Memaxy Called input Lope a Bnike Set at stales . am input. alphabet | a ctansiton uncon ; Which | 1 omhe inpd Jape is Lees Io Celle and each cell Cniains OMe symlod\ Fromm Ahe Wnpul alpraleet: [> The’ surdool je usedd a tne leftmost cel pales) ict Ca) called vight end wrarkiex Jo indlecke the beginning and end oh the Hapa hope. P>s head Meads one eyo on the irpid tape and fine Control controls the next Confiquiakon . F> The Reading head reads Ine calls one toy one from left XO Vight. and ol a dime only one input curdea\ te vead Pathe xeading Head cant uke and paoe back wad so Ainke aulymata cart vemewber Ne previots vead symbols: on & Finke Adornatas A Fine automata can be xepreserted by o S tuples M = CQ,2,8,4%0,F) Where DQG a arte cet of stoles DZ a Side cat gf wprds called eos Alphabet: OS fea ded Se an oY mapping Suncion Which mops Qxrz into Q AS. QxZ > Q W qo EM ta the ial sAdcle 8) FCQ bs he Firal atote end movker and tne syrreo\ ie used av whe Reg | 1 |- © Transition Diogram' ee “Rensition Se is a diveded Graph associated wt | & Ste autornala «HP here ts 4 chanson Prom state a4 Stale Pon tnput a, Shen cheve ‘© an ace Anbeled 6 from slcle gq 46 stale Pty the -tansillon liagsann > Transition Diagram contains Lape | ® sel a states as civeles, Bie sees G2 folk) ons, “6 Final gates by doubles civle ) ey BA Finke cet af transitions Cedges) that show how to | Qo fom ore stale to other. | exe | i seh: GET DR) | Las as ie er |“ronstion Tales T > ® Aronson able \s a Corneronal .abulay xepesentation Af Avansition function s sek “Aaes {wo akquenents and weluns a value, F> Whe rows af the lable cawespond to the shales and Cur. “HS Conespond Jo the Wpuls. The: enkiy Ror the Ow Coxesponds te slate 'q! and column cowespond 40 input “ol AS te chale EAGAN GS) ¢ T> Tamsition Sale for She aloove Anandiion diaqrarn laren linia CaN fs | < ° A | Pe denial | ay q Ye Ae | | ite lo ee eye | | Aa) Ay V2 Transition ‘Tablei ! ® Acceplance & Se * a sting X ts accepled by a fine / aulorrala OX COp era a. eS ie Sil Wd =% for ddene Ve * This is loasically the atecaplabiity of a sing by the fica shole. f Tres & fine Automata’ Non delerninicte | | Delerminikic Finite Audorncta(nrAd Mintle Autamata (ot) DEA COcaeicishe ple auecdta) PTn delereriniske Ginke oulomole oo Input syrabs) causes te move mse Shan one stole ov a tole does not contain more Yan ane konsiton Box same borat symbol: > €ach ond every shale thas te consime all tne input sibs) peat inZ. | PEA Gemotly defined by & tuple notation = (Q 42,8 29408 | wwihere | i ee | Pe eer sate ay Se 5 — tc athe Ahanstien Buncion Cor) mapping function which maps St Qre —-Q J. — wital siete eR - Fine) SaleExamples a pra ‘nebel 2 Non— Deleyminiahe Eivile" Bulornala tnicnd— PU NERA Deters le une alae tuple = @,2,5, BOISE) where DQis o finde Seg states DZ tsa Bole Set af Inputs : Scns the transitory, Furcton mapping Kom Q¥z In 2 Me ei aoiser co Of Q the det af all sulosels at @ [Das is intial Sole DF S Fnol ke Broce. 5 | | | | | rPrctlams 1. Consider bdow -ransition diagvam and verify whelher the Fellovsing Styngs will be accepted ox rot) Explain © “@r he la ain te) 6 Figs Transition Disgrar ly 3 Gay WJ ololo1 Hi} wiioo, Ww) toto} solr i MW = CQ,2, $540, F) Q = fa,8.¢,03 = = fo} \ Vo = Fn | | Fo = fay | if S@o,x=4 fox Some qe WRanskon “die for the give Disov arn,D oor Alqo,x) = Ver ACA oolS = | SCR) +» © SCA) & &Cps1) FA : S0 A is € Find sla te AEF . OOll is acceplked. , WS loro} SCA, oloiot) 1 SC, oles ES Ce 0101) + 4CD, lol) + §¢n,ol) F dCe.0D ans cde OlO101 is mot accepled 31) \Witod & CAL Wood ES CD N00) © § A Noo) © S Cb, 100) F&A j00) £4830) rae ep Ee: ta Woo {fs accepkd.ml JCA, outor SF 4 Cd, 01N0}) Yd cesiors F dee, 01) | + § (e101) | | + ACB, 01) Fata sy) | tema bee ~ = JONI) is mot actepled Q| Draw the thansikton dtagram For bdow FA = {LA B.5d%, foi. Os cuy SCAOD = Scay= §4,8, a $06.0) = 8,88) = \Acch & Ces0) = AB, cA scan) = Ago § Cp,0) = ese 6,9} SCD een cen so\- pe Ca 565%. 5) Q= {a,p,c>5% 2 = §0,\% cr eaicad {ct § = Wales ee ee | NS \owtto)Wanstion lables fae. fa sch | ©} tech FB0} | Dp] {Asee.d3 Las | | | | | | | | | Fig Tension diaqyary Fox the Given gine Puhorcete | 2) the axaph vepresenis the DFA I= Chaos: 5924, dosh, $0, fh) Where S t6 Ger BS | AC%,03 = A» SC%o,4d=9) | $Cq,,0) = % >» § AD =e | { | §l4,,0)= 4. , § Aur | | shovo thot ik accepls stings ol, tot, oi and woo) but | not lod o% loo. sol- M=CQ 52, £.%.F) le Nea hoes | AE4 = {ot Fe fas Kansition AXooyearn ae 5 EG o 4 Transition lable + | DO) 5 dla 01) 8 C40, + | Wer | - et to acceped 4 Ca, 1015 40a, 0) Esta.» ba, | AEF -. to\ bs actepled| hen penn athe RS rm", rs a aa im ly ee na Te CRU 3) ory SCA, 0101) HS C40, Wd Fd Ca, 0) FA C4551) +4, ayer . onl ts accepled UW) \\oo} AL>y , Woo) ) F ACay , 1001) FA4, 001) | Sea, ol) Fitq,,0 ra, aeF W00\ is accepled 5) 106 S40,100) F £041 00) F 40% ,0) E40 doe + 100 {5 aot accepled 6) \\o0 Cao, \Woo) FSCq, 2190) + C4 500) £4 (4, 50) ho 4, g ie 100 is pot aceeplked@. UW) consider the DFA M=CQZ)S,90,6) Where Q= 855,93. 4 Ao: & = lool, Gaetan Nasow Were ON ciey mumbex 4 : uh be And g§ Junctions and ts accepled te e when ‘MP is \ en is oabba’ praw the stale diagram A dddle fo QW in “alle. ACA 5°) Vo % Vy Wa ein] [oo h(a) =) ae) Qe 440,214 ; | 2 = fa, | ea ses | | Fe = {rok | Wansiton fable en & 4, Transition diagrarnQe ee a ACA, aabbad 14 (4p, abba) +4 Co, Boa) E169 4 059) NerecVO) | WEF i : | | *. Gabba te accepled Difference belween, DFA and NFAH | DFA ee la finile avlorncta i© DDEA Is afnie automata ) nea | fo ubich Jheve [s only one path) the one, in ubich there many paths For a’ specific loput fora Cuseent Stale to next alate exist | fox a specitie input froro | cuvent: Slate to next sleek. | | there fs a unique ‘ronsition 09 | jean fopere syertost ‘ D DEA Canna use Emply sting) NFA GaN tS] emply Sting, |D DFA te more difficuil to Fa) lea ie -easien 4 conshuck | conshuck } i All DFA axe NFA jp Net all Nea ore DEA D> vera Bequixes more space | 8) nttA vequives less space | | je) S:mxs Sate. nert [8 di ane ™ of Possitle slate belongs to f te next possible stale bod | ko powes set FO. i | | | | | | | | | | | a=> if a Finile avlmola je geodified -b pe Wie is. a Nea with. €-roves , because A {5 possible to | SiO : Non- Delev miniske Automata with €- Moves + & eansitions without — npul symbols, along, vith, gevo » one 0% ore Aeansitions on the ‘put suresls, renmveer ack NEA wih e-moves. because the transitions mate without Symbols axe called as €~ransitions + sek, 6-8. @ | Flas NTA with @- moves | make dwanstion Fron stale oto 4, votthat Consuming ANY ef the inp sipchols, sirvilanly fromm elete a, 4oq, | also \oilhout Consuming ane input syraal Being @ Fertle denoled as | dutomala 5 nia with ‘@-neves vill be ve tuple me C@ye 3$.%.F) AX Ce vied) tw »®| 1G) Stonificance GF € - Moves aulomata wich actep!s SW we want to construck o finile ne AMAUNY, dimes it Language , t becomes vert AifRieurt, > | Seems jo be impogsible to draws divectly NFA oF ofA: TH You go for nifA with Ermoves and DIA os NEA without = Moves acceplante al same fanpage ¢a° - descrined: | Nira with | IS the stale Aatle or’ -hansilton Adele af ne Emotes {5 similar jo thot nea [Dh accept along volth che Columns aloclat lay Input: aymbole from & There is additional cclumn labeled ley @ a8 the aia function Sis axteviel) so “Acceptance fd langpraqes> Js B shing Goin 2h will, be acted by NEA ytth © roves, free exict ablead one path cowespordieg | | 5 whido store in an inital stale amd ends inone of the | | final slales , but since this path may formed bey € = honsttiens [os well as ner e-tansitons 4o find cut cshetha * | acteped oF oot toy the NEA wilh @-moves >We equi, | yo define a furclion e- closure Cg) wihere q is a slale| of the aulemala The Bandion & -closure Cad is defined as Palows@ E- closure (q) = Se of at) Those Slales of the aus i atch can le xeached from 4 cn a pal labeled toy &: oo ° 4 Qho” | i HQ NrA with € moves fo | Rae €- closure 4.y, = $4, 4,4 E~ closuve(q,), = La, €- closwe Co) = Gao,%.a.4 101 | > E- closure Cq) will: never be on emphy Set: because Vis always yeachable fron ilselp without come: consuming emily input symbol be on a path labeled by € , hence | 4 will always be there in e. closure cq). | | | | | | |- @! Requivdlence ai NEA and DEAT >Anile aulomata my and My are said to be equivalent Wand only if Lema = LCM) THe aukornata ose Considered Jo be equivolek if Aney accept, “he Same Language even though they use different roelheds . we can ¢onshuct prA Jor given NFA- NEA +o DFA conversion Vets Geach te) l= (Q)2585%, F), now 0 constuiet OPA) = (Ol seas . ©.) D Qi= 948 she set of at succes of Q. D Ae=f4ol, she inihal sae. i i ) Se ee ay culorte hi ud are (ana He sole of given NFA: 4) Conshudn ot ak we stort the conshuction af 4! Rox (40) we continue by considering only Sales appeasing, eartiey under fnput | colurens ard conshuction 3) gor such stales we halt uben no move new elales appeay undex he mest | Columns -Conshuct DFA for NFA Ma Cf 4o,9,4 104 8.0, Aqek) Sis qhen toy © Na P@ fia tad WY] ya lao sth Let inital alale be A Ax 4, Dee Odie cry > COs') 2 § 540,40) BlA OS: = B0as,0) 2 ald a) CAs) = haya) 2 anh J (B50) = Seay = aye ee i ae 4050) 2) 4 €¢40,9,9, 0) - f (450) US (4150) % OA, Zipo ae eas) = J Ce ea Oa) =) (401) § Car) Be SAC Tay, 2) & CFV =e-O} 4 B BL 8B ce ©} c a Dep » Fe | {Uses Aol Lek oe A SCR OD) = Oda, ol) = Aye = BO ey tals -= CHU CV 9%!) | oe ree | HOBO = H leq) Vo A) = 4 Cea sadU O39) | = 8 455%) 3924 = 0 ACB = {00415499 fo) = § C4: sd 6 6%2 5b) | = #6490 (4e) | = ha, toh = & | [ee scoae § (49 AD = AU Tad = B | ECObd = FC4,6) = LaohaA | | $d. = 4 (0%041,40) od = $ COdo.addUS C41,99 | 4059) | | = 0A 4d L Fo VU CA) 592) | a 490% »Ve¥=D SCBBD= Slay, Sai BU Ge405¢) = AsUAU% =D | A(E A = § CH>IDDY C4050) = %VCIM>%2) =D ACE») ul A’CA>BIO $0405) SW As seale @®@° © 3 BL N= (et 48t, gcand, Sy) | =] Beak aaa i A | ftot iad oT {osu | bet 45-8 | SOD = £C% 50) - {%o,%1} = | SOI, 7 GCS 2 a ACB9) = $(49,0) O'g C4, 20) BA toy CoO ans= {405414 -B SCBbd = $C, WU Sa) sb) = fa.hugay asco §toa) ~ S hs pea Hs SO Ce a ania at =B 40Psa5= 4 ea, 2DMUS C4, sa) eu) WO esa ay ACDrbd=$ Cay BIO S Ca,>b) = Ay & (03%) = (4 %%e pe b a O19 oe) 2 eo : of Oem egConshuclton Xt DEAE input a » Design a ofA wth 2 = foyiy accepls She only input Shing 6", D conshuck a DFA wth sigma 2 = fo, thaccepts those Shings ushich slavls with 4 avd ende with a. f | Co ® Design FA with 2 - 40,14 accepls the Set of all shings volth thee Consecutive ols. 24-009 , G00\ , 1000 , tooo} , lo00\o a0 {1 - -F aven rumbe af uy Design DFA with <= hoy} accepls O8 and even aurber af is. Oda ile) anaicced A's : = Ge. 36) Hie Cas ae) Even Os and add AlsRequlay Lupressions ond languages 7 ' Requlay Languages: A xeglay language wh a! xenay 'S 4 Language shat can be expressed , enpessiog or a delewriniaie o¢ non — delermnigne Creer re ee eam Eas) i Nemaiage (eat eet al chings hich ate made up of Crovacleys fom a spectfied alphabet on set af cyrocls L> Requlax Language are Gg aubsel at the ack at all abings: [> Regular lonqvage axe used in parsing and desoning Programming Lonquages and axe one of the Rest concep aught in, Compuatailityy courses. > These axe useful Ror Wdpirg compeller aclerats to econ “Ee Patterns I dala ord aoups Certain coraputavional Problems jogether .onte they do drab. they con jake Simlax appoaches 46 sce the prddlems exouped dogether | Ls Reauler \aranages and ROM atloraala can enodel core ~o\ prodlems Anet vequive a YO reall amneunt of menor Regular Expressions '— > Regular Cigressions: xe ueRa\ Loy xe presenting, ceslain Bets aR shings jaan agebwic Sachion > Reaplar exprestion deceribes the’ larquages accepled oy Rite elole aulomata I> Leh € be an algholoct. the xeaulay expressions aver € amd tha sels Anot Shey denote’ ave’ deRined xecureively ds follows:» ¢ Isa Yequlay expression and denoles empty sek. € Isa xequlay expression ocd denotes the set (eX. a ts a vequlan expression and dencles the for each a in 2, sons - : dent en Sel fal These axe called prlenitve xequlax Donlon of joo -equiar evprestions Ry and Ro is so eT SIO OR CRE RARE) B Concakralion al boo vaqdlay expressions R, and KG ee) AS RR, is aloo xvequiar evpresso RCR- cee ‘ : p oe U) ikexation Closure) at veqylay expression wien as Ss Also a Kequlax etpresion an sek sepresented 1 4 a -wequiay expression 7s called a Nequiax seb. ee jy GBI) ae ths) Ui Pe ayes ee ae | at denoes the seh fo} : y Ss | a+b denles the setfa,b} > ab denoles the set cet Fe) GUase Ce aan 7 Ny Bee denotes aul oe Ne a vicay an ea Gane Rese cries he ixeauilay sel by xequlax e%pression! Requlns, coe Kegalox expression | ae a | ae 249 | fe,q.¢0.0b.bs. by, 4 ie | fab, bay aneBesevbing tne fallosing sets by Requiay Expression” »S a skings of ds and t's AL => “the Janquage as whe element {é,0,4 1 oc ? 00D... Wence’ She Fequiar expression 16 Coxtd D sek af all stings of als and als ending in 00. he \anquage has the elemenls 00,000, 106 , 0000, 040°, 4000, 4400, mo000,- .. 4. Tris can be wrllen 45 JE 505400, a1, 40,44,000,6-- hoo. Hence the Requlox expression bs tox S00 | B set of all) stings ols and 415 begin with 0 and endieg with 4 = The lanqrage has the elements 404,01 ,044 , ood4 , 0044, 0404 , 0140 , DOO4,- ..%. This can be written as ORM eBoeeCo ON. Wo) i) coq). y Hence the ~equtay etmesson 6 9 (04 a W set of all alvings having even nook 4) >The language has the elements Ce We ats 9 Hence the requir expression is cy" 6) set af a stings hoving odd aumbes of 4'5 > he language has the elements $4,404 UN, WII, “hs this con be writer as €E ows.) 5 WN I) 2 Vence She vequla. expression is aus ox ita.8) stings of 05 and 415 wilh aX least: A200 canseceive 09 Be tev Genel ie) elsmrcn el eas $00, 066, C01, 40H , 0900, GO46 , 044, O400. 4000 , 4100. pened... “hese shings can be genecatel bya Yequlan etpression Co4\*0d Co419"Problems : WS Walle
+4) |) Cvesdae = L&xrs>U lt) | = L(x) OLts)ULQ) = LOwyu CLEsuLiy)) = L&>UCLtS4t) Ls +¢s4t3) = RasWD cesdt = vests ENS = IL CRSESES) Lays): LG) LOXd: Lbs) + Lee) = LOwS+ CLtsd- Lc) EON ECCS a) EGrcse5) = Ri this | Ww) xCS4EY - ys det WHS) = LCxes4ty) SH) ECs. Ues+ey Gea) ales Ceesy 0 Lcey) iy BO ECS O Loy alee) = ES) yu Ost) ~ bt Goa vt) = RS Na Crees) Nas wt ask sh L Cestsd.t) L Cvts). La) Ld ures). LU) LO LUSD. Ler) (Cs). Ultyu Les). Leb) L(st) ul (st) L Get ast) RH-S le Seine coal eee 7a & NAN ine é bYs . L Cg) F Nes ooh ey | {esog | ma LEN ECE) | ~ R&S | Nii) wey. és | LHS = 4 Cems) | Gert | I GCRCR AN Nik YP) | © LC xt ether terms) Seen) Be Kans) MINS Ceayy me oS aes Leceeyyty | = ECW 4s othey k¥ms) | = Lee) | a Sao | Cee yal Cxisy | LOWS = LCextetyr | Dye) i = E(CCE A444 See ys soa- a) Gc eee DCex sry)? ) ECan cule xtist ys) CGE) SetsTents Rules Ror Regular expressions. Dt baysy Te bv = ah =p S * €v= Yery ee ond btie Bs VAN oy xhyt oe Seek Py acto eis In es Tre Tres xt = eadty To * Cea p = prapyt ay meiCp cunt a Ce yt yt a Gera x Grady = PX FA ang Er sCpAV) = FPG Teeny Rules and mraripation ft Regular expressionsProperties gf Requicn, espressions + Dontona TY ty and Ly ae Woo regula languages thety union LyULy will also pe xequlay rr lye fa" [nvok by = AB Invoy Lola = far uy? [n> of | | | | | | Dimersedon & | | | | dy ciel Thy eyes) oth xequiar languages, they inlecsecion tials will also be yequlay- oe fab Ins o and mzoh eg ACMOR UCN rn s5 ag moh MGs! Vamos @ ond mao} 3) Concalenation = WH tyand ly axe Jue vequias larquaces , thely concatena, Hon Ly.be usill alse oe xequlor. eat 1c tina ce | Uvls= £oM be (nzo4 Wleene cosuves 2 1X8 Kleene closure 1) us| | Wow isa requlay language also be | Ex 1, =Caub) | ede (aubyOD 5) Complement + TY LCG) 1S veqular fanquage ils complement U¢a) will also be vequlay. Complement afia language can be furd by Subtracting stelngs uhich are in LC0) from all possible shings Exe LlGY= fa] nea} | UCAS = far|ne=% | Fquivalerce af Dine culemela and Raqulss Expressions = | | : [Dwe can use Ahormpson's conduction to convert vequiay express) rons to Rinile qulomala- D We is done by veduce He ceqular expression tol smallest B Ahampsons condvuction te an algerthen For aneforming a | | Kequlay expression and cortiertina these o NEA | ya : lea Regquisy expression to an equivolert NEA | W This Nga aim ve used fo malch aivings again the regular expression | Rules D the empy expression € ts Cornered to EE ei DA syrtool a ah the loywt alta ts converted fo slast @) a ©) Ja) The onion expression sut ig comvevled toC eae Whe conraleration expression gh le converted to slot nits) “9 _ O96) D) Kleene [star Closure gh €ramples— B Construct Jramsition sygeme eqpeled to the sequian expression alotay* Caatb) Gwen vrequiay expression R= Cabtos' (aa tb) The Bile automola Kr the qven -waulay efpression is conducted as FallowsYe cab O25, Ne cq ao) ©) Ve = avrg & i e “@e O2OU ©. {S) ae “e= Cob 45stVexy O2@® | | | Nve> | <= (aa 46) | ise US number ye ae extwession tab ef Form 4. The final aulomata for the vequlos feat) is qiven pelo| Oxo" o*o solk @Wen. RE v= OrIt a ai*o ——°_@) Oxn=o0 =S—© @ % -\ Condut NEA for WHO Gat iy = Oo Deonshuct NPA for ‘he Falling vequlor expressionNg= 0 > M2 © ae € %g=0 ° ‘ S a ; Bae res Ko = Ys 4Xq ~O~@®D Consuct DEA gov the Fallousing eceay et pression Ccavpyt Crovaytt solr RE = Ctaveds*cbuastS* YsaMO XS ON, © eva Le Murat Eq OB eas > SS Ty; = eect te Cbaad" | -OL@e-O- (OVW.¢ O_O +G@BE AEN Gory sy - se a gael\ ® WD] construct ne finile. awornala for Re Cath Tabb y= a = ae a : SPRAYS es iS Ney ee ne Mp = ¥9%q | | | |Chornshiy hexochy, of language Ferenc, 40, homey Hex thy paramos 7S divided ido 4 AYpeS 9S Folens: DSTYPEO A row as unnedhiled grammer. D Type A is kerown as conleyt -eenehive gyarnener - - Sy . | | | | D Type 2 is koun as contest free grammer UW Type S Regular gqrommer- | Ko —sumridvicled qramrar (Recognized by tare oN “ening machine) | — context semilive. qrarmer CAcce pled foy Iinectt bound automata) | Hert A men CActepted by push —2 content Free grammes Caceeps Af +> Regular grammer Caccepted Pine automata | Wye 0: Dnveshicled Gyormenay | SType~0 grammars include al forral grarernaw. sTyPe —0 graramon languages ore yecognized by “Using | | machine. These lerquages axe also Known as the scecuxeively | Enumerate languages | | “| | iheve d ie alpna fs CvaTy vcvet) | | Grararcar produdion in the Gown of kp Ni variables Ts exminals «Pig ways*, “Yn rape O Ahexve must bee at \easl one vertable on the lef side gh production. Yor example: Sob —s ba P= s Were 5 Vaxiable axe $, A, and Tevmidals asb | Tare az. * Fut & alt Type 4 grosnrray arould be “tyre oO. Gsammax production ia the ‘ben 4 a> B talpna |< =\belal | rot \s the count & ayrbo\ iy a is less shan ox equal to e | leo 2 € cvatyt eB can rob be € For Example a— AS AB—> abe BbTepe 2 Conder free Grammar | TUPE“2 quarammars generate context-free tongquages. The Janqiage cqenexoled by lhe gramynar is vecegniged HY a pushdown aulomdla . ‘In Ayre 2% * Fest of all, “h should by TYPE 4: sThe \eft-hand side’ g’ piodudtén can Fove only ane unioble and there no veshichon on B. |” — \atpha] = 4 fe example s— AB A—a 8 —sb wpe 3. Regular Graramey : TwPe-B grammars generale regular languages - these Janouages ove erally al\ Languages Amat can be actepled by a Finile~ slak aubomalan . type @ is the most vestelcel fom & qrameax : Type & should be tn the given fore only : V3 NVT¢T los) VS w/T Cxightt — cequlart qramnenay)) Ceft — veqular qrownmar) For exarple> th s30 The aloove form & called shicly vequloa gyrarammerApplication of Finile Automata » = finile aulornala have vorious applications in corapuer selente ukich indude Aeyteal andyele > Parsing , and Rellern, matching , and also used “Ho Creale cormpilers. [> Pintle aeclomale used iin Nelworking protocols to delect | exvors and ensure shat the dala ‘Nansfer belween the devices ts yeliable ov not |-s Fate automate used in dhe digital ekeuit - They @0 be used Jo design > logic apes > Finite automale is highly useltl to design sper) checkevs -
You might also like
Unit-1 - 2 - 3 Notes
PDF
No ratings yet
Unit-1 - 2 - 3 Notes
46 pages
TOC Module-1 Notes
PDF
No ratings yet
TOC Module-1 Notes
19 pages
Kali Puja - Swami Satyananda Saraswati
PDF
No ratings yet
Kali Puja - Swami Satyananda Saraswati
264 pages
Module 2 Finite Automata Single File
PDF
No ratings yet
Module 2 Finite Automata Single File
177 pages
TAFl Unit 1 Part 1
PDF
No ratings yet
TAFl Unit 1 Part 1
25 pages
Flat Unit 1
PDF
No ratings yet
Flat Unit 1
80 pages
NLP Module2
PDF
No ratings yet
NLP Module2
40 pages
TOC Notes
PDF
No ratings yet
TOC Notes
18 pages
Automata
PDF
No ratings yet
Automata
47 pages
Flat 1
PDF
No ratings yet
Flat 1
31 pages
TC Module 1 Part 1
PDF
No ratings yet
TC Module 1 Part 1
25 pages
TAFL Unit 1 Part 2
PDF
No ratings yet
TAFL Unit 1 Part 2
25 pages
TOC Notes by Ajay Sir
PDF
No ratings yet
TOC Notes by Ajay Sir
48 pages
Adobe Scan 18 Jan 2024
PDF
No ratings yet
Adobe Scan 18 Jan 2024
48 pages
BCS503 Module1 Module5 Notes
PDF
No ratings yet
BCS503 Module1 Module5 Notes
78 pages
BCS503 Module 1 Written
PDF
No ratings yet
BCS503 Module 1 Written
30 pages
Module 1 Part 1
PDF
No ratings yet
Module 1 Part 1
64 pages
Flat Unit-1
PDF
No ratings yet
Flat Unit-1
59 pages
At Tutorail 1 Merged
PDF
No ratings yet
At Tutorail 1 Merged
23 pages
TC 1.note
PDF
No ratings yet
TC 1.note
18 pages
DocScanner Jan 28, 2024 5-29 PM
PDF
No ratings yet
DocScanner Jan 28, 2024 5-29 PM
22 pages
Automata Notes B Tech
PDF
No ratings yet
Automata Notes B Tech
138 pages
Tafl Unit 1
PDF
No ratings yet
Tafl Unit 1
64 pages
Finite Automata
PDF
No ratings yet
Finite Automata
46 pages
ch2 Engineering
PDF
No ratings yet
ch2 Engineering
78 pages
Unit 1
PDF
No ratings yet
Unit 1
53 pages
TOC B Section Notes
PDF
No ratings yet
TOC B Section Notes
50 pages
CD Notes
PDF
No ratings yet
CD Notes
34 pages
Theory of Computation: Sathyabama
PDF
No ratings yet
Theory of Computation: Sathyabama
92 pages
Atc Part1
PDF
No ratings yet
Atc Part1
15 pages
Autometa RBR
PDF
No ratings yet
Autometa RBR
78 pages
Toc Insem Model Answer 2019
PDF
No ratings yet
Toc Insem Model Answer 2019
14 pages
TOC Problem Solutions IA-2
PDF
No ratings yet
TOC Problem Solutions IA-2
24 pages
TOaa
PDF
No ratings yet
TOaa
18 pages
Theory of Computation
PDF
No ratings yet
Theory of Computation
36 pages
Unit V
PDF
No ratings yet
Unit V
30 pages
Unit 1.1
PDF
No ratings yet
Unit 1.1
64 pages
Adobe Scan 14 Jun 2023
PDF
No ratings yet
Adobe Scan 14 Jun 2023
6 pages
TCS QB Solution
PDF
No ratings yet
TCS QB Solution
33 pages
Acd Unit-1
PDF
No ratings yet
Acd Unit-1
26 pages
TOC-UNIT - 1 (Written Notes)
PDF
No ratings yet
TOC-UNIT - 1 (Written Notes)
29 pages
TOC Lec2
PDF
No ratings yet
TOC Lec2
48 pages
ACD
PDF
No ratings yet
ACD
68 pages
TUTORIAL
PDF
No ratings yet
TUTORIAL
74 pages
Automata An Complexity Theory - Ch01
PDF
No ratings yet
Automata An Complexity Theory - Ch01
28 pages
Toc Unit 1
PDF
No ratings yet
Toc Unit 1
43 pages
ACD 1st Unit
PDF
No ratings yet
ACD 1st Unit
39 pages
Theory of Automata
PDF
No ratings yet
Theory of Automata
44 pages
Tafl Unit 1 Notes
PDF
No ratings yet
Tafl Unit 1 Notes
44 pages
Toc 04
PDF
No ratings yet
Toc 04
16 pages
Dashrath Nandan TOC (Unit2) Notes-1
PDF
No ratings yet
Dashrath Nandan TOC (Unit2) Notes-1
22 pages
Shahas TCS Paper
PDF
No ratings yet
Shahas TCS Paper
34 pages
TAFL Unit-1
PDF
No ratings yet
TAFL Unit-1
34 pages
Chapter 2 Finite Automata PDF
PDF
No ratings yet
Chapter 2 Finite Automata PDF
146 pages
mcs212 Block2 Unit2&3
PDF
No ratings yet
mcs212 Block2 Unit2&3
12 pages
Module1 - Central Concepts of Automata
PDF
No ratings yet
Module1 - Central Concepts of Automata
21 pages
TOC Notes by Ajay Sir (1) Compressed
PDF
No ratings yet
TOC Notes by Ajay Sir (1) Compressed
48 pages
Ace - Toc PDF
PDF
No ratings yet
Ace - Toc PDF
56 pages