Download as pdf
Download as pdf
You are on page 1of 13
Week 2: Lecture Notes Non- deterministic Ruite Automata Laea) A 5-tuple (8,2, 6,40, F) Os @ finite set of states EZ: @ finite input alphabet & 6: AxZ > 2°; the transition junchon (power set of & i.e. set of all subset of 8) 4, € & : the initial state € Qi the set of Final [accepting states Smee Transition Table Start “god a, | tng tt nt Transi ton ee. ite} degen na, | iad 84 ie it,} 7 a4, tt} ta] Difference between DFA and NFA Notes > transition junction returns Cr Single state for DEA @ set of states tor NEA The extencleal transi Hon junction a BS: B22 > 2: transition erection jor NEA 8: Ox5" > 2", extended transiton gunction jor NEA, 4Jormally dened as Joliows: ® 6 lye- 4 GW Leb we ma, ae a", 0th tet 6 (a) = f bobs --s Ped k let U Slpirale frst, rtm} Cs) Then w 8 (84,0, 0) : § (f Po pases Pr J, a) G 5 lina) te 5 (4,6) ° fiom ted he. To compute & Lao) where we ma, we First compute é (4,%) 1 fvoy £2, 2,4 poy iu} th} mS eye 4G) + + The above NFA ocepts all binery stings which has second lest symboo} as i ° 1, has no transition end hence it dies 8 (o1010) = 2 $ (4, €) « to} $ (40+ Sted B (tos $lftes,1)+ ft, 3 $ (4s, ore): $ ( £40, ad, 0) = 54,0) v $l%0) + fu} v fa,j + {%, 23 £ Uae, ovr) = $ L1ma3,9)- 5 (40,1) UV & (4451) 2 fa upue + $e, 03 $ (4s, ororo)= & (ft tt o)= ft} § o, 010101) § ( £4, 443, Je {0,4 it Do tes The language of an NFA NGA: At (82,8.4 6) L)+ fol Blanes +5 — longuage occepted by NFA A. C omputation Tree Consider the NPA acephng o has 1 in its seconcl lest positon Que —>-)— We OOO binary strings which 2 ' ° ' ° 49—>— 1, 1, 15-12 bv: een ranchi "4, — 4, Ne 4, Ty stuct accept dies, nalts.vejects rane’ « Non- determini om + guess and verify = make as mon uess ap it likes but it must chech them + is accepted by NEA : computotion tree has one accepting State + 1 ‘ejecked by NFA: every branch of the computation tree must reject input: oto0} acte pted ov not 2 (Ae) SS cal a ranch & ) ©), Puck) ree lorane lh dies, yeyects, dies, rejeets ee raja > halts ) ®) accept orerch Building NEA ° TL is easier compared to building o bFA Emample: NFA accepting all bmary strings that end with pattern lol stort 2D Enomple e oF . Exomple peo Den LO4@ & Oot a4 ( ro My O09, + MMI? » 4,4, ; a fe: strings thet contain eto 00 ov The equivalence of DPA's and NPA'S * DEA can be treated as NFA ° language of an NFA isalsoa language of same DFA ~it. NPA oceepts only regular lonquages - he. Sov every NPA, we can construct an equivalent DEA [accepting the same long uage) Subsel Construction Given NCA Als ( Ox, 2, Suh Ve, Fe) design a DEA d: (By, 5, Sp £903, Fy) such that tly): LO) * input alphabet of Nib ave the same (2) * stovt stote of b is the singleton sek consisting of stant state of Nn ° Bye 2h ie. if N has n stetes, D has a States -We may how oye away states that are not accessible fromthe inital state {404 of b: Ay c 25 *& > jf sex | sah ¢ 43 te. all sets of N's states that include at least one accepting state of N Sy (50) + ¥. By (ha) te SE By SE Op Erample (Conversion from NEA to pea) at 2 OK om SP oS On, NEA: Equivalent. DPA ~ consider stotes thet ave teachable from inital state ie. sulosets of 280 containing A 1 — fas fared ta, 0} {A, 8,63 pare} fare} {Ao} 1A, Cd} * fa, 8, d% tA,8, 3 tA.c, BY *{Aed} {A 2, BY Lae dj} Eaemple (NPA to DEA conversion ) é f 7 © Wo nea: No (Bus Zs Bus tor fre a3) pears D& (O, 22, F, Sy» {to} > fr 6B.) contains 4, by {403 {4.3 tt, a5 {4, wt 4, 43) Lor br MG $4. 43 id it, uh $40,454 ft, 3 £4.04 Theovem: T# bs (Op, 5, 55, 003, Fs) is the DEA constructed trem the NEA WI: (By, Brac Subset construction, then Pave! We prove by induction on lwl thal 4 A claim + 65 (f4,3,0) + Sn (tow) jor we s* 4, Ey) by the Llp): LUN) Note that subset constuction gives foe fse8s| sotve af when 8, ¢ 26h a Also § weturns o set of states from Bn by / Sn @ single state 0 set of states of Bp from Oy dD accepts wo Ht §, (F450) 6 — By (tt, 0) by + $ +N accepts ao tf Sy (4) A ty st = Llp)= LW) Pro? of claim (vy induction on lao! ) 85 [tas3,a0) © 8 (4,0) — lwle O fe. we & By (ied, )- £40} g. (% es 4% Induction: we ma, lwl_ nat, lalen wine 5”, a6 by induction hey pethe as Bp liselaje oe. btred tr pao Ped (Sey) Then, 3 = : 4, LM Sy le. de Sy (te, 28) o 4 Ubi 2) 7 Also, A A S (03, w)e Sy ( £403, 20) = 85 (3s £44,3,), 0) (by gePrtion of By) : 8p (Epo hs. + Pe3s@) Uby induction hy pothesis) ° o bn es a ey te (2) G) ond 1) esteblishes thot our claim is true jer w where lwl: w+) whenever it is true for A with \alen It also Weld for |wl-o Hence by induction , the claim jollows- Theorem: A language L is accepted by pea iff L is accepted by some NPA Proof L accepted by NEA => L is accepted by o DEA using Subset construction (oy using previous neorem) L accepted by a BPA b+ (8 Z, Sy> com be interpreted ab an NPA Ns (8. 2, bys , F) 4, &) where $y is dened toy by (ae)s ftp} # Solaade 4] This NFA accepts ba Notes ee see et ee n states D stotes Hhrow away states thet ave not veachalle jrom the inital state x x mn states. Tey! Re alex “a, Bivauea 33845 Buyrales, pasar * R ydan0 Bios cel te Ay we tesp so ayeys vydar0e Sb woe 27 gh ‘ aziq ‘720 4a) a amas taf tq #10 G HQ -- tate ¢ Ho -- tole o apeP s1 ajoy uarbad eo ruayduan sy yr varbad ue wou, arom sey WoL oy worbod eua 769] qe 2A ZEN Hoy, way “ajay uasbad amas am saul uarbad yp~e puo ajay uaobid ueyp suaibed sro aney nah fe wb ad oud ajou uarbid ay mart s enayjol SMyL tha Fa Hq, prs “eo --to'e hes 6319 -u §2 v2u0nbes quenegy ep burpess 4jy0 b oq0is Wy 2q woo q ‘ esienremig FHF FP anou jouwen (v1 burzyoon I vad yWajjous - PT LE WA TO sey wanrnaysue? zaQsqne Rusa vdq quejenmbs . Sopers jeu Burney . < ‘ a @ vo O Vo s® vo OL V0 sete Bure qoos van aL [ -we+a) ies St pus mae maak [eas ay-w usen Cua} 9 ovf ew} = (v7 vajdweowg iP Lyd then consider state pb that DB enters oPter teading c-1 0's 1 accepting state as ot Ora On 00+-.0 lf is accepted by D Simul Langously absurd ! rejecting state as ji bin-- by O+--O is rejected by DB Dead state Ldea) A non- accephng state that goes te itsel? on every possible input symbol €. nample: mt, O+-O©> ©+-O2@ Subset construct on dead. BX bo ne < set) Gy 43) (a) (5) Non determinism added to FA * doesnot expand the class of longuage> that can ocepted by FA * easier to design than NLA * can always convert AFA to BFA (dea may have exponentially more states tran NFA, fortunately Such cases ave yore)

You might also like