You are on page 1of 41
| Difforunt. ocls 4 DIA TP Loolel -1 + Sub-strings containing with | ‘Moctel -2: Starks with Model -3° Ends with | Medel -+: Even o> Odd | | [Model -5: Kiot conlaining/ Complement La £C1353_00) £9 © oe RUSES_co! 4: Constuct a DFA for the lang wage thet conteins olor as @ Substring. SIDE Find the minimum string, Here the rninimurn string ts Olol OO OLO- Step?! For state Yo» apply symbol “4! then i& will nok lead to eransition since any number of t's at “he stat of shirg die accepted: G2 @OQ.OL@ For Yo, all hansitions are Completed SP 3? for a» apply Symbol 'O', here it will Not lead to any transitions since # one '! is already obtained. A Re o \ ° ‘ B+02-O+-@ Step: Now apply symbol 4 on state 4 then it qe to the previous State %- Far ex ono! EOD+O* + For a, , at lransitions ave Completed. 1S not accepted SEEPS! Apply Symbol ‘0! on 9, , He will Gothe previous State 4 since we have alveady an aq zaoat state sioner by So by applying ‘o'on Y5, it wilt Foy 43, all penltions are Completed SUPE: For state 4,, since we are ateady 10 a feral state, Band 4 Can be oceemed many times . & Design a DFA -for the larquage containing ‘ab! as Substring: SKE Find the minimum sheirg. Here retina sting is ab- OOO Step2: Sloce ie is & backtacking Procedure , apply ‘av'b' on will not lead to any Hansitions ‘OO Step3: Once the sting ap is Obtained, be occured many times since We feached loos Qo a then a,b can -firal stale ra I Diffount Fdols 4 OFA | Loolel -1 é Sub strings containing with | /|\Model -2: Starts with | ‘I Loolel - 3: Ends with 'Nedel-+: Even @> Odd Moolel -5: Klot conlamning/ Comple IpLerne, ' | Ba RCI353.00) | oii? a a +> ___ £1363. 60]| © © Besgn a Fite aulomaba fr Re language “Kod shasts | soit sub swing ‘aah! = fa,b4 | spe: To design . fat we have to fird “Re smallest shri-g| | | FB Re given larquaga based on it , reals new shakes, Drow Wansiwen driagram Gi Re srrallest Sriep. Ce) o : a 5 Gr) | [Sepi8: ta eveuy shale , tomiden Rose inpub symbols hich) ase. not applied on each shake, one by one. Th Re | shale Yo, tpt symbol ‘a’ is alsready applied . Now Check FS symbol ‘SB since “Re sting should hag | tsitR ‘at by applying Symbol “bit goes to ded folk. | |e | | | aq,, all the hamitom axe Lomplebd. | f , [Sep_3! Noo check A stale gq, . the symbol “8 i, already applied so check fh syrtoot ‘b’. since “Re sheing ghould shad with oab. On apply ing ‘oon y, | st Ceaicenend se ntes = e Fe gq, , aU Re hanaikons axe completed » Spi4' RA shale %, Re symbol “b' & already oppued. » Banco Re, skeing should Go check fh Aynbol “O° Shoat oii ‘oad On applying “a to 4, it wil 90 4 dad shale - [sepo5! FA Gale ay, since the swing should shasd ith | Saab’, apes fe sing ‘oab’ any symbol ie. Jah} fan cecum mulkple. Kone . | Steps? FR dead shale. , since it went to dead shale | fo,by @n te applied wrony times . Design a Anite auborrala fie lonquage 4Rout | | | Fee at dend shalt all trantihons ave completed - | | euon LotR oubslying ‘ov, 2s {o, 14 step-41 Considers the coinienum cheing fe “We. language S<]0,1] - Hee minimum string if “ior! ~O--O=-@--® | SMp- 9? Fa every slole. , torsider Hose. inpul symbols my one not oppied on each «bole one by One - TA We hole Yo, inpul symbol 4" ik aloeadly ae | eI hig should shasds vith“! by applying symbol > ek goes to dead «tale . appied now check fir symbol So! since the — | Slep-s: Fe shale q, , the symbol ‘ots alseody applied & creck ( symbol “A' Since. the thing ahould shor | | | (Siepe4' FR stole G5, the aymbol ‘1 i alseady applied, Go cheek, FR syrobal So! since “he shing should shoo) t wilh 101. On applying ‘A fo 4, it will go bo dad shale . RA a, , all Nansikond ome completed . site “tol. On applying ‘0’ fo a, Tf wil go to | dead shate. | Gg £0) | WS a, , all hansikona ane Loroplelad . | | | eps! FR Sake gy since We swing chould shaod wth WL ,apler He shing il, any symbol ie, fo, 2) can cru muthiple Hmea. Ca Bansitors Or compleld . i lote Slep-6: Fh daod sate ,tince woenk to dad $ fo,.y can be applied many Kes ® Design o finite auborata bh He, larquage Rok shoxti wet substring “1010. Et fo,04 slep-1! Comahuct a sub swing tk We larquage Zefory Hexe sub sting *Y ‘010! | G1 56) 2A) &) 0 Cy) . Sep8! a shale G wepah symbst “1 alsecdy applbd too cheek fh Symbol “0! . Since Re. Shing should chat Loi 1 By epplyieg agrebl SO" tt goes bo deol shale Fa 4, ,@U Wamitons ate compleled , | SHp- 3! FR hate gq, , the symbdl 'd' is alse is . 7 ocly applied: | d WS sywhol “Y Bince He Wing should shood wit 1010 On applying “41" bo 4, 2 wil Qo fo dod shale. 7 FH g, , al hansikens axe. Lompleled « | Skp-4! Fh sole q, Ae symbol “1! is alstecdy applied fo check @& Symbol ‘0 since he sting should shast with (O10. Or apPYIG ‘o' © 4, it wil go 0 SMP! FH slate 4), Be. ayenbel “Ox abteody apples) check bg, syenbot ‘A! Sine, “Re ssheieg should choy iit 1010 Oh applying A) on % / + goes cto Stok Fe % , all Hansitions ove. Lwenpleled - Sep-6! Fy shale. g, Sina Re shring dhould ahead St sit ager Washing 1010 any symbol he, Jory Cn ote roublipie med + | FA 9, ou barsifons ase. compleled + | “4 dad 4 a} woonh to dead shade Loy aq —_ ¥e shoe. , Since, Diffount ITodbls on Mooted 1: Sub strings containing with | Model -2: Starts with V Model 3° Ends with | Medd -+: Even a Oda | | Model -5:Klot conlarring/ Comp) ovat a | es, RC1353_ 00) | | rr gy we | a a eerss-o @ Dusan o finile aulorata FR Re language tot enda | [ugitR string Saba’. E = fa,b4 Conbrudk “Re, minimum Shing Fr “Re Language is aba. skp-1: Hee Re minimum bring Step! FR Meshing 4, He symbol ‘o' is applied aldcody cH, now opply symbol “BO Yo” UB te ogptied no Wansihon veil bake place - So, 'b can eras an % be applied many Hees » Since te Shing sith Sabo’ VB 2-©2-O2-® 3 Fe a. all trans'hons ase compleked » iS step. 31 stole 4, Bs alseody appled . Now apply, so on 9, - Once we obbain ‘a’ if ‘ol ig - entounteacd rrany me pen 0 Hanaihon *s obtained « FAY, , AW haruib'ons axe corpleled . | | Skp-4: TA 4, ‘ot alnedy applied . Nao, apply inpud cymbal “b). Sines F should end vsith ‘aba’ it will qo to one & by applying “b’ on 4, ib previous shake 4,» Since “b 8 alsedy Sbhained in 4, shate | «2 —@) | FR Q,, od) Wansibony axe womploted step-5: FA 4, , apply Re iopub ayrobsl "BL. Gace it erds with ‘aba’, by applying ‘Bon 4,» tt qo to it previou stale g, since ‘o' ic olnedy Ovraind af Y, shoe. 2 Fe 2 3) Apply Yoon % _& wail go to WA previous shoe Vo a r FRG, all tamitons axe completed . @/Derign a file autora FR he lorquage ‘Rot ends sR shring SOW. Z = joy | Slep- ts Gonukuck “Re, minimum Shing fit He larquoge tee “Re minimum shing fs On | (Sep. 9 FH Re SHIA Yo’ fe symbol ‘o! is applied alnedy So, now apply ymbal ‘son Gy. tt’ is applied on 4, 90 tansiton will hake place . ao 4 con ee applied rrany Nenes -Sace , the | Shing erda vith ‘ota! 1 iE | 4 1 l ( (92 a Ors | FA 4, , all Re hansiNons ane completed . jstep- 3: Fa stole 9, 4 is alsedy applied Now opply | ‘oon g, Gree, we obhain if, oS ok | en ountered many Hmes (Ben no bansihon is | Obbained . |) NB Be 9 FA gq, all bansibon ore completed! | et Sepi4! FR Gy, 1 ip abvedy opplied Now apply inp | | gymbal “0. Since iF shoud end wit “OU. by | ik will go to i prewious applying “O’ 97 Gy shale, 7 since ‘O' is ol sceody ablained in YS Fa, , all hanwtons ave complete» | | “dep-s: Yh 4, , apply the inpub ayrobol ‘at, Since ib ero with Sort! by applyig ‘0’ on 4, st goes to ib previout Shale g,, Since ‘Dp! is olveady | obloined at 9%, State. os - 6 . = _ Apply “i on 4, sit usill go to ib previous — shoe 9, gy, all Wansitiong ase Completed » | | | | | | | ® Design a Finite aslomrola fh Re lanquoge +Rat ends (bSiTR sling one D=f{a,by Stepet! Consruck Re minimum shing && “Be language Here He, minimum ching is ba. OO" -©) | Slep- 8: Fer Meshing, Re. aymbat “b' ig applied | alseady . So now apply symbst ‘a’ on a. 4 a © applied on 4, . 90 Hansition isi taker place. | & 1a" con be applied rrany mea sinca We shrirg | erds iti * ba’ y? b Q@ ) FRY, , all hansihons We compleled | | ekep-3: 7 stale gy, , 0 obseady applied slow apply | ‘Boon 9, - Once we obhain bh’ iF 'B i ercounteral! ' mony Henes Ren no hansition & obhained « | | Fg, AW Wansibom ase cormpleled 9, . apply inpub symbol a! since, it should ed ustth “bo! . qoes to it by applyieg ‘aon q,. iE us Previous srote A_ since ‘a! alsieady obtaind ak a, shale . Q? b Sane 3 (S) ROS Apply ‘Bon %_ , it wel go te ib previous shale gq, WR gall wansikony ase completed . re | ® Dexign ao hile awonada “Re language Rab ends | weil shrieg ‘nor. ee forty | SHE! Gorhud @ minimum shing bR Re larquaqe r= lo, y. Hee, minimus shring &* tlOl pale Shep. a: TA We string % We, symbol ‘4’ is alreooly | | applied rte apply “O 01 Ao- oo a go it | | mm g,, 10 hamistons takes place 0 Yo° | | | | | | | Nn be applied many Hees + since Me shin eros wil 10} FR Q., all hansittons ae completed , Sep3! FR Re shieg 9, , apply inpal symbol ‘o'. Since .| i chould ord esith rol by applying “ol on 4, | iE goes to ila previo clole g,. since ‘oO te alsieady aptained af Qy shale. %, all Hamikon ore complehed . | Spot! 8 stole g, 0 te abeady applied . wow apply | topub cymoot ‘4’ 97 4, - Once. we obhain ‘a’ if MM" is envountered many times en 90 transition ig obhained . Qe &) 1B) 2° @) 1 e) Skp-5: Rh she % > apply inpub symbol ‘ol. Since it should erd sith “rot by applying “O' omg, , it Goes to 1B previous shoe GQ, since ‘O' tp alvcody oblained ab a, whale, FA %, ol Wansikom ase Uprnpleled « Spee! AF we apply ‘ot on gq, it goa tog ea f we apply “L" on a, it goes to 4, WA, all bransihons ase compleled . | Diffount IToabls op DFA (Moolel -1 : Sub-strings containing with | Model -2: Starts with | Model -3: Ends with \Medel-+: Even o> Odd Model -5:Klot conlaiming/ Complement Es RCISS3_00) | | | f a RO1353-00\_ @ Deriqn a File aulorata FX We language not _ enainieg Sabb E1954 Gep-1' Greale Re eninimum sahiing f& +e language | | | | B= fa,by 4Rab contain shing abb - | <—o— ye Pre 2 363) |skpcd! To do this, int we have 10 iil He bansion diagram fs +e larquage, Wak conbairy “obs as | Substring + F&M! On applying “B40 Ge it will not lead bo any hranihion . b 2-0 --O+-O F&_2 On applying ta to gq, it will not led fo ony Fransik on . o AP a £ ae b = OO OD Fe_%, Oa applying coe it will go fo ib ae srode. O, 7 Since ‘a ig obhained ab 4, stole P&G! cWirg abl is cblained by applying a, 6 oO gq, many Hees, WF sil not leod Fe any Wansitiens + | Bo & b © b Onn ep-3: tlow wake all kal stoke bo non-fat sales | & mon-Finad slates to Fred stakes. Ris rrakos the Complimenk J given larquoge . | on 3° . | 6-65-98" @ Design a File auborak fi Re larquage nol Conlaiinig ‘ow. F= fo,"y SHP=I! Coeale Re minimum ching fal “Pe. larquoge | == joy Bok condainirg shiing ‘oo a step-8! Frigh we lave to wile Re hansitien diogran : f& Re. lanquoge. ot conlaina ‘010! as subshig ' tq, , it uli net aod fo Fag) On applying *1 any hansikon . ~2-O1-9 © ee ae ot q, i dends dees nal lead | rayaiton . B26 2 @ p F&_%, + On applying 4" to 4, » iE goes to ib Previous Stole G5 since, W's alneady oblaing ab gq shale. ° \ Q? ee | %a! Now make add Aral sShaled by oprtying 0,1 | On Gewany Hes it vill ot lead to | Slep-3! plo make all fral sholes to non - Aral shakes & non-Gral shakes bo brad shotes - Rie makes We. Lomplienert 4% queen language . ~@) 2 6) s ayo \ | | Periqn a Finite awlrok, fi he language. ‘Rat doosnot end wiR ‘oab Skep-'' Conshuck Re eninimusn htieg fit “Be larquoge. = {2.4 Hoe Re minimum bing is ‘aab. | | Lage: Ke iving Gy rife ayenbel *o' ts applied alseodly. do | HOD apply symbol “Bon Ye. ‘bis oplied on Q,. | NO Hardiion hakes plow. Jo “b wn be applied rrony fins | : P | Q | (i) 2p» 2 a) > (3) FA %, ab “the wansitiona axe completed | i | iskp-3: i woe % w alseady applied Now opply ‘b | on gq. One we ebtain ‘b’ Gs ‘be is en countered oon, simea)) Ren no kansiion is obtained . and | obtained ing, shale - Roo o | oll hansikors Oxe compleled. ‘2 | it goes fo ib previous stole a, : since “bis alsceady | | Skp-4* %% hate. g, bo is alreadky applied -Now apply ‘on 4. Onte we oblain ‘a’, th ‘a! is ertomnioal reany fines Ren 90 transition is obhained . Skep-5' Faq, , apply “Re input -tymbst “a! on Gee Tt ged to ib previous sale 4, Since ‘a! is alsteady ebbaind od 4, shale. and apply Sb! on 4, +it will ge Shep -6 Mep=6* slow make all final shales to non-Fral shakes ¢, fen-fral shakes fo firol shales Ris makes the Compliment? of — Given larquoge : 7 ~~. Qe ™ | : CLISE3_ oe) 4 l | Zliminale “Re ¢- tramikion to Re. follpeoing €- closuse (4) = {4_.% 424d ~ e-alien (4) = 44a, 4.12 €- use (4) 2 4a, + €- dosoe (4) 5 f%,9,/%} - € - closure Gay = $44] s (%e.®)« &-cemme (S(e- dosue (4) , a) = € -dowe (§(6 4,,4,-9,.%) 2) | = €-clowe (4,04, 0 $v p) | 544.4%] | 5 (%. 4) = €- dpsune (§(¢- closure (42) , 8) = e+ chosuse (5 (44, ,%, 1 43 Y »»)) | | | - | = €~ dosuxe (% + %) | . | | = €- dosure (4,0 6 0 bud, = €- Closure (4, ,%4) = Fa 8, hy VOY | 8'(a,,0) = €-dosune (§ (e- closure (91), 8) = e-dosuse (8 (41%) %) > €- dose (4,5 2 {444 £'(4,, 6) = e- dosume CS (e- Ulocune (a) ,)) > €- dowwre ($ (4), 42) 6) > €~ dosuxe (¢) =p 54, a= €-dlowme (4 (€- elovure (9) , a) = €-dosuxe ($a, ,@)) » & =¢ 8's) = €- cowse ($(a,, 6) 2 % : - | £'(4,.0) = €-doaure (6 (e-cloue (2), 0) | = ¢- dose (5 (1%, a), | © €- dose (%4 = 1944 (8'(4,,0) = €- homme (8 (e- douere (43), &)) = €- dose (8(Ca, 4 43) BD) 2 €- closure (94) = 1% 4 8'(a,,4) 5 e- Unsure (5 (44,4) = ¢-dosue ge teed = 4a,,4,4 fia, by = €- closure (s (a4, ©) ot” ® oy ih RQ ale 9 _ Ne Re 1863-oby Conuck NFA FA he Language L = [who # Re a" symbol For Be end os 2 over Zs Lo, 44 ond convert NEA to OFA + Lad {44 La, % a, 190.44 {8% 4 fa, 4, %4 | #1 %% 44 | — oo I Lae oh | 40% 44 | | | | | | | | | | a | | - Convert NA FR Re tarquage Le {wow har He subsbring ‘wo! 4 oven gre fo.ty | ard tonvodt NFA lo DEA. ° 4 {904 Arh | Lao%s4 {aot | Lao | [wom 4 | | Facti%d | ods | Laer 424 | Lott | -baetad | 180% | | - food, {4%} | [45% % M4 | a 1404.49.49) 140433 | fac ea Ae ® Convert Re following NEA ino “Re equivalent OFA en | | P jevy ey | - fos | Yek | 7 Ry 13 aS ‘o > a t $ % Nra: peas = § (@ , 00k) et = S(tP.a) 901) | > $(Pp, cord ae ee | = $(p, or) = s(te94d,0 | oo. = [etler a ee | { ®) Convest “Re. following nFA to DFA Lou. [| {el {py Jes » [pd YP 9,33 tery | é u

You might also like