You are on page 1of 6
ha: Finite State Machines Debatnens A String Gn Sequence of characters of gyubels, A Finite Stale machine CSM) is a device which recomnses a allecton of Stings. Te bas three compontnts : 1 An tnpat tape , whicn contains a Sole Strrg 2 BR Genser, which reads Ye mput Stuy one Gymbol at a bine. 3, Memory , which stores tu Corea stale of [he wachne, The progam of FSm determines how be cyubols affect be cornnt State, The Pal state for a Stmg 18 De shte Ue mechs Ws when Ie halts Ghepe > operate a FSM Sek Dre moching te tle wibual Shrte TE kW end of be Gtrg ben step Reod a symbol Change te Siete According b be Sypibel read Exongle of a FSm Oe yale s x ae ese & ‘Shen ae oak Delemne he Fant Grate: Vion 2 fed = Thee states A,B, Src A 0001 7 fine\ Corder tts behowor when te mpat Sing iS 101001 Ste Gorret Crate Symtad Read New Stabe = Foal Stale Example \nhat is te fined Sate for: = tapat = orveyitio — —> fra! hate B a wapat = — Pwd Sine C 10000000 -wapet = \VOoVI > fin) Grate B Gone Stakes art designated os accept ctaes amd te remandor art resect States, Yefe: —— fe FEMA occepts Te mpat gtrag if te Cid Stale ik om accept Crate, otc regects De tapet . Ba acces! She 1S inhented by 9 dowd Gare he dungrom, Dos ie FEM acpi: Iitoo 2 fia) Shae ©. Mes. Cl0ce0 ? Fadl State C. Mes. \ioo 2 Pinal Cmte A. No. Oloio 7? fim Sate AL No. Ta words what Cheng does tris FSM accept? . rs O AN Stengs with an odd vomby of ons, Te tgvorts Zeros Since We does wot chaye Stake with «290 Example Ta words , whot Grins does hs Fm accept? Pn eum nmbur of of of VS or an cmpy Siny, Builds Fons Dea: ~The Vanguage of a FSM ic te set of Steings tk accepts. = Tre alprobet of a lamuge or FSM is be set of all allowed sya, = TW lengthy of o Gent As he number of Syuabats wk = The empty Stren Wns length O + 1b 1S & Sony without Symbols and Ceased €. ° "9 * A trop ic a state whch, ore extercd it cannot be left. Fant best at 10007 Final Stale C. Yes Jotoioo? = fral Gate C - Mec. 10012 Final Stale A. No. Exange Ruld an FSM which accepts all bmary Stunts which begin and tnd with Me Same bt. 1S ° tat Voro1o) 2 fxd ghee. ono 2 sft, % Noo 7 finwl chete Db, Exanple Grcract 0 FSA Haat accepts binary Stings wills attenahiy, VS and Of only, tat Noyovor ? Sond ae ) % Vooicr 2 fad ote F Chyet FSM Coontinved ) eee. Regetar Exprescins = Woed to describe the languape of a FEW Srplals Mena > dig st € omghy Strom v OF operation O brrctels for grouping * ew of mort Cops Exam aes ovi => 0,1 (ovi)o => © ,10 Covi)love) *> 0,0 10,1 oy Kove), af => €,4 aa aaa aaa, Course => all possi binary Staras (ors D> €, 01, 010%, O10), -.. Qrter of Precedence hagrest * — recs We Oe smallese park Poscrble Cucatenations \omest v — velees te Oe largest posable art Example: He a Female expression of a Vani of binary Stn ad lenge atleast Ot degen we wa te saw wy a QvdJo vA ve coy oovdov youd v —_ Exomple: Wate a regular expression for @ collection of bine — Yolk tnd itr an even nen-2tro nw mice oh be (ovif (=f'00 Gui de veqalar Cyprecsion of tu lengupe accep bo tris Fw (ovi*00 Cov iy —______>

You might also like