Notes on Finite Automata Department of Computer Science Professor Goldberg Textbooks: Introduction to the Theory of Computation by Michael Sipser

Size: px
Start display at page:

Download "Notes on Finite Automata Department of Computer Science Professor Goldberg Textbooks: Introduction to the Theory of Computation by Michael Sipser"

Transcription

1 Nots on Finit Automt Dprtmnt of Computr Scinc Profssor Goldrg Txtooks: Introduction to th Thory of Computtion y Michl Sipsr Elmnts of th Thory of Computtion y H. Lwis nd C. Ppdimitriou Ths nots contin th mtril from Thory of Finit Automt which you nd to know in ordr to tk th cours in Computility nd Complxity. Try to solv ll prolms. If you qustions rltd to th mtril prsntd or th prolms, pls snd m n -mil mssg (goldrgcs.rpi.du). 1

2 1 Finit Automt Trminology: dtrministic (non-dtrministic) finit utomt; input tp; finit control; rding hd; initil stt; finl stts; lngug ccptd y n utomton; Configurtion of n utomton; stt digrm; nondtrministic finit utomton A dtrministic finit utomton is 5-tupl M = (Q, Σ, δ, q 0, F) whr Q finit st of stts Σ n lpht q 0 Q th initil (strt) stt F Q th st of finl (ccpt) stts δ th trnsition function δ : Q Σ Q. S P F Q A configurtion of finit utomton (Q, Σ, δ, q 0, F) is n lmnt of Q Σ. Th currnt configurtion of n utomton is pir {th currnt stt} {th unrd prt of th tp} A configurtion (q, w) yilds in on stp configurtion (q, w ) if thr is σ Σ such tht w = σw nd δ(q, σ) = q. W writ (q, w) M (q, w ). M is th rflxiv, trnsitiv closur of M ; A string w Σ is ccptd y M iff q F such tht (s, w) M (q, ). L(M), th lngug ccptd y M, is th st of ll strings in Σ ccptd y M 2

3 Prolm 1 Dsign n utomton A = (Q, Σ, δ, q 0, F) whr Σ = {, } such tht () L(A) = {w : w is vn}; () L(A) = {w : w is odd}. Prolm 2 Spcify condition which would gurnt tht for dtrministic utomton A, () L(A) = Σ ; () L(A) =? Prolm 3 Dsign n utomton A = (Q, Σ, δ, q 0, F) with Σ = {, } such tht 1. L(A) = {w : w nd w r vn} 2. L(A) = {w : w nd w r odd} 3. L(A) = {w : w is vn nd w odd} Prolm 4 Dsign n utomton A = (Q, Σ, δ, q 0, F) whr Σ = {,, c} for which L(A) consists of ll words w in Σ such tht 1. ithr w gins with c or it contins 2. vry is immditly followd y c. Prolm 5 Dsign n utomton A = (Q, Σ, δ, q 0, F) whr Σ = {, } for which L(A) consists of ll words w in Σ tht 1. contin ; 2. contin two conscutiv s; 3. do not contin two conscutiv s; 4. hv oth nd ; 3

4 Prolm 6 Lt Σ = {0, 1, 2,..., 9} nd L th st of ll strings w in Σ such tht th numr w is divisil y Drw fiv-stt DFA which ccpts L; 2. Drw two-stt DFA which ccpts L. Prolm 7 Lt Σ = {0, 1, 2,..., 9}. Drw DFA which ccpts first 3 (5) prim numrs. 4

5 2 Non-dtrministic finit utomt A non-dtrministic finit utomton is 5-tupl M = (Q, Σ, δ, q 0, F) whr Q finit st of stts Σ n lpht q 0 Q th initil stt F Q st of finl stts δ th trnsition function, δ : Q {Σ ǫ} P(Q). (ǫ is th mpty string; P(Q) is th st of ll susts of Q.) A configurtion of finit utomton (Q, Σ, δ, q 0, F) is n lmnt of Q Σ. A configurtion (q, w) yilds in on stp configurtion (q, w ) if thr is u Σ such tht: w = uw nd q δ(q, u). (q, w) M (q, w ) M is th rflxiv, trnsitiv closur of M. G c H S P Q F c A string w Σ is ccptd y M if thr is pth lld w from th initil stt q 0 to finl stt; q F such tht (q 0, w) M (q, ). L(M) = {w : w is ccptd y M}. Prolm 8 Which of th following strings r ccptd y ths non-dtrministic finit utomt?,,,, (NDFA 1);,,,, (NDFA 2); 00, 01001, 10010, 000, 0000 (NDFA 3). 5

6 NDFA 1 NDFA 2 NDFA 3 Find strings diffrnt from th ov which r ccptd (not ccptd) y th corrsponding utomt. Prolm 9 Drw stt digrms for non-dtrministic finit utomt ccpting ths lngugs: () () () ; () (( ) ) ; (c) (( ) ) ; (d) ( ) ( ). Prolm 10 Which of th following strings r ccptd y nondtrministic finit utomt: ; ; ; ;? ε ε 6

7 3 Equivlnc of dtrministic nd non-dtrministic utomt. Dfinition 1 Two utomt r quivlnt if thy ccpt th sm lngug (functionl idntity). Givn n NDFA, w construct n quivlnt DFA using two-stp trnsformtion: Stp 1: construct n quivlnt NDFA without trnsitions of lngth > 1; S D A C E B Stp 2: givn n NDFA((Q, Σ, δ, q 0, F) without trnsitions of lngth > 1, construct n quivlnt DFA. S W us th following nottion: E(q) = {p Q : (q, ) M (p, )}. E(q) : is th st of ll stts tht cn rchd from q without ny input; Dfin n quivlnt DFA(Q d, Σ, δ, Q 0, F d ) s follows: Q d : th st P(Q) of ll susts of Q; if Q = {q 0, p, q, r,...}, thn Q d = {, {q 0 }, {q 0, p}, {q 0, q}, {q 0, r},......} A C E B F d δ : th sust of P(Q) comprisd of ll susts of Q tht intrsct with F givn stt Q of M nd n input, δ mps Q into T = δ(q, ) of ll p Q d such tht thr is pth from q Q to p with th first stp ing nd ll othr stps ing th mpty strings Q 0 : th initil stt of M ; Q 0 = E(q 0 ). Thorm 1 M is quivlnt to M. 7

8 Proof. (sktch) Our gol is to prov tht (q 0, w) M (f, ) for som f F iff (E(q 0 ), w) M (R f, ) for som st R f Q contining f. By induction on w, w prov tht for ny string w Σ nd two stts p nd q in Q, (p, w) M (q, ) iff (E(p), w) M (K, ), ( ) for som st K Q contining q. Hving provd (*), pply it for p = q 0 nd q = f F. Th prt to th lft of iff would mn tht w is ccptd y M, nd th prt to th right of iff would mn tht w is ccptd y M. Prolm 11 Complt th proof of Thorm 7.5. Exmpl: p, q 0 f q Stts: {ø; {q 0 }, {p}, {q}, {f}, {q 0, p}, {q 0, q}, {q 0, f}, {p, q}, {p, f}, {q, f}, {q 0, p, q}, {q 0, p, f}, {q 0, q, f}, {p, q, f}, {q 0, p, q, f}}. Initil stt: {q 0, p, q, f} (ll stts tht r rchl from q 0 using ǫ-pths.) Finl stts: {f, {q 0, f}, {p, f}, {q, f}, {q 0, p, f}, {q 0, q, f}, {p, q, f}, {q 0, p, q, f}. 8

9 Prolm 12 Enumrt th stts of th dtrministic utomton from th xmpl nd construct th trnsition tl. Minimiztion. Th construction of Thorm 7.5 crts 2 n stts of th quivlnt DFA, whr n is th numr of stts of th initil NDFA. Somtims w cn rduc th numr of stts of th output DFA. Id 1: us th stts of DFA tht cn rchd from E(s). Prolm 13 Prov tht If M is otind from n utomton M y rmoving unrchl stts, thn L(M) = L(M ). Wht hppns if th improvd construction is pplid to dtrministic finit utomton? Id 2: try to find quivlnt stts nd rplc quivlnt stts with on rprsnttiv. Dfinition 2 Lt M = (Q, Σ, δ, q 0, F) DFA with ll stts rchl from q 0. For vry stt q, introduc n utomton M q = (Q, Σ, δ, q, F). Two stts p, q Q r clld k-distinguishl if thr is string w of lngth k which is ccptd y on of M p or M q ut not th othr. Othrwis thy r clld k-indistinguishl. Two stts r clld quivlnt if thy r k-indistinguishl for vry k. Prolm 14 Lt L = L(M) for som DFA with n stts, nd lt M hv two quivlnt stts. Is it possil to construct nw DFA with fwr thn n stts which ccpts th sm lngug? Exmpl: s s S 1;3 2;4 9

10 A rcursiv dfinition of quivlnt stts: 1. two stts x nd y r clld R 0 quivlnt iff thy r oth finl or oth non-finl 2. stts x nd y r R i+1 -quivlnt iff σ Σ ǫ, δ(σ, x) nd δ(σ, y) r R i -quivlnt; Procdur Contrction (M; M c ) /* Givn n utomton M, th procdur constructs nw utomton M c */ 1. construct squnc R i of quivlnc rltions; 2. lt R # th R i for which R i = R i+1 ; 3. th stts of M c r th quivlnc clsss of R # 4. th finl stts r th clsss of R # composd of th finl stts of M; 5. th initil stt is th clss of R # contining th initil stt of M; 6. for vry stt Q of M c nd vry δ Σ, δ c (Q, σ) is th clss of R # which contins δ(q, σ), whr q Q /* (th choic of q in Q is irrlvnt du to th proprtis of R # ; 10

11 4 Proprtis of th lngugs ccptd y finit utomt. Lt F dnot th st of lngugs tht r ccptd y finit utomt. Thorm 2 F is closd undr union; conctntion; Kln str; complmnt; nd intrsction. Proof. W nd to prov tht if L 1, L 2 F, thn () L 1 L 2 F; () L 1 L 2 F; (c) L 1 F; (d) Σ L F; () L 1 L 2 F. Thus for ch lttr, w r givn two or on input lngug known to in clss F, nd w nd to construct n utomton, dtrministic or nondtrministic, which ccpts th corrsponding output lngug. For ch cs, w provid simpl digrm which illustrts th corrsponding construction. Kln str: If NDFA M ccpts lngug L, construct nw NDFA to ccpt L s follows: in copy of M introduc mpty trnsitions from ny stt to th initil stt q 0 ; dd nw stt q0 nw nd ssign it to th nw initil stt; introduc th mpty trnsition (q0 nw, q 0 ). q nw 0 q 0 Union: Lt M 1 ccpt L 1 nd M 2 ccpt L 2. Th nw NDFA M contins ll stts from M 1 nd M 2 ; ll trnsitions in M 1 nd M 2 r prsrvd; th finl stts of M is th union of tht in M 1 nd M 2 ; on ddition stt q0 nw is introducd which is st to th nw initil stt; two mpty trnsition r ddd (q0 nw, q 01 ) nd (q0 nw, q 02 ), whr q 01 (rsp. q 01 ) is th initil stt in M 1 (rsp. M 2 ). 11 ε ε ε

12 q1 0 ε nw q 0 ε q2 0 Conctntion: Similr to th ov. q1 0 ε nw q 0 ε q2 0 Complmnt: Lt NDFA M ccpt L. Thn construct n quivlnt DFA M ; tk copy M of M ; vry stt which is finl (rsp. non-finl) in M mk non-finl (rsp. finl) in M. Intrsction: Us d-morgns idntitis to prsnt th intrsction through th oprtions of th union nd complmnt. 12

13 5 Rgulr Exprssions nd Finit Automt Prolm 15 Prov tht th following rgulr xprssion dscris th lngug ccptd y th utomton low. (() (c) ) Thorm 3 A lngug is rgulr iff it is ccptd y finit utomt: F = R. Proof. (only if: R F) By dfinition, R is th collction of lngugs tht cn otind y pplying th oprtions union, conctntion, nd Kln str to th mpty st nd th singltons {σ : σ Σ}. Sinc th mpty st nd th singltons r ccptd y finit utomt, (s thorm 7.11) w hv R F. (if: F R). Lt L F nd lt M = (Q, Σ, δ, q 0, F) dtrministic finit utomton ccpting L. If Q = {q 0, q 1, q 2,..., q n }, thn lt L(i, j, k) dnot th st of strings ovr Σ tht gin with q i ; nd with q j ; nd do not pss through ny stt q l whr l k. Clim 1: Th lngug ccptd y th utomton is givn y L = qj FL(0, j, n + 1). Clim 2: i, j, k, L(i, j, k) is rgulr. W us mthmticl induction on k to prov tht vry R(i, j, k) is rgulr lngug. Bs: For ll i nd j, L(i, j, 1) is rgulr cus it is th union of on-lttr lngugs. Induction Stp: Evry pth from q i to q j which psss through q k hs n initil intrvl from q i to q k without intrmdit q k, thn this pth my 13

14 rpt fw loops from q k to q k, ch without intrmdit q k, nd finlly, nd up with n intrvl from q k to q j, without intrmdit q k. L(k,k,k-1) L(i,k,k-1) k L(k,j,k-1) i j Thus, for k 1, w hv th following idntity L(i, j, k) = L(i, k, k 1) L(k, k, k 1)L(k, k, k 1) L(k, j, k 1). Th rst of th proof is strightforwrd: sinc y induction hypothsis, L(i, k, k 1), L(k, k, k 1),, nd L(k 1, j, k 1) r rgulr, thn y Thorm 7.11, L(i, j, k) dscris rgulr lngug s wll. In prticulr, L(M) is rgulr. Prolm 16 Convrt th following NFA into n quivlnt DFA. S A B Prolm 17 Prov tht ny dtrministic utomton which ccpts th lngug L = ( ) contins > 4 stts. 14

15 Prolm 18 Tru of fls? Explin. Th lpht Σ is fixd for ll css. () Evry sust of rgulr lngug is rgulr. () Evry rgulr lngug hs propr sust which is lso rgulr. (c) If L is rgulr, thn so is M = {xy : x L nd y L}. (d) L = {w : w = w R } is rgulr lngug. () Th union of rgulr lngugs is rgulr. (f) L = {uvu R : u, v Σ } is rgulr. Prolm 19 A nondtrministic finit utomton is clld simpl if th lngth of vry trnsition is t most 1. Construct simpl finit nondtrministic utomt tht ccpt th following lngugs: () ( ) ; () (( ) ( c) ) ; (c) (() (c) ); (d) ((( c)( c c)) c 2 ). Prolm 20 Apply th construction of th thorm 8.2 to otin rgulr xprssions for th lngugs ccptd y th following utomt:, 15

16 6 Non-rgulr lngugs. Not vry lngug is rgulr. This clim cn sily provd y compring th crdinlity of th st of ll lngugs in givn lpht nd th st of rgulr xprssions. Th st of ll lngugs is uncountl whil th st of ll rgulr xprssions is countl. Howvr, proving tht prticulr lngug is non-rgulr is usully don with th hlp of pumping lmm which stlishs proprty of vry rgulr lngug. Hnc, if som lngug L dos not hv this proprty, tht lngug is not rgulr. Thr svrl vrsions of th pumping lmm. Pumping lmm: (Th simplst form). Lt L n infinit rgulr lngug. Thn thr r strings x, y, nd z, such tht xy n z L for vry nonngtiv intgr n. Pumping lmm (strongr form): If L is rgulr lngug, thn thr is numr p > 0 such tht for vry w L with w p, thr xists splitting of w into thr prts, w = xyz, such tht 1. xy p; 2. y > 0; nd 3. for vry intgr i 0, string xy i z L. Proof. M. If w L(M) nd w Q, Sinc L is rgulr, thr is n utomton M = (Q, Σ, δ, q 0, F) with L(M) = L. If p is th numr of stts in M, ny string w of lngth p ccptd y M must pss twic through t lst on stt. Thus, w cn split w into thr prts: 1. x th prfix of w which lls th pth from s till th th stt q which is th first to visitd twic; 2. y th sustring of w which lls th smllst cycl contining q; 3. z th rst of w, from p to f. 16

17 y x p q 0 z f On cn sily s tht th lngth of xy dos not xcd p = Q nd pumping y ny numr of tims, in prticulr, rmovl of y from w yilds string ccptd y th utomton. This complts th proof of th lmm. Commnts 1. Th lmm dos not giv ny indiction s of how xctly string w cn split, xcpt for th ounds on th lngths of xy nd y. 2. Th proprty tht th lmm gurnts must hold for vry string w L, if w p. 3. Th lmm is usully usd to prov tht crtin lngug is not rgulr. Th ojctiv of th proof is to find string w 0 for which ny pumping crts strings tht r not in L. If w cn find t lst on such string, w conclud tht th lngug is not rgulr. 4. From th xmpls low, you cn s tht w cn find such strings nd prov tht pumping crts strings not in L vn though w do not know much out th splitting of w into xyz. Prolm 21 Two initil qustions to clrify th undrstnding of th pumping lmm. 1. Is it importnt tht L is infinit? 2. Is it importnt tht y ǫ? 17

18 Exmpls of using th Pumping Lmm. Prov tht th following lngugs r not rgulr: () L = { n n : n 0}. Proof: Lt us ssum tht L is rgulr. Thn, thr must xist finit utomton which ccpts L. Lt M n utomton nd lt K st of stts of M. Our gol is to find contrdiction to th ssumption w just md. W will try to do it y slcting n pproprit w L for which th pumping lmm dos not hold. If w rd th lmm, w s tht th proprtis (1) (3) r gurntd for sufficintly long strings, nmly for th strings whos lngth is K. For our lngug L th slction is vry limitd: ll strings r of th form n n for som n 0. W slct string w = n n with n K. Thus, th lngth of th -prt of w is grtr thn K nd th lngth of w is t list twic tht of K. Now w pply th lmm. W know tht th splitting n n = xyz gurntd y th lmm is such tht th comind lngth of x nd y is t most K. This givs us ll w nd, vn though w do not know wht x nd y r: sinc xy n, oth x nd y r in th first prt of w which is composd of s only. If you pump y on tim, forming string xyyz, you incrs th numr of s without incrsing tht of s. Indd, lt us dnot p th lngth of x nd q th lngth of y. From th ov w know tht oth x nd y consist of s only. Thus, x = p nd y = q. Furthrmor, from th scond proprty of th pumping lmm, w hv q > 0. Whn w pump y, th -prt of th nw string is y q longr tht th -prt. Sinc q > 0, w s tht contrry to th lmm, th nw string n+q n is not in L. This contrdiction provs tht L is not rgulr. () L = {ww R : w { } }. Proof: Just lik in th prvious cs, w ssum tht L is rgulr nd, thrfor, thr xists finit utomton M which ccpts it. Agin, lt K st of stts of M. As for (w do it lwys whn w pply th lmm) our gol is gtting contrdiction to th ssumption tht L is rgulr y finding string u L for which th pumping lmm dos not hold. As opposd to th prvious prolm, u cn slctd 18

19 from grt vrity of strings, sinc for ny w Σ, w hv string v = ww R which is in L. W try to slct w for which th pumping of y in ww R (ltr on) would crt strings not in L. Among mny pproprit strings, w = n fits our gol. W slct string w = n (n K ) which yilds u = n n L (s th dfinition of L). Th lngth of u is mor tht twic tht of K. Now w pply th lmm. W know tht th splitting n n = xyz gurntd y th lmm is such tht th comind lngth of x nd y is t most K. This givs us ll w nd, vn though w do not know wht x nd y r: sinc xy n, oth x nd y r in th first string of s, thrfor oth x nd y r composd of s only. It is sufficint to pump y on tim. This forms string u = xyyz whos lngth is y y > 0 grtr tht of u. Pumping incrss th lngth of th first -suintrvl nd puts oth s in th scond hlf of th nw string. Thrfor u is not of th form givn in th dfinition of L (th scond hlf of th string is th rvrs of th first). This provs tht contrry to th lmm, u is not in L. (c) L = {ww : w { } }. Similr to () nd (). (d) L = {ww : w { } }. Hr w dnots th word otind from w y rplcing ch occurrnc of with n nd vic vrs. Similr to () nd (). () L = { k l c n : n k + l}. Proof: As for, w nd to slct string in L nd pply th pumping lmm in ordr to show tht L is not rgulr. As for, w first ssum tht L is ccptd y finit utomton M; lt K th st of its stts. Slct w = k l c n L for which k K. W will s tht ny such string will do. By th pumping lmm, thr r x, y, nd z for which 1. xy K k; 2. y > 0; nd 3. i 0, string xy i z L. 19

20 Howvr, if w tk i = n + 1, th lngth of th -prt of th rsulting string coms longr thn tht of th c-prt, which shows tht th rsulting string is not in L. Conclusion: sinc th 3rd proprty of th pumping lmm is violtd, L is not rgulr. () L = { n2 : n 0}. Proof. In this cs, w slct w = n2 with n k, whr k is th numr of stts of th finit utomton ccpting L which (th utomton) is ssumd to xist. If so, n2 = xyz for som x, y, z stisfying () xy k n nd () y > 0. Whn w pump y, y th pumping lmm w must gt string in L, tht is string of th form p2 for som intgr p. Sinc w strtd with n2 nd pumping incrss th lngth of th string, p n + 1. Howvr, th whol incrs of th lngth is xctly y y n. Thus th lngth of th nw string is t most n 2 + n which is smllr thn (n + 1) 2. This contrdiction provs tht L is not rgulr. 20

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata CSE303 - Introduction to th Thory of Computing Smpl Solutions for Exrciss on Finit Automt Exrcis 2.1.1 A dtrministic finit utomton M ccpts th mpty string (i.., L(M)) if nd only if its initil stt is finl

More information

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, * CmSc 365 Thory of Computtion Finit Stt Automt nd Rgulr Exprssions (Chptr 2, Sction 2.3) ALPHABET oprtions: U, conctntion, * otin otin Strings Form Rgulr xprssions dscri Closd undr U, conctntion nd * (if

More information

Last time: introduced our first computational model the DFA.

Last time: introduced our first computational model the DFA. Lctur 7 Homwork #7: 2.2.1, 2.2.2, 2.2.3 (hnd in c nd d), Misc: Givn: M, NFA Prov: (q,xy) * (p,y) iff (q,x) * (p,) (follow proof don in clss tody) Lst tim: introducd our first computtionl modl th DFA. Tody

More information

DFA (Deterministic Finite Automata) q a

DFA (Deterministic Finite Automata) q a Big pictur All lngugs Dcidl Turing mchins NP P Contxt-fr Contxt-fr grmmrs, push-down utomt Rgulr Automt, non-dtrministic utomt, rgulr xprssions DFA (Dtrministic Finit Automt) 0 q 0 0 0 0 q DFA (Dtrministic

More information

Finite Automata. d: Q S Q. Finite automaton is M=(Q, S, d, q 0, F) Ex: an FA that accepts all odd-length strings of zeros: q 0 q 1. q i. q k.

Finite Automata. d: Q S Q. Finite automaton is M=(Q, S, d, q 0, F) Ex: an FA that accepts all odd-length strings of zeros: q 0 q 1. q i. q k. Finit Automt Bsic id: FA is mchin tht chngs stts whil procssing symols, on t tim. Finit st of stts: Q = {q 0, q 1, q 3,..., q k } Trnsition function: Initil stt: Finl stts: d: Q S Q q 0 Q F Q Finit utomton

More information

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016 Wintr 2016 COMP-250: Introduction to Computr Scinc Lctur 23, April 5, 2016 Commnt out input siz 2) Writ ny lgorithm tht runs in tim Θ(n 2 log 2 n) in wors cs. Explin why this is its running tim. I don

More information

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x) Chptr 7 INTEGRALS 7. Ovrviw 7.. Lt d d F () f (). Thn, w writ f ( ) d F () + C. Ths intgrls r clld indfinit intgrls or gnrl intgrls, C is clld constnt of intgrtion. All ths intgrls diffr y constnt. 7..

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spnning Trs Minimum Spnning Trs Problm A town hs st of houss nd st of rods A rod conncts nd only houss A rod conncting houss u nd v hs rpir cost w(u, v) Gol: Rpir nough (nd no mor) rods such tht:

More information

The Course covers: Lexical Analysis Syntax Analysis Semantic Analysis Runtime environments Code Generation Code Optimization. CS 540 Spring 2013 GMU 2

The Course covers: Lexical Analysis Syntax Analysis Semantic Analysis Runtime environments Code Generation Code Optimization. CS 540 Spring 2013 GMU 2 CS 540 Spring 2013 Th Cours covrs: Lxicl Anlysis Syntx Anlysis Smntic Anlysis Runtim nvironmnts Cod Gnrtion Cod Optimiztion CS 540 Spring 2013 GMU 2 Pr-rquisit courss Strong progrmming ckground in C, C++

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations Mr Funtins Grphs, Pruts, & Rltins Unirt Grphs An unirt grph is pir f 1. A st f ns 2. A st f gs (whr n g is st f tw ns*) Friy, Sptmr 2, 2011 Ring: Sipsr 0.2 ginning f 0.4; Stughtn 1.1.5 ({,,,,}, {{,}, {,},

More information

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes. Nm: UCA ID Numr: Stion lttr: th 61 : Disrt Struturs Finl Exm Instrutor: Ciprin nolsu You hv 180 minuts. No ooks, nots or lultors r llow. Do not us your own srth ppr. 1. (2 points h) Tru/Fls: Cirl th right

More information

COMP108 Algorithmic Foundations

COMP108 Algorithmic Foundations Grdy mthods Prudn Wong http://www.s.liv..uk/~pwong/thing/omp108/01617 Coin Chng Prolm Suppos w hv 3 typs of oins 10p 0p 50p Minimum numr of oins to mk 0.8, 1.0, 1.? Grdy mthod Lrning outoms Undrstnd wht

More information

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals Intgrtion Continud Intgrtion y Prts Solving Dinit Intgrls: Ar Undr Curv Impropr Intgrls Intgrtion y Prts Prticulrly usul whn you r trying to tk th intgrl o som unction tht is th product o n lgric prssion

More information

TOPIC 5: INTEGRATION

TOPIC 5: INTEGRATION TOPIC 5: INTEGRATION. Th indfinit intgrl In mny rspcts, th oprtion of intgrtion tht w r studying hr is th invrs oprtion of drivtion. Dfinition.. Th function F is n ntidrivtiv (or primitiv) of th function

More information

Most Complex Regular Ideal Languages

Most Complex Regular Ideal Languages Discrt Mthmtics nd Thorticl Computr Scinc DMTCS vol. 18:3, 2016, #15 Most Complx Rgulr Idl Lngugs Jnusz Brzozowski 1 Sylvi Dvis 2 Bo Yng Victor Liu 1 rxiv:1511.00157v3 [cs.fl] 13 Oct 2016 1 Dvid R. Chriton

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture:

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture: Lctur 11 Wvs in Priodic Potntils Tody: 1. Invrs lttic dfinition in 1D.. rphicl rprsnttion of priodic nd -priodic functions using th -xis nd invrs lttic vctors. 3. Sris solutions to th priodic potntil Hmiltonin

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

CIVL 8/ D Boundary Value Problems - Rectangular Elements 1/7

CIVL 8/ D Boundary Value Problems - Rectangular Elements 1/7 CIVL / -D Boundr Vlu Prolms - Rctngulr Elmnts / RECANGULAR ELEMENS - In som pplictions, it m mor dsirl to us n lmntl rprsnttion of th domin tht hs four sids, ithr rctngulr or qudriltrl in shp. Considr

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Chapter 16. 1) is a particular point on the graph of the function. 1. y, where x y 1

Chapter 16. 1) is a particular point on the graph of the function. 1. y, where x y 1 Prctic qustions W now tht th prmtr p is dirctl rltd to th mplitud; thrfor, w cn find tht p. cos d [ sin ] sin sin Not: Evn though ou might not now how to find th prmtr in prt, it is lws dvisl to procd

More information

Multi-Section Coupled Line Couplers

Multi-Section Coupled Line Couplers /0/009 MultiSction Coupld Lin Couplrs /8 Multi-Sction Coupld Lin Couplrs W cn dd multipl coupld lins in sris to incrs couplr ndwidth. Figur 7.5 (p. 6) An N-sction coupld lin l W typiclly dsign th couplr

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari Grphs CSC 1300 Disrt Struturs Villnov Univrsity Grphs Grphs r isrt struturs onsis?ng of vr?s n gs tht onnt ths vr?s. Grphs n us to mol: omputr systms/ntworks mthm?l rl?ons logi iruit lyout jos/prosss f

More information

cycle that does not cross any edges (including its own), then it has at least

cycle that does not cross any edges (including its own), then it has at least W prov th following thorm: Thorm If a K n is drawn in th plan in such a way that it has a hamiltonian cycl that dos not cross any dgs (including its own, thn it has at last n ( 4 48 π + O(n crossings Th

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

1 Minimum Cut Problem

1 Minimum Cut Problem CS 6 Lctur 6 Min Cut and argr s Algorithm Scribs: Png Hui How (05), Virginia Dat: May 4, 06 Minimum Cut Problm Today, w introduc th minimum cut problm. This problm has many motivations, on of which coms

More information

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim's Alorithm Introution Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #33 3 Alorithm Gnrl Constrution Mik Joson (Univrsity o Clry)

More information

CS 361 Meeting 12 10/3/18

CS 361 Meeting 12 10/3/18 CS 36 Mting 2 /3/8 Announcmnts. Homwork 4 is du Friday. If Friday is Mountain Day, homwork should b turnd in at my offic or th dpartmnt offic bfor 4. 2. Homwork 5 will b availabl ovr th wknd. 3. Our midtrm

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology! Outlin Computr Sin 331, Spnnin, n Surphs Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #30 1 Introution 2 3 Dinition 4 Spnnin 5 6 Mik Joson (Univrsity o Clry) Computr Sin 331 Ltur #30 1 / 20 Mik

More information

Garnir Polynomial and their Properties

Garnir Polynomial and their Properties Univrsity of Cliforni, Dvis Dprtmnt of Mthmtis Grnir Polynomil n thir Proprtis Author: Yu Wng Suprvisor: Prof. Gorsky Eugny My 8, 07 Grnir Polynomil n thir Proprtis Yu Wng mil: uywng@uvis.u. In this ppr,

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

Linear Algebra Existence of the determinant. Expansion according to a row.

Linear Algebra Existence of the determinant. Expansion according to a row. Lir Algbr 2270 1 Existc of th dtrmit. Expsio ccordig to row. W dfi th dtrmit for 1 1 mtrics s dt([]) = (1) It is sy chck tht it stisfis D1)-D3). For y othr w dfi th dtrmit s follows. Assumig th dtrmit

More information

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s? MATH 3012 Finl Exm, My 4, 2006, WTT Stunt Nm n ID Numr 1. All our prts o this prolm r onrn with trnry strings o lngth n, i.., wors o lngth n with lttrs rom th lpht {0, 1, 2}.. How mny trnry wors o lngth

More information

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs. Pths.. Eulr n Hmilton Pths.. Pth D. A pth rom s to t is squn o gs {x 0, x 1 }, {x 1, x 2 },... {x n 1, x n }, whr x 0 = s, n x n = t. D. Th lngth o pth is th numr o gs in it. {, } {, } {, } {, } {, } {,

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1 CSC 00 Disrt Struturs : Introuon to Grph Thory Grphs Grphs CSC 00 Disrt Struturs Villnov Univrsity Grphs r isrt struturs onsisng o vrs n gs tht onnt ths vrs. Grphs n us to mol: omputr systms/ntworks mthml

More information

Basic Polyhedral theory

Basic Polyhedral theory Basic Polyhdral thory Th st P = { A b} is calld a polyhdron. Lmma 1. Eithr th systm A = b, b 0, 0 has a solution or thr is a vctorπ such that π A 0, πb < 0 Thr cass, if solution in top row dos not ist

More information

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem) 12/3/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 Ciruits Cyl 2 Eulr

More information

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs Prt 10. Grphs CS 200 Algorithms n Dt Struturs 1 Introution Trminology Implmnting Grphs Outlin Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 2 Ciruits Cyl A spil yl

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths. How os it work? Pl vlu o imls rprsnt prts o whol numr or ojt # 0 000 Tns o thousns # 000 # 00 Thousns Hunrs Tns Ons # 0 Diml point st iml pl: ' 0 # 0 on tnth n iml pl: ' 0 # 00 on hunrth r iml pl: ' 0

More information

EEO 401 Digital Signal Processing Prof. Mark Fowler

EEO 401 Digital Signal Processing Prof. Mark Fowler EEO 401 Digital Signal Procssing Prof. Mark Fowlr Dtails of th ot St #19 Rading Assignmnt: Sct. 7.1.2, 7.1.3, & 7.2 of Proakis & Manolakis Dfinition of th So Givn signal data points x[n] for n = 0,, -1

More information

Present state Next state Q + M N

Present state Next state Q + M N Qustion 1. An M-N lip-lop works s ollows: I MN=00, th nxt stt o th lip lop is 0. I MN=01, th nxt stt o th lip-lop is th sm s th prsnt stt I MN=10, th nxt stt o th lip-lop is th omplmnt o th prsnt stt I

More information

0.1. Exercise 1: the distances between four points in a graph

0.1. Exercise 1: the distances between four points in a graph Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 pg 1 Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 u: W, 3 My 2017, in lss or y mil (grinr@umn.u) or lss S th wsit or rlvnt mtril. Rsults provn in th nots, or in

More information

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018 CSE 373: Mor on grphs; DFS n BFS Mihl L Wnsy, F 14, 2018 1 Wrmup Wrmup: Disuss with your nighor: Rmin your nighor: wht is simpl grph? Suppos w hv simpl, irt grph with x nos. Wht is th mximum numr of gs

More information

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued... Progrssiv Printing T.M. CPITLS g 4½+ Th sy, fun (n FR!) wy to tch cpitl lttrs. ook : C o - For Kinrgrtn or First Gr (not for pr-school). - Tchs tht cpitl lttrs mk th sm souns s th littl lttrs. - Tchs th

More information

1 Introduction to Modulo 7 Arithmetic

1 Introduction to Modulo 7 Arithmetic 1 Introution to Moulo 7 Arithmti Bor w try our hn t solvin som hr Moulr KnKns, lt s tk los look t on moulr rithmti, mo 7 rithmti. You ll s in this sminr tht rithmti moulo prim is quit irnt rom th ons w

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

1 Finite Automata and Regular Expressions

1 Finite Automata and Regular Expressions 1 Fini Auom nd Rgulr Exprion Moivion: Givn prn (rgulr xprion) for ring rching, w migh wn o convr i ino drminiic fini uomon or nondrminiic fini uomon o mk ring rching mor fficin; drminiic uomon only h o

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management nrl tr T is init st o on or mor nos suh tht thr is on sint no r, ll th root o T, n th rminin nos r prtition into n isjoint susts T, T,, T n, h o whih is tr, n whos roots r, r,, r n, rsptivly, r hilrn o

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2 Grt Thortil Is In Computr Sin Vitor Amhik CS 15-251 Ltur 9 Grphs - II Crngi Mllon Univrsity Grph Isomorphism finition. Two simpl grphs G n H r isomorphi G H if thr is vrtx ijtion V H ->V G tht prsrvs jny

More information

CONIC SECTIONS. MODULE-IV Co-ordinate Geometry OBJECTIVES. Conic Sections

CONIC SECTIONS. MODULE-IV Co-ordinate Geometry OBJECTIVES. Conic Sections Conic Sctions 16 MODULE-IV Co-ordint CONIC SECTIONS Whil cutting crrot ou might hv noticd diffrnt shps shown th dgs of th cut. Anlticll ou m cut it in thr diffrnt ws, nml (i) (ii) (iii) Cut is prlll to

More information

Enforcement of Opacity Security Properties Using Insertion Functions

Enforcement of Opacity Security Properties Using Insertion Functions Enforcmnt of Opcity Scurity Proprtis Using Insrtion Functions Yi-Chin Wu nd Stéphn Lfortun EECS Dprtmnt, Univrsity of Michign CDC 12 Dc. 13 th, 2012 Motivtion Scurity nd privcy concrns in onlin srvics

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

Chem 104A, Fall 2016, Midterm 1 Key

Chem 104A, Fall 2016, Midterm 1 Key hm 104A, ll 2016, Mitrm 1 Ky 1) onstruct microstt tl for p 4 configurtion. Pls numrt th ms n ml for ch lctron in ch microstt in th tl. (Us th formt ml m s. Tht is spin -½ lctron in n s oritl woul writtn

More information

Weighted Matching and Linear Programming

Weighted Matching and Linear Programming Wightd Mtching nd Linr Progrmming Jonthn Turnr Mrch 19, 01 W v sn tht mximum siz mtchings cn b found in gnrl grphs using ugmnting pths. In principl, this sm pproch cn b pplid to mximum wight mtchings.

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Construction of asymmetric orthogonal arrays of strength three via a replacement method

Construction of asymmetric orthogonal arrays of strength three via a replacement method isid/ms/26/2 Fbruary, 26 http://www.isid.ac.in/ statmath/indx.php?modul=prprint Construction of asymmtric orthogonal arrays of strngth thr via a rplacmnt mthod Tian-fang Zhang, Qiaoling Dng and Alok Dy

More information

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1 Chaptr 11 Th singular sris Rcall that by Thorms 10 and 104 togthr provid us th stimat 9 4 n 2 111 Rn = SnΓ 2 + on2, whr th singular sris Sn was dfind in Chaptr 10 as Sn = q=1 Sq q 9, with Sq = 1 a q gcda,q=1

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

The Matrix Exponential

The Matrix Exponential Th Matrix Exponntial (with xrciss) by D. Klain Vrsion 207.0.05 Corrctions and commnts ar wlcom. Th Matrix Exponntial For ach n n complx matrix A, dfin th xponntial of A to b th matrix A A k I + A + k!

More information

(Upside-Down o Direct Rotation) β - Numbers

(Upside-Down o Direct Rotation) β - Numbers Amrican Journal of Mathmatics and Statistics 014, 4(): 58-64 DOI: 10593/jajms0140400 (Upsid-Down o Dirct Rotation) β - Numbrs Ammar Sddiq Mahmood 1, Shukriyah Sabir Ali,* 1 Dpartmnt of Mathmatics, Collg

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Instructions for Section 1

Instructions for Section 1 Instructions for Sction 1 Choos th rspons tht is corrct for th qustion. A corrct nswr scors 1, n incorrct nswr scors 0. Mrks will not b dductd for incorrct nswrs. You should ttmpt vry qustion. No mrks

More information

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

Combinatorial Networks Week 1, March 11-12

Combinatorial Networks Week 1, March 11-12 1 Nots on March 11 Combinatorial Ntwors W 1, March 11-1 11 Th Pigonhol Principl Th Pigonhol Principl If n objcts ar placd in hols, whr n >, thr xists a box with mor than on objcts 11 Thorm Givn a simpl

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018 Propositional Logic Combinatorial Problm Solving (CPS) Albrt Olivras Enric Rodríguz-Carbonll May 17, 2018 Ovrviw of th sssion Dfinition of Propositional Logic Gnral Concpts in Logic Rduction to SAT CNFs

More information

UNTYPED LAMBDA CALCULUS (II)

UNTYPED LAMBDA CALCULUS (II) 1 UNTYPED LAMBDA CALCULUS (II) RECALL: CALL-BY-VALUE O.S. Basic rul Sarch ruls: (\x.) v [v/x] 1 1 1 1 v v CALL-BY-VALUE EVALUATION EXAMPLE (\x. x x) (\y. y) x x [\y. y / x] = (\y. y) (\y. y) y [\y. y /

More information

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V Unirt Grphs An unirt grph G = (V, E) V st o vrtis E st o unorr gs (v,w) whr v, w in V USE: to mol symmtri rltionships twn ntitis vrtis v n w r jnt i thr is n g (v,w) [or (w,v)] th g (v,w) is inint upon

More information

The Matrix Exponential

The Matrix Exponential Th Matrix Exponntial (with xrciss) by Dan Klain Vrsion 28928 Corrctions and commnts ar wlcom Th Matrix Exponntial For ach n n complx matrix A, dfin th xponntial of A to b th matrix () A A k I + A + k!

More information

Derangements and Applications

Derangements and Applications 2 3 47 6 23 Journal of Intgr Squncs, Vol. 6 (2003), Articl 03..2 Drangmnts and Applications Mhdi Hassani Dpartmnt of Mathmatics Institut for Advancd Studis in Basic Scincs Zanjan, Iran mhassani@iasbs.ac.ir

More information

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura Moul grph.py CS 231 Nomi Nishimur 1 Introution Just lik th Python list n th Python itionry provi wys of storing, ssing, n moifying t, grph n viw s wy of storing, ssing, n moifying t. Bus Python os not

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS C 24 - COMBINATIONAL BUILDING BLOCKS - INVST 3 DCODS AND NCODS FALL 23 AP FLZ To o "wll" on this invstition you must not only t th riht nswrs ut must lso o nt, omplt n onis writups tht mk ovious wht h

More information

ON THE SCOPE OF AVERAGING FOR FRANKL S CONJECTURE

ON THE SCOPE OF AVERAGING FOR FRANKL S CONJECTURE ON THE SCOPE OF AVERAGING FOR FRANKL S CONJECTURE GÁBOR CZÉDLI, MIKLÓS MARÓTI, AND E. TAMÁS SCHMIDT Abstrct. Lt F b union-closd fmily of substs of n m-lmnt st A. Lt n = F 2. For b A lt w(b) dnot th numbr

More information

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely . DETERMINANT.. Dtrminnt. Introution:I you think row vtor o mtrix s oorint o vtors in sp, thn th gomtri mning o th rnk o th mtrix is th imnsion o th prlllppi spnn y thm. But w r not only r out th imnsion,

More information

Walk Like a Mathematician Learning Task:

Walk Like a Mathematician Learning Task: Gori Dprtmnt of Euction Wlk Lik Mthmticin Lrnin Tsk: Mtrics llow us to prform mny usful mthmticl tsks which orinrily rquir lr numbr of computtions. Som typs of problms which cn b on fficintly with mtrics

More information

Week 3: Connected Subgraphs

Week 3: Connected Subgraphs Wk 3: Connctd Subgraphs Sptmbr 19, 2016 1 Connctd Graphs Path, Distanc: A path from a vrtx x to a vrtx y in a graph G is rfrrd to an xy-path. Lt X, Y V (G). An (X, Y )-path is an xy-path with x X and y

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt of Computr n Informtion Sins CSCI 710 (Trnoff) Disrt Struturs TEST for Fll Smstr, 00 R this for strtin! This tst is los ook

More information

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

CSC Design and Analysis of Algorithms. Example: Change-Making Problem CSC 801- Dsign n Anlysis of Algorithms Ltur 11 Gry Thniqu Exmpl: Chng-Mking Prolm Givn unlimit mounts of oins of nomintions 1 > > m, giv hng for mount n with th lst numr of oins Exmpl: 1 = 25, 2 =10, =

More information

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA. S i m p l i y i n g A l g r SIMPLIFYING ALGEBRA www.mthltis.o.nz Simpliying SIMPLIFYING Algr ALGEBRA Algr is mthmtis with mor thn just numrs. Numrs hv ix vlu, ut lgr introus vrils whos vlus n hng. Ths

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt o Computr n Inormtion Sins CSCI 2710 (Trno) Disrt Struturs TEST or Sprin Smstr, 2005 R this or strtin! This tst is los ook

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation.

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation. MAT 444 H Barclo Spring 004 Homwork 6 Solutions Sction 6 Lt H b a subgroup of a group G Thn H oprats on G by lft multiplication Dscrib th orbits for this opration Th orbits of G ar th right costs of H

More information