You are on page 1of 106
BANGALORE INSTITUTE OF TECHNOLOGY K.R.ROAD, BANGALORE-04 Department of Computer Science & Engineering 13-2014 ODD SEMESTER SYLLABUS FORMAL LANGUAGES AND AUTOMATA THEORY Subject Code : 10CS56 TA Marks : 2: Yo. of Lecture Hrs, / Week - 04 Exam Hours - 03 ‘Total No. of Lecture Hs. : 32 Exam Marks : 100 PART-A. eve UNIT 1 INTRODUCTION TO FINITE AUTOMATA: Iautaduction to Finite Autoreta, The central concepts of Automata theory, Deterministic Finite Automata, Nowderermiaistin ee Automata p 7 Howes Fini ¢ UNIT-2 FINITE AUTOMATA, REGULAR EXPRESSIONS: Aa applicadon of finite aucomata, Finite automata with Epsilon-Transitions, Regular Expressions, Finite Automata sand Regalar Expressions, Applications of Regular Expressions 7 Hours UNIT-3 REGULAR LANGUAGES, PROPERTIES OF REGULAR LANGUAGES: Regular [inavsaes, Proving languages not to be zegular languages, Closure properties of resulee languages, Decision properties of regular languages, Equivalence and minimieation of automata 6 Hours UNIT-4 Nel CONTEXT-FREE GRAMMARS AND LANGUAGES: Context fice grammars, Parse tees, Applications, Ambiguity in Grammats and Languages. 6 Houss PART-B UNIT -5 Rete tock, PUSHDOWN AUTOMATA: Definition of the Pushdown automata, The languages of a © PDA, Equivalence of PDA's and CFG's, Deterministic Pushdown Autom Houts UNIT -6 PROPERTIES OF CONTEXT-FREE LANGUAGES: Normal forms for CiGs Purnping Leama for CFGs, Cl sure properties of CEL. 6 Hoa UNIT-7 INTRODUCTION TO TURING MACHINE: Problems that Computers cannot sol (he turbing machine, Programming techniques for ‘Tusihing Machines, Extensions basic Turting Machines, Turing Machine and Computers, 7k UNDECIDABILITY: A Language that is not recursively enumerable, An Undecidaiie problem that is RE, Post's Correspondence problem, Other undecidable problems. 6 Fo TEXT BOOK: 1 John E. Hoperoft, Rajeev Motwani, Theory, Li {Chapters 9.5) Jeffrey D.Ullman ~ Introduction to Awworat guages and Computation, 3° Editon, Pearson Hducation, 2007 11, 15,220.25, 3d t0 35,4 5,6, 7, 8:1 to 84,86, 911,92, 94.1, REFERENCE BOOKS: 1. KLL.P. Mishra - Theory of Computer Science, Automata, Languages, and Computation, 3° Edition, PHT, 2007 Raymond Greenlaw, HJames Hoover - Fundamentals of the Theory of ‘Computation, Principles and Practice, Morgan Kaufinann, 1998. John C Mastin - Introduction to Languages and Automata Theory, 3° Edition, Tata McGraw-Hill, 2007. 4 Thomas A. Sudkamp - An Introduction to the Theory of Compurer Science, Languages and Machines, 3° Edition, Pearson Education, 2006 HOD, CS&E Feuetned 6 Bcaarvely Feuer. Sota ine Bra cies ype = Contiat Senatsive = Cqnltge Geentee Liter fon guest have dest cee a ® Peetieacata ype 8 - Conldat Free = Conteh fee mF # -Qowtrderr , ® tonguage : tery e Pulver 96 Sup s = Regelor gramem — — a Reguler lenge = facsia pulnmeton ‘F0) t oO Denediord ante Q ks ¥ TEORMAL LANGUAGES AND ALTOMATA | Patamat® Opecalé autime Healt. og by Fenelf ox 4ylern = eis oseaie bated withoul humas Cool talended & | i = | PxGrate Theor - Atudy op abstract compar desicen of machined | «| An aulamaton 5 egined ab a ayslem Shere ener gif rater ats ton are tranhformed transmitted £ Ubed for i poe -fuUncHON® eithout direct pox OCpetion o 160 | Bs ulosAag Mabioe | ' 7 (Srna 7i Rie eae “i He : Paterna e if rr _ [ aan tf Fetparala | T Pree fa fe ae \ pees ie Model apa diterel® outsia Gn 7 ery onthe Popel lon the stole o& ett coy Om the Staleh of O Machine clon the Atalé as wet! OF on the foput fn auwmne lo to wabich the oubpotd dopencts, Gauls maton witbost a severe | lot any tontant ef Hee ENTRODUCTION 7 # that ih a kek y "Bek th @ collection of cbatinck elementi - AM the element the ee Ahoulel Aepavated by} caramas ~ Example | The set op po rive Faiz ws ved aw 245, 10,15, 80,253 The elements af a bet can he S: {10,20,5, 95,157 ~ Thin veprer entation element Gre leas ~ She set can ato be reprerented 4 enclosed bebden 4 4 3 exh Sxealé then o cho gwale than O and les OF Sure! @ AS whch ace divratble by 5 con be vepresen Pa oy Ordey visfal tf the namber of beac bing he Properties af the element tf the number af elemen eve more S={S5xfxmea poste tot where oxx sad } ~ HES tf % the an clement in ihe Kee “és » nat» ‘ Seth eve denoted by capital (etter ~ ElemenG wrtthie ihe net ave clenoted Buahak in an empl Ack fp mull att 2 - BR Fee which has no clementi ~ Denoied by 13 or Speer S: {ims => ¥ What fe oO subset 2 OF Set B A: - Denoted by ASB Bs Lae 4,562 » & ¥ What th 0 Proper subset ? by fever cate Sek A Th a subser G sew tf ever clement of sek B th an elurredt, ~ TE ASB and B contalo ay element’ Which ts Not in A, then A te @ proper Aubset of B ~ Dott bY ACE, - The to Lhen We hay that too SelB ave equal ? = Every element’ ace 8 Clement of Sek B 16 also G0 element of ret A sets A ond & ove Aame 44 ACH and BCA. 29 element’ of Set B and wery K What fh a power set? Aek Of all Aubsel& Of sek A = fxample = Az fabcy acd The B- fa,ect 4,3], Faget = [Nore]: tes number of clementh Fa see A. Ale 3 tt lal number Of Mtbsels Of Ack A, ist i =_ She Cartentan proc fab) | aes and vee? Heve, Carb) 74 an ordered pair auch that © RX Of BEE A and ‘b’ te an element of het B Bz to} ~ Sample + A: farbic3 AX Re |X What ih union of (0 sete 2 = The unten Y Io Kel A and Aus: {x| xe or rea? = Seomple + A: faorbie3 B&: Lo, Aves ta.bc, 0,1} Bm Biven by 3 Lao), Ca), Coe), Cb), Cem, C8 % Whee ih folBvsection of loo ret? | = The tolivsection of td seLE A ond B 7d Qiven by | Ags = fxluxem ad xe BF ~ Example A= Labed B-feded Roe: tes i | + callecton af commen element tm bah Re AUS A ond & X that ih Disjorat Sets 2 sy 7 - Tf to sel8 A and B have no commos elemenK ther the Ido Aele | ave cated Ditjoink Seth ; Erample s A: daec$ B= 10,18 | Aoe- > * Udhat i6 the Agperence of to sete? ~The dgference of to Act A and & th Biver by | A-B= f2{ xEA and ~¢e?d Gxampte + As fa,e.c.d§ 8: fad A-B = Lbet F idhob te Complement of a Aet ? The complement A th denoted by 5 A set contatorng everything that th not ta A ~ BURA pohere U ts ihe untvertal Act > 4n(2eU ad xpas Exareple U= F 1aan sie § L423 B= 1445.65 DI 103, ) * Alphabel i = A tanGuaee consists OF Various AYmbold from which the words, ptalEmen& 1 ca0 be obtained . These Aymbols are | - | colted alphabell, i i =_Ain_alphabet noa- emply. Sele of Agenbelt agmbot WKE_Det oF alphabeld of a lagguase crample that can be obtained from L | ore £0, 1,00, 01, 0, Ul, 1010, OL 101, fin_empty dering 16 denoted by the symbol & — REGGIE tL aven eae cE GE he. € tH not prt of & + Pn topane tre string F5 Qenesated , fe has Hr Number of Aymbol > ond has The lower free aGeHt * The lowercase letters auch ah U,V, &, x.y, 3 ove normally ured nuncher cf StrIAVD Can be generated from EF and once A cepinite —sequience core (ebbere a,b. ete along with the Agmbols such of] {and 40 on are Used IS densle the symbols to E fodicalE the Atwing A ‘S Example = o1o101 Te ryrnbsts O and | ave fo EX and the Cetter wo denoiis! ing 8t Apesrppe valu the string 91H 0 Apecfic value ¥ Uthat 14 concalénation az tao strings? - The concaléenaten of lao ating A uw ond v th the Atriog obtornect by SFER® the Letlern of Abeing UH folloaed by the letters of sad v Example > @ U> a,0903.-- a6 * What th aw ~ bet wo ey? that then % th a gab Abts meng A BYE a.aga,.-- Onb bobs ® ua: Compuléx ve Sceace Uy: Computis Science ub Abin 2 can be decomposed tole > xXYs °. * What io prefix 2 ~ A prege Example : 4 1 Atring of ony number woe map The Abans © had prepin Sen Concalenation th not commutadve uv ve Three atviggs %, y and g tach of leading Symbol. €.%, xy ond ys § obtained from the Aymbots 19 5, The etd & Abdgg obtwned from the Ayrobold 19 E. The abtog LY te & sub absing and 16 a Aub sbriag pumbes y trail pte various sug weverbal veverse Order were ufaca® # lalhak ip the lengib ay a String 2 nt _The length ay @ bbing & is the number of Of a Atrigg th obtained by oriting Lf Us O,ag0,-- 00 _ Wie Re weverse of Ut th denoted by uf Be Andon Gor ---- 0,8, deroted by lu ee © Cpeniioany be ds 0, aay" Sn eo: oer0 tabs in * The lengify oy on empty ating & tA O lets Tune og * What i& porers of an alphabet ? = _Jhe power of an alphabet clenated | of IQs 2, £1 ys ys 0d Hye aymboln tau a F4| 7 f by 3: fh the nek of cont til eee = ~ trample Re wet of wosdls of leneth O sree oo | | a | ' = foo,o1,1o, ue, ; ° i {000,001,010,100, O11 101,10, PB | i i and 40 00 % Wet axe the two variations Of powers of a0 alphabet ? Vortakions af poser Kleene closure] Kleene ator of an alphabet Kleene plus | © What 76 Kleene closure | Kleene Atar| star operator 2 | = The Kleene Closure 1% deproed Os =‘. s®ugiugtu- which fs the set af words of ang leg soctacking Gach bering th made up of sgmbols oly from > matt sera ~ excample: O T= 4103 =* 2 £e,0,1,00,01,10, 11, 000,001, « 4 | | ; athe b | which th the sek of brash of OF 5 LI OF O0g CRIP’ | i @ E+ 4%, bef | « soe wo yo wow be SN: ££, "0", "be", “abe”, “bea” , "aa", “bebe 4 tahich 16 the rete of AbeQos of old 4 beth of argy fri? * Uhat i6 Kleene plus ? ~ The Kleene plus denoted by ZX th defined ab | | zt -zvtude feat | Ghich th the sek of words af ang lene except the nal rg. _+ | = € C59 th not pat op FY & heoce EGE ~ Gromple: ©: 40,63 leh. stag ste Lo1,00 ot, 10, 1, 000, 001, --- 7" Em the net OF l ings oe od Ge Au abt’: % Recursive depinitioo f 22 Ga | ofecsene for each O€F ond each upwe = | for reverse Of fer each ACF and each wx Beige s Oban | _denoted by LEE { “botgg > combating of equal 5 UA | t L€,Ol,10, O08, 1010, O101 , OO), .... - F be _vepresented a \ 7 @ The longugde Of Mriggh conbintng of 9 mamber| of O'S follosed by 9 number of 1% con be — RB Meriag that belong» @ A tomgaage eenteising empty sting € os denoted by LEH) © Ae empty lenguage ft dmoted oy wes ge ty called word ov sentence of that tonguege Eromple | A language of Abingd ceninting of epite! nucober of OF and 1% can be represen ted Ob LE, 01,10, Co, 10100101, KOO, a 60,01 tk a Kentence detect oon * Digzerent types of lagdugqaes TYPE O Language -~ Phrane strocidred language Tyce : ~ Contert scmitive “ Perea HEHE = Contest Free Sgre Ss - - Regelay - Regutlor Laxguagen ~ The wgular landuakes axe depined as the languages accepted. ee MENDED ® — Delermromtic Got! Autimate USER - Nondelérminmstic = ” Soe a ha i with E- moves ~ They Ore also the languages defloed by ReBular expremsors Abstract Machine An Abstract ma ne [Abstract compules realty doen ni machioes ave not aclial machioes hypothetical compulirs . alto calle a a =the _vastour types _Geear bounded frutemata Pub dao Aulamate + Turind machine File Automate =A fioflE automata 5 Liathematical model ahich f% used Beal model of a compulé herdware oF saptoare system tl i i i { i devices with the fopulb chosen fren sssresenees = _E_skacd* for set of alphabeld uviog which any string can be to bhidy the abstract machines or abstrac compytine a a er P obtained « ageck the string {2 Using this abstroct madet, the _behavios 9 the adaat PYyb\Een Can be underreood and build + perforay various octivi Ges. Lebich hay three component + Loput- file + Control Vor ~ 00 veading the Atniog , the machine Mapp accept the bbying or | = _Figli@ aulemeten th an absbracl model of o biital comple | ! Topat rape AST Terao] Ci “opt tape + Conte + Output * The vate ontwol Onit Outpal Cocceptl reget} The topuk tape is divided fol cells, each of which cao hotd one Aymbel The sting to be prwcemed fh Atored to there cect peale clergenated ah @, God at least one final dle ~ Aare from these, 1 haw some fistlé Ataler designated BY Ws Ga God sa on ~ Based on the curvent fopul symbol, the Sele of the Meshing can change - Durtpule may be accept o¥ Tefeck hen end of toput fh encountered, the contol uae =f be fo accept oF reject stele. cipferent typed OF Fiotle aulSroata F - Deler miniatic - Noo- Delernnzatsie Fi = Non-Delenatnrske Foie “© © @+@ stale Bess Fine! beth beta Sp) * & feo l& oe ® 6 Puld mete Pattonnecto. (ara) = Aulomects CNEA) worth &=maves C£-NFAD ~The machine har some Atalé one of which 1 the Ataert | Delermratatic Finale ~The Deleeminihte Fin Au temata Dect. Hee B | tnckicating five components war a8 ae Pe ae ' He Ms 6@,5,6, GF) i Le can alho be called by Mth the name of the machine Qh _nan-emply , flatts set of Males SLs non-empty , fin Set of Popat olphabell i JOM -funcbon which 4 @ map| #0 @ Baked on the cevent stal® ond typat aymbal, the machine enlérs fa another Atalé fi BE QA fh A btavt stole” ESQ th het of acceptiog oF final stole ze Thad, Name DPA eme@es fom the follow focla: = _Delerministc There fo exactly one troonrbon -for vey Toput, Aymbol from the Atelé. So, 76 ss pomsble defermine exacthy WS wheh stale the moch toe RETA tO _aglei consuming the foput Ay mioel. Go, the machine th detErmroiatic ~ Fiotlé Har fit number of Stal ond arcs. S0,7E 74 | delermiainy cand fiole i = Freloro ato. iB : Poe _ushich 4 mn ator Prulametes th 0 machtoe which moy accept | the Atrind ox reject the Atring - &, it 75 DFA. Simple Notations for DFA'* or Trans en diagvam | Trans:toa br Oo Trenton diag | Tramn:tion graph @ Trantor table The transition ctagrac for DPA Mz (4,5, 8. Goi) th depned ob a graph with civeles , avvoa aod ayes with LabelA | 400 crrefes ete Te th formats defined ab + Each stale af @ covwedponds G one node ox vertex represented bing a crete of two Circles " Alphabets ty 5. are vepresented ab labels along «7th the edge * She brarhition from one stale IS another State ib tadicated by the. dtyected edge tee Sle ,a> 2%j Thi todfeal@h thai there 14 a dsrected edge From 1 ay cand the edge 1% labeled a : + The stase Atate 26 G Male ahich has an arrao pat origirati ag from ery nacte and enléxing sola the Stal€. This Ps labeled wth heart. + The final stale or accepting stalés abich ave fo F ave vepresented by double ciyctes. The Ataleh which are not to F ave represented by a Afogle circle A 1 Gouge + Te has (Go oder corresponding 1 the io Atle af mochine Se | and @, + Go hab @ pbave arvos (tocoming arvas not originating fom arr node) ond hence te th the Abert Abad. + & Th the acceptigg stale ond hence TE th dlenated by tee cavclet + There ove 3 axch s the fit one with Label O from G F ewe the weond fo Oy Ae Be thd en ot boii fom FS foo table for DFA tabular vepresentaton of a crank +The woh of the table correspond 40 the Atalés of DFA __ebtoined from @. The columns correspond to the Sopak Aymbols obtained from ©. Caohere i4 one vow for each AtalZ, and on the value yeturned from S95, 2) repress & the next Atale of DRA and te enlévect fy yo g and column a. c The start Atalé t marked wiih an arrow ‘The final Atale th marked Fh o ater = Grample t agrem Transition table et ne fron ae, fe) @ out on enn Sh BRP | The transition diagram *hab Go seal Ge ond @, Pe_dreve axe “two topat Aymbol® O and t corenpond +o to Columns, wing 20 axros mak not ont Soaking from ony Stale end tobeled start. by patting an aro with direcon towards ¥ K Start stale 24 represented The stave Mele rm tdentéged ~The pting ww ~ Crample + The feral states ave represmnted — The flew! males ave represented bf patting stars by the ate of seal by tee orcles Jhe trantiton from stale 45; of & The eqgutvates Land tan ta input Aymbel a % Atale pF represented by ceribag p ta vo vepeerented’ by O directed edge % ond elem o originating prom Male a ond ending at stale p atth Label a How a DPA procemes Strings th procened! by the DFA ab Lake ae 18 the MtarE of DER and let w th the Atvigg |] be procesed w| | * Zot Galigoton | | ea Toitoty, the fopat portale porslk & ihe pt mos Aymbol in MriRg « ening Processing The DRA reads one symboi from the t puk Abiog at a Kme. she Machine fr Heal ge On reading the Input rymbol, consutk the | transition functon Ty there th a transition 6 (450.0) = Q, thm the machine ehanSts Feb tale 40 %, and the tnpat p: ei potnté to the next symbol Now, the machine fo stalt gq, afl reading the neck apuk aymbo! may change th stale ag ond Ao on * Becept and egfect Lithen the tpuk points to the end af the Abrng fioal Mule, the Mg w th occepted by DPA Toput, tf the DEA th not fa a final Atal, thn bh agjected by the DED. + (tp the DEA 7h 19 Age the endl of the fe Abrigg oth | % The moved mede by the DPA for the soput Aeing “abaab fh, } Ge 2+ % P+ yy > G, 8+ %, B+ ea hich th the final stale. £0, the Atilog “abaab” th accepted by O AL the end of the string abaab, the DFA will be fo Atal’ Se | machine | | ) DPA wrt | be Po stole e s*:axx* 6@ i ae weewwArvely ah + Basra _ eeu eee toditcales that if the machine $4 tn Atal? @ and vead Po tput , then the machine th Sil ta Atalé ey. « Thrduetion | lee Pexa where a Th the lant symbol of wood x is the, i Femaining erg go wo. Let G th the convent sale ood w IA the bering @ be procemed and agit contumind the string g E of peernees. lek the Atale of the machine 1 pp. Shen, §* (qe) = Sf (gy, 4e) = 8C8F(ex),0) =p Nore + ble can aldo ure € ta place é*. (iseuanaie I he mores macte by the DRA for the rnput abvigg one abiog S* th obtoined et fron & and takeng preps ee | ee S*(Qoit) = be | 1A peep 8 S* Ceo,a) = SC s*Caoe) 14) pepr ab S* Capeb) = S&C S* (Q,,0), ©) = $C ab) ba + Hn aba : Xa, aba): S( S#(Qe,06), 0) | = & (@%a,a) ee | abaa : 5*Ca, abae) = 8 CS* (@,0e0), 2) | > &§(@ 2) jae a ao GSE ea SCS8* (Qn, abaa), b) | * § (ae, b) | the Regence of = Se "Stale the DEA th Im denigg the proceming of Soidy aban Ss Ge, PB ta Ge 2% & Gq 2 &, c1e Longaage accepted by a DFA ~ Lee Mz CG, 2) 8:90,F) be a DFA. A Aerieg wth Geespted by machine M, ff tk toleh the metial stale gp to fire stale § tof. Thus, tBe lagguaee accepted by DFA vepresen the He eof. &* CQo,2> ib a LCM) can be formally wntien an: LO = Fol wee” and S¥(aq,0) fo to FG = ample = £ a 6-6-8: ©] cept | She moves mace the DPA fox the foput string “abal’ #5 i fe a 2+ +> ba | | $C %,@ = %o | § (Gor bd = Ss Pe the end of the Atiog abob, the DPA OM be FO Beale gq which Fe the fool Aiale- So, the Atsog abab fe accepted by the machine § (G1 2 & S (Gn = Ba vegjected by DEA _ DFA will noe be to the aa Atala con be diegned to formal no to __ btm) = fel we 5% and S*C eee) fh not | = bet Ms Ca. 5,6) Ge, FD ‘be & DFA, The nen- - acceptance | of 7 Thus, the non- acceptance of the Sivog to by an FA oy DFA | f ae +H sa Fg | Siassanesaisetecetd | Qo 2 we Pe A FG) fo AL the end of the heseg El@ra) = % 34 not the final stalE- So, the The mover meade bi the DFA for the fnput stvog “abaa’ Ps £ (AH De W Abas th vefected by the mechion . [NOTE 2 1) DFA accept Empty _ lenguege, L eo + Tf there 1 po final tale ewnply _longugge BREE) *) DPA & accept an emply Atiod Le fe} © occept 8 DEA 40 accep exactly one a. 4y DEA ty accel ene G oy one b oe By ab @) conept Sy DEA 1S cecept Zero or move ath DPR Destan Techniques = There ave three type Of problema for ihich we con conbtruck a DEA = Patters recegnition probleas — Divinrble by bk “ — Module k- county + > PATTERN RECOGNTTIOA PROBLEMS | STEP Lt Tdentify the minimum Abdeg STEP 2 1 Tdentity ike olphabeld STEP 2 2 Contteuck a Algleton DRA STEP AT Tolentigy other transitions not defined to Alep ® STEP 57 Construct the DRA Using branibions in steps and sept. The DRA f& defined a mM: (@.5, & GF) 8+ tw. e3 Ze fag Qo Th the stack stale Fe dank Tranbitien ciadvom Transftion table au | mq. accept NOTE: The language aceepied by DFA t+ dar logy G1. Draw a DEA 1 accept string of a's having atleast om a . {8 occept_Abring at least one o. bof a's and b's having a_Drow a pen eh M: (9.5, & _ che DPA ty Yo th the stark Ataid eee Fs hen$ a EeECEE Transition cba gram TransHonm table o a,b d pe are = Ora © Ja jb i __ Sota ee [a [ee | i if S$ 6%) #2) Oe | to ' i Sen 2 ty NOTE: She landvase accepted by DPA TA us fw: nates! , we lands i Once the machine enters fol AtalE G,, Trrespective OF aoy number of inputs of a's and BIA the meching } Rermatoh fo Aame Atal® % 20d can nok come ast HE | AbGIE So, the machine th tapped Fo Ata Gy) anck heme T ik fh cotled trap Ale. Stace, @x 7A OKO @ frol Abas the AtalZ Qn 1s called trapped final Atala, Qa. Draw a DEA +o accept Atrings of a's and b's having exactlyf one 0 The DFA th defied ak M= 09,5, S, Go,F) G2 Awad — Xe tabi i Both the Atart Atal Ps 4ay,} Transteon caine Trannition thle NoTE ik The Language accepted by DFA is L: Lweingorsl , we fa,batt | * b & a,b mah o bi a A @--@ & | accepe Trap Atle fron PB bate for chic there ewsth transrtions t rtrelf for att the | foput symbols chosen fron EL th Galied O trap Abate | ¥ The non finol Avap Atle th also collec! dead state & PD Fiat stale can alko be 0 trop stale bul’ TE'ts not oO dood! bole sloce the stving * accepted at this stale AX. Obtain a DFA & accept Atriggh af a's and b'h Atorbog with Abick ab. The DPA th defined ah M=(Q,X,S,eo,F) 8: hee, Wi tad Es Labs Bo th the bore stele 2 Float Trankition dHagram Trackitien beable sfo |b. hte | St = wm | - wa *ta | @a | oa BS: Draw o DFA (6 accept strfog of atk a tS ending ut f eee Fe Serbe he Ye te the stort Atale Be £33 | _ gs jo |e i Boy om i | re |e |e i i e} = 32)} e) =O) a [ee | fa |e |e | “| Sib) = a iE eateries i i Ga : i | (Qua) = By = a ~— 4 1 i £ 2) = oF _| | SRD? ee 7 _ i NOTE : The language accepted by DEA ty Le tesa : arok Dee id a6. Drow with The Q: a bo i Fs 0 DEA 1 accept Attn of o's and b's which the se%03 able DFA 1K degined as ME CQ, E §. %. FD 4 Go Gs Ga. Gd fa bd Gh the MMos stale 4 G0, % at Transition @7. Drow a DFA % accept rab sie substdog aab She a= Sa DEA 6 depned ay M2 (GX, &, Go.F) 10, 11%, AF Lab Go 1 the Mtoe “atoté FL 4st | Transition diagram Tromi ton -table da not end 08 : 5 having Aiiog of a's and bis havieg [peci© @@. Drow @ DEA G accept AtrIAgA OF aS ond b's except thone | a To having (Re substring aab Drow o DFA (8 accept Atings of O'6 and 1’ having three conkecutive 04. i oR Drow o DEA fe accept strings of 04 and 14 having a Aubsb4es 000. a | i The Dee th degned as M2 (@5,68%0F) Hee Lo Q: 440, % 1 de tah ; ee | ss tong a - eee | I [ee me the Met wie cera eee { oe Fs Land ie 7 7 FEEEEH Ed fete i 1 jee Dec 10. GIO. Drow 0 DFA @ accept Atria of a's and b's AUCH that / z Lz Laws | we Cate)” where npoF \ o8 - Dieo O DFA fe occept Abring h oe ath and biA star hog ath one @ ond ending cit one o with minimum stride aa The DFA ty defined as MzC@,.5,6, BoP) | B: £0, %ad f | | Xs La bt z i Go th the stark Atle Fo l@aF | Tramition diagram Trockttien table o (20) Trop mate}? Cae O11. Drow a DEA fe accept Atring> 9f 0° ond b's ending I ab x The DEA t& degred ab Mz (6,5, 8. Gor) Gs 1 Ww, Grr Wy, Gz HE Teta,bj Go th the Meare Atle Fe tea, mF Lf wlab+bs) | we 40,b3*F L= f{@16)" Cavtbe) + MZ0F o fe [a [as | ew [ea | em |e | STE ay ae initia F se EERE 4 “ta | a oe pAltased 2 Sy tat ge £4 %,b) i- SoCee oH DeOe ‘ | ote where F: fobe eee i The DPA th defined an Mi C8, E, 8. 20, F | Os 120 1% Gay Wr Bud | } } | | | | | | } i Fe eud i ___ Transition diggrom Transition Table Q1B Oblain a Q DFA 1 accept Atriggh of OF, 1% 0 °0 follased by odd number of 1A and he @: =: Go he Mace neote Fe tend a DPA ts os doficed 1%, %.. a, Gab fo,.aF Trastton advan é =@-°—@_-@ UD =A acegste teo consecutive eA, The pee s depned ab MQ, 5, Sey F) &+ te, Gs Gak eb, bb Zs faey Gm thé ster stale Ps {Qn MF Trorhttion dara zwed th Obtain a DPB % accept Aevingh of a's God 6's and BA bepinnmng orth | Sis coding ath a2 © Transeo toble wt at- moat Tiacsi¥on table: S fa |e | PY Go ee om | 4B | ee | Ge %al ae! - ot lease 00 _Tramition_ebvggraco AIS. Obtain a DEA 1 accept Atrindh O and encting Oh ot least H00 1's, of 0% ond 1% Abortns erm Ss Lobd [ak 16. Obtao a DEA The DEA th defined an M2 (Q 8? f 01 11 Gon GF Boh the ator’ Atole © accept the Npuase eee 17, Drews a DEA accept AbrIngs a ah and b'A having than three o's The DEA dopined ah M=(@,E, 5. %0.F) Qe 1. G1 Sar baF Es favs Pee Go th the start stale i F4 Ge, Gi, Garey d Tranw:t00 — aon Tramitea table Nove $ | 8.8. 8. cog IR. Draw a DFA cecept ACE oF all Abrings OM the alphabet Z- 491 ncioa that sither begtob ov end> or boih with substring OL | The BFA depined ah M2 (@, 5, $.40,6) + 4%, Bs Ga, %3s Sy, VF Ze 4 08 Go 18 the Beart Bealé Fe fa, O58 Treosition drageece Traosrtion table bitet | (ale. Dros a Zhe DFA ty defined ab M2 CQ,E,S.%0,F) {tor B+ Se. Wa, Be OSE Faltaei tien __ Fransstion cbagrecn B30. Dros a DFA © accept the Logjuage Lz fe: matedsa, nfor>at The DFA th defined an M2 (QE. See FF Qe do, Gi Ba, Ga Gy, WS, Ge G91 Ke, Gy 1 He GF Eo fob} the Abark stale Ge th F: 4 %57 Traowiton agror NOTE + Ran to a Abts sS A sun 10 a ating 1 @ Aubsteng my at ft abbbbaaab FOr of wh of yun of oh o | Ba Draws @ DEA & accept the leqguage L= 12: w containd no ru0h of vohere = ja,b3 length les thao fam J The OFA th chegioed ah =: fobs Bo th the Atact Fe Gu, OF peal Traction chsagrom 8 Teast hoo bul constacing Qe 10, OR, My, Gy Ws Ce, Br VES, Jeng th feng! lengiB 3 MM: (Q, 5,8, GF) aceapt hone Leng OF haere Aymbot } cont puss? Tracie table g a b to al ts % | aa] - & a] - % |e | | ea| es % | - [ee han lag ether tao or thre d FHHOOK cad be obtdoed | uae +d) mod for binay 122 Fis the remainder obtained afte dividing by k A epresen digit. Fix brace f= fo FH _& th divisor 7 . i Identify the rack, foput olphabel aod the obvi Comput the posible remaincters . These vemoindes 4 Yepreseat the Abales of DFA STEP 3: Find the transitions usta S(@y.2)* & Shere cos “ek STEP Ht Conbtrack the DFA uitng the tranitent obtained 70 sep Construct a DEAR which occep 5 Atring&® af O's and 1% ahere the volue oF each string fh vepredented ob Oo broarg number. Only the strings representing gero soodulo five should be accepted For example, 0000, 0101, 1010, 1111 ete. should be accepted. KE sre 1 * x 4 #2 a ay fo.ibad ee 25 step a: STEP 3 vemainde: | od | a | | Ca¥r +d) mod 5 J é20 © | @ro+0) mod 5 20 | § (%q.0) 7% | 1 | @eor med se 2 eee | | Heel i bt | © | Casto) mod 5 =a | $@,.22% | | 1 | C141) mod 523 | $10 =e | ta |g | Cawate) mod 5 = 4 | © Ceo) = %% i |b | Beenrmds =o | stacy eg, ' oO 1 fee | © | (#340) med 5+! | 6 Ceyods Ge 51 | Grain mod 5 FQ ee tate th | (a¥4 40) mod 5 > 3 4 | @e4r0 mod S = eee STEP 4: The DFA can be defined as Mz (@,5, & %,F) whae : Qs £40, bbe, %, Gat Ee fons Sot the start Atal? Fe Land Ih genmat, for modulo 5 “not he accepted . DPA Can be defined ° ea %e » ree gf atl strings that, chen WB. ObtIN a DFA that occenls folfepreted 10 reverse ab a bioary FOlRBCE, ty alivi sible by S Skamps| tvig@h tn the languase er ! Examples of Atvingh tm the longuage ere 6, 10011, 1001100 and olor The DFA can be defined as Mz (8,5, 8. G0,F) QF be, ode, ts. Gul X= 40,13 Bo th the start state € + feed Troosttion ctagrom Troniion -toble & oO i +h Bo a Bi Bo te bs @ | ey | a Sy ta oy Qh. Draw o DFA & accept decimal Atring’®s churatble by 8 grep a: or: 10 d 2 10,1,9,3,4,5,6, 79,93 hea stepa: t= 0,1 19,8.6.53 wi © an the vemander => Gy 14.73 tos > e fas.83 8 oe Go #0 Fo) med a=0 | (o#O 1 mod 321 Goeors) mod asa SC 0) = Go § Rot) * % Se.) * Bs 35(qe 286,99 = = 8 (bh BY > Sl ae, $3,518): |S CHiN 2 ee [6 @u3) = ae (1049 40) mod 3 a Gove +) med B= 0 Go#o +9) med 3 224%. %, ted | 64.0) + % | | SCR) =o | 4 | Sled se | The DEA can be defined as mi(g,F S CQ5, L114 TD * WI LS SCs, 2,582 ey) E+ bo.1.9,3,4,5,6,7, 8,35 So the Atevt stale FF: Qe if Trankitien dtabram Tranaston table I i Beer 7 | Bee : var Jaze ak a | ©) @) 42 | de a | ee 1 3 Ty I. oN ae & |e w |e a 2.8 t | % ee | r Be 7 - r | _ : i | 0.3,6.9 | _@> Module kk counléi pro blerns Q1. Obtatn a DEA The DFA can be degined an @: {£08 7 EZ: {o3 { oceept striggh af even number af o. M: (9, E, 8. QF) Lleol ts 0 awn cusiat Seaeeee e Te fel aon Hon Legram Trank¥on table diag Trankstion tat = Bla sty, 0) teeter Lee a sre lo Nore : Whee EL: The DFA @. Es toy =e Q3. Obtain ao DFA 1 accept the language L={e: lol mod 3= DEA accep strings Of odd number of a” fo} con be depred ah M=(@, EF, 8, GF) LQG Gal icone Go th the start bald Fe lee Tronbttion Lad Br cen accept Transition table = gla “el = (@) = €e) —h #0 zi z & [ee | % NOTE 2 The gtven lagguage accepted by above DPA con atho be. he given language occepted by ‘ veprenented ob Ls uw: jal mod 3:0 F where Es {af of Ls Lwingte) ave divisible by Bfabee Es fay oR can be chefs a DFA Bhe ptark Atel & th Fitted Tramtton aiqgran , —— = on. Obtain a DFA accept the the -fott lodted bong be Lw: bol mod 2 > jal med (ale where wes* WL: fw: tal mod 3d fol mod AJ whue wer* Hae he DFA (8 accept a string uw such thet tol mod 3+ My OOF) aw fo ay “| Hee eee Hee e The DFA & accept Meine 2 Auch that lat mod & a j ma 210,13 a aeepe QL Xx Ga = 1600) Co.) (1,0) CH) (0) CaF S (Co, a) = (6018), SC0rA) = C4) Sis) = (6Cne), SCu@) = @0) §(@od.2) = (6, S(0)) = ©, 7 ~ | $0.9.) “Clo, sC.a) > Gd) a S(t0),a) > (8Cnad, £(0,0)) + GD FCeamad + (Sle), Ca) + (0) ( The DFA can be defined ah M>CO,E, 6 8 1 G0, Bo, % Goi GF Zz: faj % th the start stale Fe f G01 Gi, By By BE} the paien yp tec Traphi ten deazram te G6 6-6-6 6 _T BY Me goat patie 1 Tiarnien table | Lo 8h | er [ee Kee |e % fey Ga | a5 “Fes le. > (8) The DEA con be defined 0h M: (8,5, 6, a, FD Qe A Ro, is eos Ga. Sys OI Es tag %e io the Atat “tale Fe 13, Gy Bei %ak te Transition hie B ram Trani too table sla ee | —a|s Ka | Kas | Gu the _followrng where 2 bol sod & Zleot mod 25 lel med 8 $ lal med a5 © The DEA con be defined an Ms CQ, Fransitios diagram |__© The DEA can be defined as M= CQ, 8.%0,F) t Bh Ge, Gi) Ra Bur SSF ef gee _| LE: fab} | E Qo te the start mele a cee tl | Fi $e. %5ie,ed RtY ft z feel) HH Transition dragram Hai Trossstion table | | oo hy ao on 10 au s[ale | oO CGO O=8 Sele te) \— ® . i to Ga [% zy a | %o Za | to | | as | @l ee | i NOTE : The langueee accepted by above DEA caa alko be uxtlter ahs 4 eee Speed a on Ls fee hak even number of aS end even number of Bap | OR Li fei Both Male) and Nglo) ave divi ‘Of be te: Both Nalco) ond Ml) are mul ples on Le {wl Nelo? mod @ >0 “and Ny(@> mod & 20% Th DEB accepe een numbers EY a" and odd number oy B'S DFA te accept edd number of a’h and even number of bS | She DEA f accept odd number of 2's and odd number of b's | 7% | % | & - & | % | % | @a| to] % i | *e| Gs | ta | 89. Obtain a DRAB accept Abriggh of a" Ond Bb auch that Fi | LiLwl welasb® such that Noleo) mod @:0 and Nile) mod sot i The pomrble xemaindecr for Niele) mod 3:0 are | fo,t,al i 4 bk {Ro Py, Ay = QI he PoMTble semainders for Ney { CBO, bo} Transiien deagram i Bisse — teal ia tel00) | Conse) | Cra.) | j——_|__ As (0,0 | Cane) | Cao .6=) | — fo cones) | Cage) | Corned i — 106189 | Go C089) | I a (8,80) | (0,20) | (aa ,81) (4,8) | (0,61) (Am .t5)| oe Moke (A160) ah the ginal Atal. ath) Na Le{wl we Cath)* Nato) mod 3-1 and Allo) mod (2) med $20 and Named a0} i Me (B9.80) Oh the final Atale To accept the language C+ fol VECat)* NCio) Ted a =a and Nilo) mod 9 =P mabe (89,6)) a5 the final sole and ro on Q19. Drow 0 DFA 1% accept the langucge Ls fw: has odd number ag 1% ond fotlased by even number af 05} Completely dene DEA and tromiton -funcon The DEA can be defined a4 M: (8,F,£.%0.F) Qs 1%. Gre te, Sak 7 Ee tos} Yo Th the stark Stal | FP: 6%, .@3 | Transtar cbagrorn Tronmon table. | ; a sto fi | “OO zefets C 3 SS) - A T o *% | %a | be & | as | « *% | ee] - 11. Obtain a DEA f accept Atring of a'S and ba Auch that the number of a's th divisible by 5 aod number of b'6 th divihible by 3. dhe pomtble vemaindest for Ayo) mod 5 20 are tree Hite ear Hace Lao At pa as and = OF 7 She pomible remojaders for Nia) mod 3 fo,4, oF 1€o, 1, 883 = @2a Gx 92: 4 (Ao, G0) , (Ao, 81) , (0,88), 1,80, (6481), (OER, (ere, 60) , (3,819, (09,83), Cas, 86) , (3,81, Cases), CA 2D, 8D , (04,62 F The DFA can be oh @s 4 (ma 60), Coove __ =F G0,60) ferso coo, e)} oo.) |¢01.81) [(no, ea) Crorta) | C168 [(po, 20)) (orto) | 3,20) [Caen (61.8) | Coa,an) oye), (41,83) | Cea,ea) Bo) (9,80) | (93,60) | (02,8) Cons) | (08,8) | (9,899, (42,88) | (93,82) | (rao)! 48,8) | Cau,80) | (628) | Corn 81) (e3,88)| ‘(64 69) (4,80)} (90,60) Cae) = {ont (60,62) Note > ay To accept the langues Le Leas nals) med 5 F Oo? mod 8} except (He.Ba) | (A, 61) ond CARB) mabe all ether AealiA ab Poat Atales 2) To cecepe the language \ Le fu: male) nad 5 > mys) mod 87 exeepe (90,80), CACLBID , (O0,68) , CANS) , CANA) andl Cag, 82) mabe UL other tales cry final stale Tune tt "@Is. Obtain a DEA @ accept stings af a's and b's Auch that eoch Sune 13, block af 5 consecutive symbols hove ot leak feo an, The DFA cam be dogined ab Ms (5,8. ee, F) i @+ £00, 10,00, 30,40, 50, 11,91,8!, 41, 51,88,30, 49, 587 (15 oie) | E+ fa,bt w= 4 (00)3 PH the stare state Be: {tsa Trannition draarcen Transition table Ss Neg ryan ag 0 za | sa | 52 [4a i | exlended Bion of focetion te trace. @ sig Ls Bobba Bele ment whee a th the lant robot of wo %__fh the vemoining Abie gy © %_th the cusrrent Abele of the mach’ ealteh tots ST eed p =O Soce wrxa, &* (qtedap +O = From salt q on foput serving w let ah aanume thet the machine F090 On Atving x ond Since _ezxa_, we phould fod the trans! res then on _Kymnbel a. 2 From Atal? qn “toput string ¥, (ee the machine entrn folt healer, Sin zy ~@ = Frere seals cx 00 }fnput™ symbol a, the machine should entev fols | Mate _p Glcp aip ie ~ Replocme » | & (8 (qnd,a) =p + © = Comparing equatins © and ©, ANS 'h ave equel. Therefore LH-S"s axe all equal So, S* (qs) = S* lyze) = 8(e%0q,%) 8) BiH Shos that S*(qixy) = &* (s*Cam,y) for ang stale wand Atriggh x and yf. The Ataliment to be proved th S* cain) = S*Co*@my) 7 @ By advection on the lenglh of if Bans bee Sandip + © J ye LHS: on og” O = S* Cy ixy) ? S* (qx) Gs ee > : RUS 07 eg? © = 8 Cstgoy) Ss Ce.y) SOO Lr Siqer> el : op See, LHS: th home ah RWS. the relator O boldd good. Foduction: Lek splE the ating y fol 30 43a 7 whore a th the lane mymbol of Y RAS g eg O = &* Cet (exd,y) = &* (6*(q.0) 30) > § (8* C8* (0), 319) © 8 C8*C 9,23) 18) £8" Ca x30) s* (xp = LHS. of 03°O Hence , the proag. @I5. Consider the DPA with the following transition table &loli sala |s Zs Boer not contain the substag OO and hence the bre accepted by DEA | | | | | | PROBLEMS SOLVED “pee Me eae We at lease one ‘a! fas For Weast one a foot i | 3 eeactly one to dab a eet en |] Maetag cich te nemg ab for ae [8 endras Hi i G | donot end : | tT] subserng ab foo: eet : ee Ia | S{ theee conrecutive gero's 7 i 2 aoa Aad} eee | a] enane orem on a ba eee [atts ittopsoe rece nant i B bebi nares, GO foiled by odd nambes of I'S 4 ending : — : 4] atone treo consecutive 6% i i 1s. Ahora ith atteant too O's w| wba “| tr] pot move than thee a's 7 _| 8. begios Lends! subsinieg ot fas _ ! Nate St, Melee a Poled=® , nye) 23 Broad a's = ge modulo five eginene with a 1 4 multiple oF five. i i Reverne, dtvrarble by S clecimal AtQ oA vise ay Ss even 90 of o's § odd ne of a's 8 3 4 1 & lol_mod 2 = 0 3 tal mod S > lol med a, bolmoda £ fal md 3 i Wt md 5 $e wen ne of aA & een ne of BS rele? mad 3 =O odd ge of 1% fottes noe) wed 5 = and nye) med 8 =O © 4% nfo) wed a =O J by een ne of O'S €ach blocs of S Contecatve Aymbelr have ableast S* Caste) = 8CS* (aux), 2) S* Carty) > KES yang) ° a & ° 8 c 5 hco a's Transition -teble 8:| Obtain a DEA to accept » -Atring oa. The DEA ts defined ae MCG, F, Q= 2Ge. bi Gah Peete Ez tabs [| %E@ fe the Atort stale 2 feah i the final stole Transttfen_chs gror _ Transition table es Sk Se Obtain a DFA to accept btnovy odd numbers Jhe DEA th degoed aS Mi (OE,S. %.F) Qs Lae Gd Zs tout KE @ HS che Atext Atel? Fried th the ginal Ata Fromsition deagran Transition table o 1 () s lofi 1 8 ee oO ¥Ry Geo Ss NoTe ¢ DEA to accept binary een number Gr ee _k8 He | we | aw YX | 2 3 @ DFA to accept af o's ond BA starts ot lease two _a'h and ending with ot leost two b's [xs tas Bs LG, Oy Oe, Sah Es ios} BER TH the Aburt Atalé Est@3 mh the final Male © & ta [G2 The sce ag AEQgA Ether stort Eth OF or end with O1 The DED th defined a8 M2( 8.5.5, ec, F) Qs L te, Gir Ba. Sy. Sy. SF ZT iow | EG TK the Abert Atal Fs Bped 1S the final stalé | Transition dsagyan | 0.1 The sek of ath Atvingh begtonigg Oh 10! ® Ghe set af att ntrtgga © The hee gy ot Ke MOE containigg "lO gs | | | i | . i conteining oF ab a substrieg | / bes The wee of ott wtriagh chet bedin wrth O1 and end with 1t. | i | | i | | ©) The 4et oF ott Abe gah begtoning with 101 She DFA is degined as Ms (9.5, 5, SF) | @: Le, Si Ga, Gad | Log r SEQ TH the abet Abate | Fe hegg te the froal dtalé { Tramition diggram Tranatt$0o tehle | ar s {oli Bf Ger Gi, Ga. Sa, Sut Le Log FE EQ i6 the start stale ae F24%3 t the final weal Transition degre Ol @% a substring i | Ghe DFA defined as G5, 8. Gee) Fine 32] (©) The sek of ath he OFA is defined ab M:(@,5,8,¢0.F) Q 1d, Gi G9, Sah Es {0,13 WER TS the Aeart sale 28> pot centaining 10 : £24 ao, Gi, Gab te the foal male ee 4 Transition diqram Transitioo table I s oO i te | % | | *% | & | te 4 “a | ta] ef _wlale | Ht HE I Coat oe a J — aS 2 s on 8-0-8 Tngormat deseniption of the Language he Language accepted by DFA ts " Stringh of 0» ond 14 hoving @ substring 00" S Proag ¢ Borin t Ty we, the mochine wil! be fo stele A which 7 ont the final stole. Shar, empty SbIQs Hh net accepted by BFA toce 76 doesnot heve substigg OO Induction tag ws hea only 1s the machine alt be Jo Mate So, w docs nok cenkain the substigg oo end hence the string 7 not accepted by DFA aio ag @ ends etth®O , He machine Goer to seal & ond: hence bsg ends with O. Buk oo J the machine enlées fate Atale A ond thus the soiqg fh net accepted Ate Tk doenmot have subsiving 00 Is W& Th 100, then the machine goes to Atole © hich Th the foal stale. hub the seiqg 160 7% accepted by the machine |DER. Since Abin hos AubstHeg 0O- Debio the DEA for the follasing languages om ZF. ta.bs é Li A ws tw) ened 62> 04 The DPA i defined as M: (@=.S. %e.F) Feanaition table G21 dor Sie Sa, Ma, SF ‘ Ee Aa bs o |e \ EQ th the Stave Atal ee | |B | F Ae$ Th the final stale ef [ee | Transition dvegraeo Ga a3 | & | | eb) ab Oy Ee ©! es | ty | oe a & |e |e Tone 14 9. babe i L_® Sek of att adhe DER the final stale \ Trangition diegran _Trannition table I | | g a | i i t = i ee | se | o | % i o> On eee : I te, | a | ee | | Saisie | — | | Sune 18. Gee _ af ali Atringh with exactly three comecutive O's. i Sune Ly - i The DEA th degined as M:(@, 5, ©, %e FD | Q: Les G Sq, Gah a Ls iong BE Q th the start stole Fels th the final Atalé Tronattion digevas Trensition table a & o 1 a | ; (y ee |e | tae so=§ spel | oH &a ey | - | ke | — | | 20 he ek of all wtvingh Auch that the number of 1'5 in even and the number of 0's th multiple of 8 The pomrble veeainders ft (wu) med =O are io. th Qt= Lhe Ay The powrble remainders fr rele) mod 320 Gre $0.1, 8} — Qa+ LBB Rah QIK R2 = 3 (RO, BO), (40,819, CAC, B3), (01,82), (8,89 , (Ar Badd che DFA can be degined oS Mz (@.5,8.G0.F) BEL CRBO, CPEB, CPOE, Car, eo), (ABD, (011 639} Ze Long Gs A (Me, BS EQ te the stork stale Fs AChe, Bek ts the final Atalé Treosttion eQraro rx (00,86) | (o.Bs) | CAL fd Cae) | (Po.8) | Gc8d (roi@s) | (60.85) | Chr 288) Gan8d | Canad | Ce tod Tene) | cana) | Gord (nba) | Cente) | @o 83) ° Me The set of atl pbriggh which «when toterpreted O4 o binary MoGg~ th o mattiple of 3. rer 6 a Zr iowyed ia outs sweat fs Oba sree 8: 6l@r1) 23 | wemeinder. | a | caer rd) med peers | He 0 eo +0) ned 8 iy | @wori mods ed es ae i Caw ts oheod 3 & | rH 7 Cori t ened 3 i & or 7 eV ered © DE Ot 1 (td4+ Died ss a San) > ee & | zd nee i { aH e 5 Sot py etree beatae L# Demign og hgtal crete Applications af Fiore Fulomalé The EA fe bed duyigd earning and checking the behavior of the digital civeail® using Agphoare Te will he uscgul fo hardware design Auch ab reurt ve scation, 29 derier of automatic. tragic gnats and 40 on Compiles construction Used fa the clenjgn of lexical analyser , which breck* the foput text tole Vertous uotls such as fdentifiers, keyserds, punctuation aad 40 09 Sting _matchrog In denigomrg a Aoptware for telentsfytqg the words, phrases ancl other potterns colketion of web pages Sting proces gg the natural leggucage- To Wsle hophsore -for proces! Lagde noturel vocabularies cao be descsthed which Pocludes the applicattons such ah Apellted checkers and advrscrs, mull - tongugee detionarieh, Foclentiog the documenta ete. # Saptwace denfen Tn _butlding the snptvare to vesyy the systems have oS Eraropte + Communicate peotcotA to _compatés netsorks | { i : i | | otl® numbec of MealGs. ; | } * Othes applications To Bybpciel Ineenrgerce and knowledge engioeevrog dn geome they aod gomes Compulés grophic’ - Eoguistcs ete, Dhodvantages ar DFA netrecting a DEA Ts dlypcult * Constructing DEA is digs # DEA can not guem about ts Input + DPA TH nok very paserful + AE any potnk of Hene, the DFA th fH only coe stale. So, 0 DPA doer not have the power to be fo several Atal’ ot ance NOnl- DETERMINISTIC FINITE AUTOMATA CrirA { NDFA) Advantages ag NFA # Very cany construct kB “non delduntaraic” front oulamelin hak the arity © Beers | something about Fb toput * A Onon- delBrornisttc” fio? automate 16 more pazecfel than DEA i ¥ TE has the pacer to be fo several Atalée at voce # Pe NPA fh an eppceent mechanikhmn © describe some complcoted | epics & F | lengaegen eanctnely Teqeos — Definition ed The Noo. delerminiktic Fine Automaton sh 5S -tuple or qutr tuple todieating five components Me (8,2, &, Go FD th the name of the machtae | | where | | S* QxKT & a 40. 8 tH transtton functoo which #4 @ moperag from @ xe to 99. Boted oo the current Atos cok | Se eee cme | WE Q th the stack tale Fo non-empty fiotte Ket of Atalés Nos 1h non-empty flat set of foput aliohabel’ tate — Sora FCO ie bet of accept ag ov fis 6 fo b ke | feo. | fret a oe |g | tet Seale |g Moves mede by NEA | ab | 0650 = Proceming of toput sequence aback Go Sm Bo Be A bo AG PH Ay COcesped) i i po al af al + od & & eo iii | i | | City El fee I Ly a & | | Caewek) Calae Geccepe) | | The input Abigg aboab th accepted by the machin I i | i | / Pt Seat eee eee eee a peenesaseti 3 i eS Proceming ef inoue Acquense ob eo 2+ % E> Ga 6 Ateuek) Be Cabot accept) The toput Sting ab th veected by the machine Extended tronhition function af NPA lat Mele, E.@e.F) be @ NEA. The extended traorrtion furclioo sti @xx at th hk ed vecummtvely ah Borie + 8 Ca, €) = Let Joe fh tn stale % ood This trcicalés that ty the machine # ead no fnput , thea the machine fH AU PO stole Be Induction Let we xa, | where a fh the Last Aymbet of eo aod x FA the vemaratag | hbsng of © Let ge th the cunent ftale and % Fh the Atrog @ be * Processed and aflée consuming the Aevigg X, let the tole of the mockoe $6 {Pr .pa. Paro 1Pnd i petttee : Fey BY (GO? EP Par Pye, Penk i Lee the trambition fom 4p), bg, Pyy---- Pend OF POPS symbol a ts | SOL P i Panter, Prod 2 © Lt a yond | re, Cela) +s Crit ag sted Then, : I REPS RNS TRIE NS S* tp a extended tran sepreaentigg the earvent Abale of & | e | tag bang seed L imi taty yk Fepreacot the pomible stal®s of the machine which th veturned by the transiten funcleo. Procersind the Ateing: ge the extended troasrtion funcGon =o y ]& accept Tatiog the prefixes of Obacb, A for_peepe ¢ : 6" (qe) * feet Fer _progic ot &* (ana) 2 &CS* (2) ,0) > § (@e,a) 2 4e0, &, F for_prefe ab = s* (ee,ab) = € ( 6*CQp,0),b) 2 € CLM. BF, b) + € (ee, 6) VU Sl bd | = tat U Lead i = 1 en Gos | For_pregit abo : S* (gabe) = £(8* Cae.cb).a) | = £ ( be, %} , a). \ = 8a.) 05 (5.0) | 2 1%. G3 Ud 5 4 G0, %d — fou peeps ahaa : S* fe aboa) : s (57 (@,0b0), 0) ° § (ia, %.5 4a) = Sl@,e) U Sl%ne) AGG} V & 4,15 cboab + S* (a, aboab) : S(S* (@,aba0),b)> & C 1% -%,5 = §(@o,b) VU 5 (@,,b) = 44 O £%28 = 1801 Gad AFlés consuming the stdag abaab , the stole of NFA? 5 otal Since the powible ptalé af AIPA har me final Atale, the String Ghoab ih accepted by the machioe. Language accepted by a NFA 1h accepted by the machine S*¥ (2) £4 FAVE. Let m2 C6, 2,5. GF) be a NEA. A Abetng © | M$ tt datgeh the torttat Avalé gy final stole Ce, Thar, the languages accepted by NFO vepresented ab Ls) can be formality enten of Lom) = fwloe=* aod S*(qo,0) is mn FS Ql. Prove Jowneity that the following NFA occepth the language Lz fo: w ends to orf ()o f (9) 9 +t} 4+ 3) accept ge Lefer © ends tr org She above NFA accepts the Lani The Motement can be proved ty mutual Foduction on the lengch | OF Meine w2 accepted by the three Abele fo three cased a: | Bleed + be for wey @ | i BSE Caged > A for emery @ Unde to O | i | 8 8¥ (an = Qe for ewry & ending to ot a 8 (eo. Hee, and hence’ (0.8) doce aot _hypothercs We need 1 a | ee tue for oe L | S&F (a8): eo. ees Et . He ? Shit ih eve becnuke on ony of the mput_aymtels o t or Ly He NER may Seay #9 ga i | i | Oh Atmume wend to O- ie, a20 apiostt He Bo, &* (@o.x)+ Yo qe Since there th a traobition fom e& & q, 00 0 Ne _conctucte thet | S* Cao.t0) = @, Aisume ua ends fa Ol whe ars ; god x19 @ Atrigg Auch that £4(Cen,x)2@, % ends ta 0. aoe Since thee th a brangrtion fom QB a On 1. We conclude that, SF (e/a) = dp ! i Nove |: Slag = 6*(Q,8) = & cree N Swe) = § CSF Cusd,a) =P; £ Cas) = 8 * (61H, w) =P eee ee eee eereeere eee eer eee = SER hoe spesbansianaseattt weachable from & } | aacSsesats DE”, Praod Ph ace te Ket | Ga. Obtain @ NFA @ accept the follosing Language 4 we abab” or abo” where nyo fF Jhe NPA fe accept abob) where MEO th M= CO,E,6, Qe FD aba? Bs 10 A. Ry. %y. Vu V5) Xs lab} {tel th the Kbark Abolé F: ft hast, tagd Tranmttien diagram Trankitien table (\* Pee : (eS) accepte ree | fa.0ui| > —& | @ | lead | tet | > oo #al oe | tes - Gal b | fost Ge! dest] & Design 0 NPA ( recagnize the followigg rk of Atriagr abc. abt cod aacd The NFA can be defined ah Mz (Q.E, 8, GF) i Ge tes Gre Wy, Ue, Vy, U5 1 Wer Sq SE, SG: Gio} Z: fo,be.dF Lael th the Stark steals a £: Lied, Lad, tout : | Trannies dragrom Frankition table po c & jo }b je i (@) @--@© occept eo Bimal ble le : % [6 Heal 1d : ee |e | © lent | = oe by p i i F Heke ent aha leotes le ~lopeele re ie pleat I 8 k | Ok. Obtein ao NEA wecepnge the following 4e€ depoed an LL fant tank, ‘ Raed F Convernion _ from NEA & DFA Practically , noo- delévmiatntic _machioes Leeover’ a NPB tn [ @ DPA, by usm) i ty Subsek construction pot Gives a NEA My L thet LCMy)= LC My) OysE Sy ie 1Fy)_tohich accaplh the oes (itu) 1 22 can find an equivalent DFA MyolO@y>, Spas, Fy) mech 284 Di 1 I STEP LS Edentity the stort Atal® of Den Since gq th the stent Adele of NFA 1g Th the Atark stole STEP B2 Tdentyy the alphabel of DEA The foput alphabels ag DFA are the tnput alphabelR oy NFA STep 3 Fdentity @y which are the Atalés 4 DFA | The net of Aubseth of A, FI! be the tales | DFA By. &, tf | har © MelGs then @. util have &” tales | STEP AE Toentipye the penal searéa of DFA | ag Les, ey, Gs A Atala ta GQ, then 181.23 GS ett i be Firat stale of DFA prided one OF Gre Wj Be Th the feel | Atala of nieA | STEP 5S 2 Idetigy the tranartona He, &, of ore | For each stale 195.85, ayS fa 8p end for each roput symbol { 1 E. the tranaitian con be obtoioed as shoon belas | SoL ego AS.) = Ss CQy,0) UY Syl 9) Doon SuCAed huh, BEA con be obtained Using subset contruction merBed, Fate Hob peat ee ore. for the following NPA Udiog AUbseE contruction i | method on | bts (eS) 0 C&G) accept s a b Ge | 40.05 | Bok 7 BL > teak Fel > ¢ STEP £2 Since gos the start stale of NEA, Teoh % the meat Meat? of Dea STEP BS The topst alphobels of NEA ave the toput alphabets ay >A | | Go, Ze ha, wg tetamnne pmratnesear ontee maeeim Se STEP At Since Sa the final Gide of NEA. + Fort {208 fe. MS, t oe: For pte fast Sp CA@Sia) = for pale tobi fp Ciesb. ed a For Mote fen. G5 ¢ Eee pee Sy Uee.%S (2) = SyClee.@Fa) Sob %.w5,b) = Edens ; Sul %o 8) UV Sy(Br8) = yl BHU SAG . dee Gd Ub 2 1&3 U3%3 | #10, SF = feo F i for Mate f%o. G03 Pere ee EEeEE) £0 U2», 208 4) Sp C4, @a5,.b) | 2 Sul 4ee,208.4) 2 Sue, @asb) | 2 Sule.) U Sylen.a) 2 Sy Cb) V Syl.) a 2 Ae QF Tb 2 ted UG | 2 1.eF 2 2G0F | _ | = es — = Su(iGu@F, a> Sp C4 Gi%98,6) = S188 5,6) » Syl@.a) DV So(@u.2) + Sy l@ib) T Ful bos 2 14:5 Ob 2} 5 FRE for EOE Lee. G 2d t Sp C fo... a5, 0) Sry € LoS ¢ Gad, BD = Syl teeoneyd 2) » O64 eb, et bd *&u(Qeb) U SQ, 5) UV * Sul.) U laa) Udy (Ay,6) 2 { Su Cab) Si eet © £28 O fest og feo, eat | Trankrtion table + Transition dtagrein jetta tet e | ¥ tee | eet | # {e012 | Kle.ot ¢ | ¥ieemied] feo.8| & dae} {eo B1¥ 420,93 | tt».23 XG, Gab | 120BF i i I = dhe complenity 40 comert @ NEA DFA th there are 9% Atalés and from each Atal ce heave the tran’ | = Since the Emre complenstyy o exponential, the procedure ky long Hire construct the table Aubbets y Evaluation Method Sus Ge. Fu) hich accept the Grven a NPA Muz (@y, _targeage U(min) ified an equivalent DEA Mp: (Q5,¥, Sp. te. Fo) Lfuch that CMp)= LOM. Identity the start Atle of DEA. the Atast tale of NPA, t%et fh Che start £ DFA Tdeotigy the alphabet of DEA Dhe_toput New: alphabett af DEA ove the foput alphabelS of Ldentify Ube transitioos (ie. Sp) of DEA i For_coch tale {%), Gp. -1 GF 10 Op and for cach topat | fymbo! a to E, the tunhition 1x82) = SulGr0) VU S.(e7.a) U. eee : 7 BAG Ge ee ~ = 181. Groeten? & On fy 1k toot elreendlt | _can be obterned ob j Sok on the input _Aymbol. a. G be repeated for cach Malé that E i : t i I i t i ' : cooper stearate, SEPA: Taentify the feral Atelés of DEA te 14, rd 8 Hale tm By and Hy coe of ar.gp.- 8% FUEd OH be the foal the ginal Aialé of NEA, then 4 ee, pel? of DED Obtain the OFA ye LORIN oe for the foil ng NFA unreg lasy rb i. @+H@ accept Tranh! on table evaluaten method Sta lo Fo | Reed | 4ee8 om |e | tes lo | ¢ STEP Li Stace gt the Atont Male of NEA, teat Th the lark éotule” o% DEA STEP 9; The Input alphabe\® of NFA axe tht fopul olphabeld of OFA. So, Zs labs STEPS 2 for Kale 4203 Sp Chetiad = fee.eF Sd CAadsb> = fend For Gtale £0, %,4 Sp C $0.8, <2 = Sy Cbee,%,4, 2) * Suleeia> U Sul.) 5 4. et Ud Fleet SoC deed.) = Sy C terete) © Sal @o1b) U Sy (@.b) Laat DV Leah = Len. 53 STEP Ht The feral Frackitiey table & a__|e ales ar tek Ares | te. => A & A feerGb | Te@k | $e @d & B c * LGorGat | 14.8.8 | Sanh *c 18 7 Trantio0 cedrany ee a2 Convert the folleaing NEA (S 1th equivalent DEA ‘I ~ Trankion toble £ o J Jb ltd S| taut | fab # ba oo 40h STEP 1: Since gy Th the stast stole of NPA, Tek 7h the Ata stale of Dee STEPH: he topul aiphabela of NEA are the Input elphabels of PEA. E:foad STEPS: For wtale tqo$ Sy CAtoF, 0) = Sy C1%0b,0) = 1 Gor BF Sp Cad 9 + Select = fed for Mole 120,35 $5 445.%.3 0) = SC 1ee.%,5 0) + Su l@o.0) OU SylOi2> 4%.%3 V 13 4%. Gad HCl Bd = Syl tee BF. 0 > Saleen) UV Sl BD = 43 U 1a) 12,1 @a3 For phate AS Sy (43,0) = Ss C1%5,09 = feet Sp 403,90 = Se AGE, = Leh 4h UO fea U 1h eee | For state 4 Pee | Sy $eiGah, 0) = Sw CFG Gad 0) Sul % 10) V Sul % 0) t@at ud 4 Gat Spl heutet, = Su C4 Pats) Sulu) UV Sul@atd | 2 {33 U 1%) | A aot [for stale 40k Sp Ciaad, 9) = SuC et.0) = > Sp (feb) = Sw Ci@abi) = f2af The DPA % given by M: CGT, 8 iF) Qs {A BC, DE FI Es toy Sp = A F= fobfentes Tramiton table ee : > “Heoeiml [Mec | seat * 26,005 Leos feat c F peseerEeee eet « * fest b Legt 8S. Obtain a NEA accept btringh of a's and bs ending with ob or ba. From this obtain an eqpivalent DEA. : ts The NEA 1% accept absingh of als ond bis endigy arth ab or be | ib & a b | () coe tn | BorGib | {ee -Rah Y & b bead | oes oelt f& | tut | ¢ : | Trannition Diggron ¥Sy, ¢ ¢ Li TFeotttion table ro : ce AtalE | STEP L: Since Qe 1 the Marte Atal’ of NFA, feoh th the Atak A | of DEA ecommerce © aad STEP A: Fhe toput alphabeli of AIPA ave the faput aiphabe® of DF x: fa,b} { So eee sees eames eOReNS | te pomey sl Sy CAGeb 8) + 4 Gor eb = Su lees b) 2 Aer eh SoC fered 1a) + Suter Gib A) Sn ( Goa) YU Sul G4) 420 +%8 US A G01 Bub Sy CAG, 218. 6) &)> + 4@e Ob U fab Les %%3 For Hate 440,25 Sp( AGe +233, 0) = Sw (tee. Rab, 2D = Selene) VU Sula) 2 A@e.%h U_2@ad = fee G1 Gut Sp (Aeeregt, bY = Su Cte sib) = Su Caeib) YU Sul%ib) a s {te, ef For_stete £0, Go. ad Sn Cheer Ga, Bhi 2) = Su Rp, Ga, Gad = Sula. e) V Sula) VU Su (sa) = for GS UP YU Lyd pee | = {or Gi Sat Sp (ie Ga. Gab 6) = Su C Fees Gas Sad 1b) a = Galenb) 0 Glib) U SCO) = teers VU UG = fra Sul $e GG, 2, 2D BulRre) YU EvlR.e> 8 Su (Qu10) = fees UO Ud = See Ge8 SCAB Bi Bl) > Syl tee. Se @ybi bd * Sul@o,b) UV Su CA rb) U Sy (@yib) LGor%b U feel Ub Ler Ga. Wl The OFA te Bren by Ms (8, E.8en. 6) @ fa.g.c. Dp, et | Es fab (we 193 i le {ipa tex} i | Transition duble pee Seer eeeeeetee EE poe oy eee He do | > tet 4ee@d | Lee %I" +A | Be | teed [teced | beacon & [ele | “tenet | fecevas| tenea > _¢ lefe | keel Leer tidal fre sh eo [etc | les G4b | hee e,3 4 Go, Gas Gyd #E ay. | ; Transition ora! Bagram a i [buch that LCMy) = LCMw? Seer tee Ty there exis | the Language LC there Te th yequreed G pave that SEC w.0)= Sle) Consider o Ate 28 where tlio S*p ged, ©) = teed by clef oy DEAL 1 a Sul tee.) = teab by dle i of NPA foo of extended Lransi bon fre Ge | Hence 8% pCa.) = S%Ce2) th proved ohn o7 & “Induction _hypetbesis 7 lee Uh ature that ee Sh Caea) = Shy (Que) for some @ ohere lel: | His wequired & pve that S* Cems) = S*ulQom) 1h tue for some © ohere tele nti Tnducbve pap: Ut wz xa chee @ fh the last symbol of © and { X th the remaining Abid yf © go, WI29 ond Ixals lols ort By Extended deportion &* of NEA, 5% (Qe) 2 8%y@e,t8) oe 2 Su ( Su" (Got) +) X {6 the Abring to be procemed ond aplis ca runt Lthe Abvigg %, lek the Malet of the machine be Pr, pps 4 1 Bf Com eds 4 pes Peis Dd [Bubsbtutige ish io previais egotion, Saif Ce) = Su CLP Hs Bs Fe Cpray U alt; fy ectanded degarton S* gy DEA, So" Ces) = Shilae ted > SoC Sp" (aa) a) % te the abing (2 be procemed and oflé conmpumring the strog t, kel Meal® oF the machine be 4 Pe pe Pad bey SC e.4) : SPB oP 85 Camed? Seta =o ( Seca) © $y C40 ep phe Sy lbp, B esa) = S00 SQA) 0 -- Sul peed By comparing beth kepoliins of NFA 4 OFA 85 Awe d= sh (fant, 0) So. SEC teat, 16 to Fy ard Sty (Laxtod 1h 10 Fu, theo bom enlera Fok Firat Ale oceepting the name language Ther, LOM = L Cm) Hence lie proog Exevctses Bl. Convect the follosing NER te teh equivalent DFA | STEP 1 Since Gy th the stark stale of NEA, Iged FA the Start Ata | °¢ Deo | STEP: She toput aiphobel? of NAA ave the roput alphebes of OM | 8, = £0.13 Stee S$: fr stake teh So( ten5,0) + Sy C1eet,0) = fe. ed So Ctedst) = Sulted id? 10,5 for stat? £203 SoCtemait.0) + Su 1e.95,0) + Sy (ee) U Syl %.0) > 1@.e@d U Fes} Mt 0 Bs Bah a 2 Bul $eorGt + SylQend U Sul.) Seeest eee Amd Y food + he God Syl bee. gua, °) Sul Hee, Sat 0) (Bey 8) © Sule 2) 2 SQ 2 fem eis 0 test od + 4G0, Gi Sad £ Sule ) 6ul%ui1) 0 oe 44 VU fet 0 f%a3 4G G35. for state £@. Gat Sp l4Qur Gt, 0) = Sal Qi reok 0) = Syl B10) 0 Su Ca) See EEE Eee Ee Ee oer Hee eee eee eer Seer fees up i | uso ee ree = i + 493 i: if SpC@riee3,1) = SwCLeu@ak I) + Sul Gi OV Eu Cad remnants tmimmnee L ¥ = 4@at v_ 125 2 Aas w 8 ° 1 fe} | feees ted 3 190%! feel | WfeoeuS | fe0%.@ol] fered O* fenead Aah tok feu} e fal Dec 1a G2. Convert the folloamg NEA DFA STEP 1: Since @y th the east AtalE of NEA, tel 1h the Atavt Atle of DPA STEP = The fopat alphabets of NEA xe the taput olphebeld oF DEA Ge, H+ fo.13 STEP B+ For Atole 1@eh Spl tect 0): Sy C4e4,0) = 1%. eS Sp eek + Su Cf eek Ad Led For tale Ate. ti $ i Spl £20, 018,0) + Su CF Be1815,0) = Sy lB) O Ey CS, 2) = fee} 0 > = heer Quid i S_l (GBS = Sw CA GoBiFi ND + Sul@.N V Sul Bel) = Led ov teas = 1 G0 Ra | fx tent tens tel Sol £%e,2al.0) = Sxl 4@e.@y5,0) = Syl %e0) U Syl 2.0) 4%, e8 0 teh = AG. G1 Sad re [Sol Ger Surat) + Sul 4G GiB) 1_F Sw (Gel) U Sulit & SC 23 10) “Ey (a8) 0 Bus &y 109 O £6%,,0) = Lee @b UF O fend = See, G1 B25 Bos U Stal U FMS eee 5 401 Raf § ° 1 [= feet | feo eb a | AGoPns | $%0,%$ eet $20 Boh {2 Sab . Ago BirGot | fee Gutab Decog Q8. Convert the folloate | en i aaa fe Ee} ea) fay lend) A z S NEA f HE egusvelent DPA UAIng subset i construction i o 1 | =p | feat | tes Soe] eeeeetedenira ceneneerees tee | __ | x ibd ’ eee eeeee Reece eee * fy | ws ‘ yiomenmcesenesea romero ee step a step as steps STEPS Sime p th the ment mole of NFA, 1 the start male > of ora XS rs Fapet alphebe ay NEA ase the Topyt alphabem of ora a So, EF: 1o.ig On: Lear ae Op: 1b. tpt, (a3, 3, 45b ped, Fpok, fp-45, Lert, AQak fresh, Ferend, Apish, Cynal, Cpe Al, Tprenads Stoce 4 th the final stale op NEA Fo: 4 £45, fpvar, tort, fal, tpasd, (er sk, tpg ss, EpiGin abt i fr ptate Sold ods b £0 (bids & Fer stale api So Cipt.o) = sy Cipt.o) = tp.ed Fp CEPR) = Sy Cephad = {ph for stale iad Sp (ied o> = Syl 4Gh.00 = Od 8 Cle) = Su Hei = OF i for state Sod SmCirh.od : SuCtss,0d= f64 4 £_ CE) = By Civit > Fo sate fat So (445.0) = Su (445,0) = AF SpCtak td = Sx CU6h 1d F3a7 Pee bile Api as BoCAipies.0d= Sy CApeGt.0) = Sapo) UO Sule) = Les U rs 2 tiers Sp Ct = SVOQPSSO = Eup. U Sule) = fpr 4 £4 (9:8) VU ECr8)_ Lpies v teh oH asso comscrenengemstterece eens ms Apgerb ule) U Bulod : 2 tet for stale Apids SoC tess SoCip rs, 0 £ SyCiprs$o> = SCP U Sula Sel tes + Sule UV Sule | For stale Loh [Sp Cte > SuCtoabi = Suleed UCD = Lb 0 LAL id For state Ags aoe SoC 1a £,0d > Eyl MGutl,o) = &u(@,0) U S40) + dah VAabe deat | SoC tes 2D 2 Su CAAbN) Sr ln) V SAD Arb VAS fest tab Sq A¥,5$,0) + Bylri0) U Syl) = Lak U Asb= Anh [eo Ctrasnd > Su CEng) « BuO) U SCH = APY UE tk for stale Lpigurh Sol 1 piger$.0) + Sul Sp-Gie$,0)= Sy Cp 10) U Sul @0) Dv &,Cr:0) s ipgsUirt 0 4ah = Ape 4h —| SoLiprgrd D+ SxCLorwed 1) = Suen) U MODY SCo2) | sipd Udrs ULol = dprt | For tale tpir at Sqtprr $0) = Sul Ep sh0) + Sulpo) V Sylx,0) V_ 8ail4.0) = {pigs U tsk O44l = tp. g.5t SoA AF AD = Su PAs ID = SCOT) U Sulr 4) V Sut) + {putt Tees Qh. Convert to a DEA the “fottow | 1 STEP 1 Stace 7h the stark stale of KIER, 4p5 th the Atast Abole of DEB STEP @ 5 The input alphabets of NFA axe the smput alphabet’ of DEA So, E= 4ous STEP 3: for heute Apf SpCApsio) + SyCips.o) = Leet So GPS = SoCiphst) © tet for Stale ip.g$ SoCtpes.e) © Sut pBb,0) SCP U SlB0) = dp.gs UG =tpad SpCpesud + Sulipgs) > guCead U SoG) > dp$ UV trb = tps for state hor} SoC Pr#$.0) = Su(1p5.0) = SulPe) U Sule) = dpgs Uipas = de-erf Sp fEprbi) = SyCfpnsi = SylpO 0 Sylead = ips U iGS + ipek apres ’ wl dpiger$.0) = SCP) VU Sul Qe) U Salva) * Lpiggd U LEU tps 4 © tpeeit ds SOAP BND = BUCA PBKED = GuCpa) Usage) U Ears) E tps Ute$ U 3q$ * temgd § o L ¢ ol. wtp} | teat | cpt Al s|A 7 . 7m ipel | teat [tert 3 B81 Bio 8 849 +@2 8 eipxt | tpa | tpad ac lo] es ‘D *“Sp-3] Aperd | dpang PLP 1? |1@5. Convert £0 a@ DEA the fotlooing NEA |e Te ale dpey | tad deh : for stare {py ios | pput alphabets of NFA are the Pnput alphebats of DFA stow So Ph.) = Sul EPS.) = SoC pied Pox inte 4 for bale pvt Sp psd.) = SwOAPes.c} Soba) = SultrAbD = Syl U SCO? awh VU Ags + ix Fox Male Leat SpLLyrt.o) = GLI.0) © Syl) USM) = Gay UL pa} et peer SOLO) = Salto be) + Sule V Sew Foc bate Lp As ae Spliperd$.o) > Sw per as 0) = BU ing sips ul p:0) U 860) U Bal *O) tees U ips 0 teed > Lprperss © SoCUP FD) = CPHL = SuCou) V Euled U Bucmad i , F Sulguc) U Gulso) U SyCA0) SpClpgarry.c) + Sul Legs ab.e) + Supe) U Sul@0) U ‘ > , > ipes U is ss U tpapu ters » tpigureat SCP b5.19 = Sud Pmeerd$ sD = Go (piy U SalQe U Sale U Saad ~ '} U ips uU is U tel Leaner Fox _seale ix Slit o) = GuleF,0) = Leiag Solin = SuGirtyy) ans for mal? Lp.qirg CPs 0+ Ev LPrgr4,0) = Gulp) U SalG0) U Sul0) 2 Legs srsg ULp-AS F Lpigeisd ee eee 2S U tps Urs: Lp-aurt SulLPBHED + Sul U GCG U Sher) = for state Lp. At oe tps At SOCPAL LOY» SulLPHO6 10D= Sylpe) U SuCS0) = 2pgd U aaa Lpiged S5 PALO > Su Capt Dd = Sup U &CAD = Les Io} teh esse esses deseeoess[etaaae Ga >! tpt isk “eet dere Ee noes : (eh teins iph : pry | deenst | deed ees Upesh Lond Koo oy Aprgiernt art EPA | Lp gees df iport Sar [ ies ie Hees | tpemos | toreet mea [eet | tee, pare }(as. Convert the following NFA to a DFA ond foformatty desc is [LC toceuage \ te ° pes ipt | i ae = 7 grep 1: Se i Mast stale of DFA ar lisipianeate=BeA SoC tP3.0) | Eup) = Leet Soph D = Sw(tph) + Supe) = {ph _for_stole devish Solip ato) = SultprGbeo) = Uprts tsk So Cpreb = Su Crretid > SoCpn) U Sule = tpbuits sip td i fer tate tpt i tt Sp C Lpts.o)= Sul tPtho)> Sul pO U Eultio): Legs U 4 = prod “eoCapthad = Sulapth) = SulPWU HG iphUd-iph (ESSSASERa passer for _ptatt Apert At f Bo Cop rerest 0)» SulEprerrssb.0)* Gyulpre) U Sul@o) U Sul fpaeeeceat Se ped UIAFViprsUS i——+ a Ee So (APG Ab!) = Sul Epes Abd) = SoCpa) U SwCQa!) U Sabre!) U SCO + ipsu iss uuesud 2 ipit} Hee & | 0 1 : hed [iret oe} ie a ipod [tears [tots 2 0) 90} *{pak | ipes | ted ° a T BAT Hiprll pens | ip G Because: gs of OF SBA eth subAEIAES G1 oF 00. 7. Convert the fotlasing NFA to DFA L Jeo [fe * STEP 1: SIN Bl tA the Abort Male of NEA, t@e5 the weak Stale of Dre STEP @ 1 The mput olphobet» of NFA Oe the fopue aiphabsts of DFA. S%=t01! STEP St fow wtole Lech Sp Ciexk.o) « Sullacg ©) > Les Sp (heot = Saheb itd = fee tib eat Sp teeB5.0) + Sw (140,23 10) + EvlOe.) U Sul G0) = 1ee3 U teak + torGah So Gee bi * SA Gere I = Sesleetd U Sul@etd = Leer Gi$ V iBab § tee rtere Cee ost Sd Cee, Gal 0 = SNL 122, ta$i) > Sule) U Sylese) = Leas Ub = eof Em Ceeghit) + Se CAeerSats) = Sulot)U SulOatd > tee,es U toad $20,B. 2 fox Ma i for sto Lge, Gr. Gah Sp (1,1, Dat O) = Su(L Wii Sab 0) = Sule) U Syl%.d) 0 Sx Sy) 1% U teat US » 20, @ai # SpAGi Su Whit) + Sulla Bui) = SyCeo.) U SwlBeal) UV Sula * tees Uieas U > * bee Gi, Gab 6 ° 1 eed tees Iwo tah * Lech Lees FAG ah] fQo.ceah | exeeanent NO. Sx Ge) 81 Ges b> OS. Give Non - deléiatnrstic fs @ Cutest to oaapt We pollaaing ots 10,4% (0) The set of aU Atringh Auch that cantainieg thy 101 oF abating 08 10 as dhe NIA ih defined ob M> (@,5,6. ec:F) chow O24 Ge, Si, Sa, Se. Se Bs Set Ze iow Soe @ Th the start Mate FS ee, ee} Ore the finek Atotés Transition tabte § o [t —+4eob | ios | Leeed ~ eh [es | a “et |e [tea Hs} Aesh} teal {euyh e | ies} tes | tea] 42h | awa] 4ey (©) The pet of all stragh Such thak every 1 ih folloed The NEA i depined ab M2(@,5,6, GF) where Os 4 er Bu Sw, Sh Es tots SEQ ih the tent Mle tenme datety by ' FEL Gab th the final Atal Tranenion Diagram Transition table cy s_|o ‘ OO WHO mes [rea [428 ; Ah | 42h $ teh | Seah | eh > 4@f | Sxrement No. obs ‘ cg ne ot ae aaa oe gest eee 7 Trento Diagram Be : se peor reo} Avs 4 | ie} [toned [Bal ¥ieay |? _ Qi. Devign NPA TA te recggnise the olioareg nek oy AbtQgA S to DeATA. eee |____convect @) Job, cab and deb , mune the alphabet th tape. AF “ay Hoty tol & 111 Puaeme the atebebet “ho. ee { | i | 1 @ she Q x: WER Fr1 ty. geiey 3 are ne L wie, depoed as WAC Oe a. 05. ry Ss Be He. G5} dayec.d tb Ph the Ateve Atale the -firal states 0-8 + O-@ NY STEP L SIP as STEP 3 b @O--@+© Sioce Get the saw Mali of NED, SPE Spal alphabet of Kiem dee the $9, D2 tabed Lf For stale 3¢04 Soliws.a) = Sy Bebe) > & Sd (4h. bd = Sultat.b) = > Solieticd = Sultedic) = eas Sd Wedd) = Sul teh.d) > 2eaf SOURED = KuCdet 1) = te Pr beate 1a05 Sr(twt.e) + 2¢a8 SDR.) + ¢ Sp(iwek.c) = ¢ Solied.d) > + Sle. = > for Mate dead Spl*eat a) > > Sp (ia, b) = {aah So ltasic) 2 Splitas.d) = > Hibs sfefsfe lal. heed | & | gb frag © 10) Fae @ |e fea] @ |tes] ¢ Hey | ob e| ¢ te} fiest| | @ fest] o | aeal Merle | el ¢ fe} [feey[ OS ‘ezy| & [asl ¢ ‘eal ae lal a ¢ is tes tS the Kewl Atats F De foput alphabets of DEA The OFA ws defined ob MES. ee.) a: Es iabed A EO th the Atosk Male E> Les th the proat stale” NEB for mate Land Sol LGa$ 0) = Su Regia: Sib.) = Ss Heob 0 § teat for Abate 1%s,.Ga} | § (25 5.0) = Gy Ci5.S5F.0) = Su sh. VU Su liegh 0) 12h UG 2 Leet SS Ces.e5h.) Suliest.I U Sy Gest ,1) bU 1G > 2% Sp (15 ,%g 5 1) for sale 23} Fronhttion Dtqgvor Sp (2@at.0) = Syl Zeags,o) = b % (atid = Sas.de 89) 2§ a) + © for scale itet Sm (Leeh0) = Sy(2%et,0) 2 db fp (REND © Sy C26, = 2 Rah Fes atate Laof £5 (Leh) = Sau (teied,o) © b Sp Heb) = Su (ep D> GF ESY fr state Bal Sp liaat,o + &uCIergo)= > % Uses) = So Cies.0 = ¢ § ° 1 > eo} 2 2S, SuteS a 1 ieee} | Yeah esta} Sy Se ser |e fies Fel : ted Fegh {rah % feat eise} | ted <3 | “ Bes ¢ tes | feah | teak * tea} ¢ FLGuh © & —__#b0t_ | o

You might also like