2 Trees and Their Applications

Size: px
Start display at page:

Download "2 Trees and Their Applications"

Transcription

1 Trs n Tr Appltons. Proprts o trs.. Crtrzton o trs Dnton. A rp s ll yl (or orst) t ontns no yls. A onnt yl rp s ll tr. Quston. Cn n yl rp v loops or prlll s? Notton. I G = (V, E) s rp n E, tn G wll not t rp G wt t rmov; tt s, G = (V, E {}). Smlrly, = uv or u, v V n E, tn G + nots t rp G wt t ; tt s, G + = (V, E {}). I W = v 0 v... v n W = v + v +... m v m r (v 0, v )- n (v, v m )-wl, rsptvly, n rp G, tn W W wll not t ontnton o W n W, tt s, t (v 0, v m )-wl v 0 v... v + v +... m v m. Torm. I G s tr, tn or ll u, v V (G) tr s unqu (u, v)-pt n G. Proo. T ny vrts u, v n tr G. Sn G s onnt, tr xsts t lst on (u, v)-pt n G. Suppos P n Q r two stnt (u, v)-pts. Tn tr xsts n = xy o P tt s not n o Q (or v-vrs). Now G ontns n (x, y)-wl n n n (x, y)-pt R. But tn Rxy s yl n G, ontrton. Hn G must ontn unqu (u, v)-pt. Torm. Any tr wt n vrts s prsly n s. Proo. By nuton on n. I n =, tn G = K n E(G) = 0 = n s lm. Suppos t sttmnt s tru or ll trs wt wr tn n vrts. Lt G tr wt n vrts, wr n. Tn G ontns n uv. Sn uv s t unqu (u, v)- pt, t rp G uv s sonnt n s xtly two onnt omponnts G n G. Sn G n G r onnt n yl, ty r trs, sy wt n n n vrts, wr n = n +n n n, n < n. By t nuton ypotss, E(G ) = n or =,. Hn E(G) = E(G ) + E(G ) + = (n ) + (n ) + = n. Corollry. A tr wt n vrts s t lst two vrts o r. Proo. Lt G = (V, E) tr wt n vrts. Sn t s onnt, w v (u) or ll u V. Lt n t numr o vrts o r n G. Tn E = u V (u) n + (n n ). Sn E = n, w v w rsults n n. (n ) n + (n n ),

2 Torm. Lt G rp wt n vrts n n s. T ollown sttmnts r quvlnt: () G s onnt. () G s yl. () G s tr. Proo. () (): Assum G s onnt. Lt H mnml onnt spnnn surp o G (.. H s onnt spnnn surp o G su tt H s sonnt or ll E(H)). Tn H must yl (otrws H woul onnt or n o yl). Hn H s tr n so E(H) = V (H) = n = E(G). Sn H G, w v E(H) = E(G) n n H = G. It ollows tt G s yl. () (): Assum G s yl. Lt H mxml yl rp vn G s spnnn surp (.. H + s yl or ll E(H)). Tn H must onnt n so t s tr. Hn E(H) = V (H) = n = E(G). Sn G H, w v E(H) = E(G) n n H = G. It ollows tt G s tr. () (): Ts ollows rtly rom t nton o tr. Exrs.8 Sow tt ny two vrts n looplss rp G r onnt y unqu pt, tn G s tr. Exrs. Prov Corollry. y sown tt t orn n trmnus o lonst pt n non-trvl tr ot v r. Exrs.0 Sow tt () onnt omponnt o orst s tr; () G s orst n only E(G) = V (G) ω(g)... Cut s Dnton. A ut n rp G s n o G su tt ω(g ) > ω(g) (tt s, t rmovl o nrss t numr o onnt omponnts). Quston. I s ut o rp G, wt s t xt vlu o ω(g ) ω(g)? I G s onnt, wt n you sy out t rp G? Torm. E(G) s ut o rp G n only ls n no yl o G. Proo. Lt E(G) ut o G. Tn ω(g ) > ω(g) n tr xst u, v V (G) su tt u n v r onnt n G ut not n G. Tus, tr xsts (u, v)-pt P n G tt ontns t = xy, sy P xyq, wr P n Q r (u, x)- n (y, v)-pt, rsptvly. Now, ls n yl C, tn C s n (x, y)-pt n G, n n P (C )Q s (u, v)-wl n G, ontrton. Hn os not l n yl. Convrsly, lt E(G) n tt ls n no yl. Suppos = xy s not ut. Tn ω(g ) = ω(g), n ny two vrts onnt n G r onnt n G. In prtulr, sn x G y, tr xsts n (x, y)-pt P n G. But tn P + s yl o G ontnn, ontrton. Hn s ut.

3 Corollry. Lt G onnt rp. Tn G s tr n only vry o G s ut. Proo. Exrs. Exrs. Sow tt vry vrtx o rp G s vn r, tn G s no ut. (Hnt: Sow tt E(G) s n -sont unon o yls.).. Spnnn trs Dnton. A spnnn tr o rp G s spnnn surp o G tt s tr. Torm. Evry onnt rp s spnnn tr. Proo. Lt G onnt rp n T mnml onnt spnnn surp o G (tt s, onnt spnnn surp o G wt t proprty tt T s sonnt or ll E(T )). But tn vry o T s ut n y Corollry., T s tr. Hn T s spnnn tr o G. Corollry.8 I G s onnt rp, tn E(G) V (G). Proo. Exrs. Corollry. sows tt tr s mnml onnt rp: rmovn ny wll sonnt t. T nxt torm sows tt tr s mxml yl rp: n ny rts yl. Torm. Lt G onnt rp, T ts spnnn tr, n E(G) E(T ). Tn T + ontns unqu yl. Proo. Lt E(G) E(T ), = uv. Sn T s onnt, t ontns (u, v)-pt P, w os not ontn t. Hn P uv s yl n T + tt ontns. Lt C ny yl o T +. Sn T s yl, C nssrly ontns. Furtrmor, C s (u, v)-pt n T. But sn T ontns unqu (u, v)-pt, T + ontns unqu yl. Exrs.0 Dtrmn t numr o prws non-somorp spnnn trs n o t rps n Fur. Rrns or Ston.: Bony. Grp trvrsls In ts ston w onsr two mtos or onstrutn spnnn trs n rp, n, t t sm tm, or trvrsn (vstn ll vrts o) rp. Ts two mtos r lso us n mny otr rp lortms, or xmpl, or nn onnt omponnts o rp. 8

4 Fur : Exrs.... Dpt-rst sr (or trn) Dpt-rst sr s ntrl to lortms or nn ut-vrts n los o rp, stron omponnts o rt rp, n or trmnn wtr or not rp s plnr. Dpt-rst sr n son tr trn n us to solv prolms n w n xustv sr o ll possl solutons s rqur. Assum G s smpl onnt rp. W onstrut pt-rst spnnn tr T n G s ollows. Strtn t vn vrtx v 0, onstrut lonst pt T = v 0 v... v n G. So v s no nours tt r not lry n T. I T ontns ll t vrts o G, w r on. I not, tr to t prvous vrtx v on t pt T n oos nour v or v su tt v s not lry n T. A vrtx v n v v to t tr T. Contnu uln pt rom v s lon s possl, lwys n only vrts not lry n T. Wn ts s no lonr possl, tr to t prvous vrtx n t tr T. Sn no wt ot nponts n T s vr to T, t n rsult s spnnn tr. To urnt unqunss o t rsult, t vrts o G r orr n t stp, t rst vll vrtx s osn to to T. Alortm. Dpt-Frst Sr (rursv vrson) prour DF S(G: onnt rp wt vrts u, u,..., u n ) T := tr onsstn only o vrtx u vst(u ) {T s t pt-rst spnnn tr o G} prour vst(v: vrtx o G) {t rp G n ts tr T r lol vrls r} wl v s nours not yt n T n w := rst nour o v not yt n T T := T + vw vst(w) n Exmpl. Construt pt-rst spnnn tr n t rp n Fur.

5 Fur : Exmpl. Consr t tm omplxty o t lortm. Assumn tt t nours o ny vrtx r ssl n t rown tr T n umnt n onstnt numr o oprtons, w only n to ount t numr o tms t wl loop s ntr n prour vst. Prour vst s ll or vrtx v o t rp, n or ts vrtx, t wl loop s ntr t most (v) tms. So t wl loop s ntr t most v V (G) (v) = tms ltotr, wr = E(G). Ts vs tm omplxty O(), or O(n ) sn n(n ). Exrs. Construt pt-rst spnnn tr n t rp n Fur wt t vrts orr n rvrs orr (.. strtn t vrtx ). Wt out strtn t vrtx wt vrts n snn orr? Exrs. Dsr n lortm usn DFS tt ns t onnt omponnts o rp. Exrs. Suppos you n yoursl n mz. Dsr n lortm usn DFS tt ts you out o t mz. Assum tt you v p o l to mr t psss n/or ntrstons. (You my lso ssum tt l mrs n rs.).. Brt-Frst Sr Brt-rst sr n us to n low-umntn pts n lortms or mxmum lows n ntwors. An, ssum G s smpl onnt rp. T rt-rst sr lortm onstruts spnnn tr T o G y rst nnn out rom vn vrtx v. At stp, n unpross vrtx v s tn o quu, mr pross, n or nour w o v not lry n T, t vw s to t tr T. T vrtx w s tn to t quu o unpross vrts. Vrts r tus to T lvl y lvl: vrts t stn rom v rst, tn vrts t stn, stn n so on. An, or t purpos o unqunss o output, t vrts o G r orr n nours o vn vrtx nsrt nto t quu n tr prorty orr. 0

6 Alortm. Brt-Frst Sr prour BF S(G: onnt rp wt vrts v, v,..., v n ) T := tr onsstn only o vrtx v Q := (v ) {Q s t quu o unpross vrts} wl Q s not mpty n v := rst vrtx n Q rmov v rom Q {now pross vrtx v} wl v s nour not n T n w := rst nour o v not n T put w to t n o Q T := T + vw n n {T s t rt-rst spnnn tr o G} Exmpl. Construt rt-rst spnnn tr n t rp n Fur Fur : Exmpl. Exrs.8 Sow tt t tm omplxty o rt-rst sr s O(), or O(n ), wr n = V (G) n = E(G). Exrs. Construt rt-rst spnnn tr n t rp n Fur wt t vrts orr n rvrs orr(.. strtn t vrtx ). Wt out strtn t vrtx wt vrts n snn orr? Exrs.0 Dsr n lortm usn BFS tt, or vn vrtx u n onnt rp G, trmns t stns o ll otr vrts rom u.

7 .. Appltons o trn Som prolms n solv only y n xustv sr o ll possl solutons. On wy to sr systmtlly s to us son tr, n w ll ntrnl vrts (vrts o r ) rprsnt sons n ll lvs (vrts o r ) rprsnt tr soluton or n. To n soluton, w strt wt squn o sons n n ttmpt to r soluton. Ts s rprsnt y pt rom t root o t son tr (rst vrtx n pt-rst sr) to l. On t s nown tt vn squn o sons os not l to soluton, w tr n t son tr n strt notr squn o sons. T prour s ontnu untl soluton (or ll solutons) s oun, or ls, untl s s stls tt no solutons xst. For t rst xmpl, w n t noton o vrtx-olourn o rp. Dnton. Lt G smpl rp. A -vrtx-olourn o G s mppn : V (G) {,,..., } su tt or ll u, v V (G), uv E(G) (u) (v). T rp G s s to -vrtx-olourl tr xsts -vrtx olourn o G. Spn o olourn, r s notr mportnt rtrzton o prtt rps; ts on uss -vrtx-olourn nst o o yls. Torm. A rp s prtt n only t mts -vrtx-olourn Proo. Exrs. Exmpl. Construt son tr n us trn to n -vrtx-olourn o t rp n Fur. Fur : Exmpl. Exrs. Construt son tr n us trn to trmn wtr or not t rp n Fur n t Ptrsn rp (Fur ) r -vrtx-olourl.

8 0 8 Fur : Exrs. Exrs. T n-quns prolm ss ow n quns n pl on n n n ssor so tt no two quns tt otr (tt s, no two quns l n t sm row, olumn, or ny onl). Construt son tr or t -quns prolm. Exrs. Suppos you v n ons w loo ntl xpt tt on o t ons s ountrt n tror ltr tn otrs. Usn pn ln, you ws to n t ountrt on wt smllst numr o wns. Construt son tr or o t ss n = 8 n n =. Exrs. Usn son tr, nrt ll susts S o t st {,,,, } wt t proprty tt t sum o lmnts n S s n t ntrvl [0, 0]. Rrns or Ston.: Rosn. T Conntor Prolm mnmum spnnn trs n t ry lortm Imn t ollown prolm: A ompny plns to ul ommuntons ntwor onntn numr o ts. E two o t ts must ln wt tlpon ln, ut not nssrly rtly. Tr s vn ost ssot wt rt ln twn two ts. W lns soul ult so tt t totl ost o t ntwor s mnmz? (S Fur 8.) Ts prolm s solv y nn mnmum spnnn tr n wt rp. Dnton.8 A wt rp s rp G totr wt unton w : E(G) R ssnn to numrl wt. (Not: Otn w sll ssum tt ll wts r non-ntv.) W sll prsnt two lortms or onstrutn mnmum spnnn trs: Prm s lortm n Krusl s lortm. Ty pro y sussvly n s o smllst wt tt o not rt yl. T rn s tt n Prm s lortm, t st o s lry osn t stp orms tr n t rp, wl n Krusl s lortm t orms orst. Bot r xmpls o ry lortms.

9 Dnton. A ry lortm s n ppro to solvn n optmzton prolm y mn wt sms to t st o t vry stp (rtr tn onsrn ll squns o stps tt my l to soluton). A ry ppro my or my not l to sl soluton, n t os, t my or my not n n optml soluton. For vry ry lortm w n to prov tt t ns n optml soluton... Prm s lortm Lt G onnt wt rp wt n vrts. Prm s lortm strts y oosn n o smllst wt n puttn t nto t tr T. At sussv stp, w to T n o smllst wt su tt s xtly on npont n T. Ts urnts tt T + wll tr. W stop wn n s v n osn. By Torm., T s spnnn tr o G. In Torm. w sow tt T s n t mnmum spnnn tr. Alortm.0 Prm s Alortm prour P rm(g: wt onnt rp wt n vrts) T := tr onsstn o mnmum-wt only or := to n n := o mnmum wt tt s xtly on npont n T T := T + n {T s mnmum spnnn tr o G} Not tt to m t lortm trmnst, t s o G must prorr, n t stp, mssl s onsr n tr prorty orr. Exmpl. Construt mnmum spnnn tr n t rp n Fur 8 usn Prm s lortm. (Us t lxorp orrn o t s.) 8 8 Fur 8: Exmpl.

10 Torm. Lt G onnt wt rp wt n vrts. Any spnnn tr T onstrut y Prm s lortm ppl to G s mnmum spnnn tr o G. Proo. Lt,,..., n t sussv s osn y Prm s lortm, so E(T ) = {,,..., n }. In ton, lt n ny o G not n T. (I G = T, tn tr s notn to prov.) For =,,..., n, lt T = T [{,,..., }]. Now, or ny spnnn tr T o G, lt (T ) t smllst vlu o su tt E(T ). Lt T mnmum spnnn tr o G wt (T ) s lr s possl. Suppos T s not mnmum spnnn tr o G. Tn (T ) = < n. Ts mns tt,,..., l n ot T n T wl E(T ). By Torm., T + ontns unqu yl C. Sn T s yl, tr s n o C tt os not l n T. In prtulr, n osn so tt prsly on o ts nponts ls n T (ust ollow lon C strtn rom t npont o tt ls n T ; su n xsts sn otrws C woul yl n T = T + ). By Torm., s not ut o T + us t ls n yl. Hn T = (T + ) s onnt rp wt n s, n tror notr spnnn tr o G. Clrly, w(t ) = w(t ) w( ) + w( ). Now, n Prm s lortm, ws osn s n o smllst wt su tt xtly on npont o ls n T. Sn xtly on npont o ls n T, w now tt w( ) w( ). But tn w(t ) w(t ). Ts mns tt T s lso mnmum spnnn tr o G. Howvr, (T ) > = (T ), ontrtn t o o T. Tror, T = T n T s mnmum spnnn tr o G. It n sown tt wt pproprt mplmntton, Prm s lortm s o omplxty O( lo n), wr s t numr o s n n s t numr o vrts n onnt wt rp... Krusl s lortm Lt G onnt wt rp wt n vrts. Krusl s lortm strts y oosn n o smllst wt n puttn t nto t orst F. At sussv stp, w to F n o smllst wt su tt s t most on npont n F. Ts urnts tt F + wll orst. W stop wn n s v n osn. By Torm., F s spnnn tr o G. In Exrs. you wll sow tt F s n t mnmum spnnn tr. Alortm. Krusl s Alortm prour Krusl(G: wt onnt rp wt n vrts) F := trvl rp

11 or := to n n := o mnmum wt n E(G) E(F ) tt os not rt yl n F F := F + n {F s mnmum spnnn tr o G} Not tt to m t lortm trmnst, t s o G must prorr, n t stp, mssl s onsr n tr prorty orr. It n sown tt wt pproprt mplmntton, Krusl s lortm s o omplxty O( lo ), wr s t numr o s n onnt wt rp. Exmpl. Construt mnmum spnnn tr n t rp n Fur usn Krusl s lortm. (Us t lxorp orrn o t s.) 8 8 Fur : Exmpl. Exrs. Prov tt Krusl s lortm ppl to wt onnt rp prous mnmum spnnn tr. Exrs. Dsr n lortm tt onstruts: () mxmum spnnn tr n wt onnt rp; () mnmum spnnn orst n wt rp; () mnmum spnnn tr T n wt onnt rp su tt T ontns sp (yl) st o s. Rrns or Ston.: Rosn

12 . T Sortst Pts Prolm Gvn rp G n two vrts u n v n G, wt s stn rom u to v, tt s, t lnt o sortst (u, v)-pt, n G? In ts ston, w sll tully solv t wt vrson o ts prolm. But rst, wt o w mn y stn n lnt o pt n wt rp? Dnton. Lt G onnt wt smpl rp n u 0, u V (G). Furtrmor, lt P = u 0 u u... u (u 0, u )-pt n G. W n t wt (or lnt) o t pt P s w(p ) = w(u u ) n t (wt) stn rom u 0 to u s = st(u, v) = mn{w(p ) : P s (u 0, u ) pt}. Not tt pt lnt n stn n rp G orrspons to t pt wt (lnt) n stn n wt rp G wt ll wts qul to. On t otr n, P n Q r two pts n wt rp G, tn t s possl to v w(p ) < w(q) ltou P s mor s tn Q (v n xmpl!). T Sortst Pt Prolm ss to n t stn st(u 0, v 0 ) or two vrts u 0 n v 0 n onnt wt rp G. Dstr s Alortm, n nt lortm sr low, n t ns stns st(u 0, v) or ll vrts v V (G), owvr, t wors only or non-ntv wts. It strts y rown tr T rom t vrtx u 0. T tr T s t proprty tt t stp, or vry vrtx v n t tr, t sortst pt rom u 0 to v ontns only vrts lry n T. T nxt vrtx v to to t tr T s osn so tt mn{st(u 0, v) + w(vv ) : v V (T )} ( ) s s smll s possl ovr ll vrts not n T. (I v v, tn w n w(vv ) =.) An mportnt tur o t lortm s llln prour, w vos rptn lultons n (*). W not t vrtx st o t tr T y S. At t nnn, S =, t ll o vrtx u 0 s 0, n ll otr vrts v u 0 r ssn ll L(v) =. At sussv stp, vrtx v to to S s osn so tt L(v ) s s smll s possl ovr ll vrts not n S (ts s xtly t sm s Conton (*)). As v s to S, t lls o ll vrts r upt so tt t stp t ollown ols: n L(u) = st(u 0, u) or ll vrts u S (A) L(v) = mn{l(u) + w(uv) : u S} or ll vrts v S. (B) Not tt Clm (A) mpls tt t t n o t lortm L(v) s t stn rom u 0 to v or ll vrts v. Ts wll prov n Torm.0.

13 Alortm.8 Dstr s Alortm prour Dstr(G: wt onnt rp; u 0 : vrtx) {to n t stns rom u 0 to ll otr vrts} {G s n vrts n non-ntv wt unton w, wr w(uv) = u v n uv E(G), n w(uu) = 0} or vry u V (G) L(u) := L(u 0 ) := 0 S := {} or := to n n v := vrtx n V (G) S su tt L(v ) s s smll s possl S := S {v } or vry v V (G) S L(v ) + w(vv ) < L(v) tn L(v) := L(v ) + w(vv ) n {L(v) s t stn rom u 0 to v } Exrs. Us Dstr s lortm to n stns rom vrtx n t wt rp n Fur.. W sll now prov orrtnss o Dstr s lortm. Not tt n ntrnl vrtx o pt s ny vrtx o t pt tt s not n npont; tt s, t ntrnl vrts o t pt v 0 v v... v v r t vrts v, v,..., v. Torm.0 Dstr s lortm ns t stns rom vn vrtx n onnt wt rp wt non-ntv wts. Proo. In ton to t notton ntrou n t lortm, lt S not t st S, n L (u) t ll o vrtx u tr t -t trton o t lortm (or = 0,,..., n). Tus S 0 =, L 0 (u 0 ) = 0, n L 0 (u) = or ll u u 0. By nuton, w sll prov tt t ollown ol or =,..., n: n L (u) = st(u 0, u) or ll vrts u S (A ) L (v) = mn{l (u) + w(uv) : u S } or ll vrts v S. (B ) Not tt (B ) sys tt or v S, L (v) s t lnt o sortst (u 0, v)-pt wt ll ntrnl vrts n S. It s not ult to s tt S = {u 0 }, n L (u 0 ) = 0, L (u) = w(u 0 u) or ll u u 0, n L (v) = or ll otr vrts v. Hn (A ) n (B ) ol or =. Ts provs t ss o nuton. Suppos (A ) n (B ) ol or som, < n (nuton ypotss). Lt v S + S, tt s, Dstr s lortm s osn to v to S urn t ( + )-st trton. W lm tt L (v ) s t lnt o sortst (u 0, v )-pt. Suppos not. Sn 8

14 Fur 0: Exmpl.

15 y nuton ypotss L (v ) s t lnt o sortst (u 0, v )-pt wt ll ntrnl vrts n S, tr xsts (u 0, v ) pt P = u 0... v... v, wr v s t rst vrtx not n S, su tt w(p ) < L (v ). But sn ll wts r non-ntv n L (v) s t lnt o sortst (u 0, v)-pt wt ll ntrnl vrts n S, w v w(p ) = w(u 0... v) + w(v... v ) w(u 0... v) L (v) L (v ), ontrton. Hn (A ) ols or S + = S {v }. Now t ny vrtx v S + n sortst (u 0, v)-pt P wt ll ntrnl vrts n S +. I P os not ontn v, tn w(p ) = L (v) y nuton ypotss n L + (v) = L (v). Otrws, P = Qv v, wr Q s sortst (u 0, v )-pt. In ts s, w(p ) = w(q)+w(v v) = L (v )+w(v v) = L + (v). W v tus prov t nuton stp or (B ). By nuton, (A ) n (B ) ol or ll =,..., n, wn Dstr s lortm orrtly omputs stns rom vrtx u 0. Lt us now stmt t orr o omplxty o Dstr s lortm (,..., r onstnts): n n O( + n + ( + (n + ))) = O( n + ) = O(n ). = Exrs. Fn stns rom vrtx n t rp rom Fur.. Exrs. Moy Dstr s lortm so tt t trmns sortst pts rtr tn mrly stns. Exrs. A ompny s rns n o sx ts C,..., C. T r or rt lt rom C to C s vn y t (, )-t ntry n t ollown mtrx ( nts tt tr s no rt lt): T ompny wss to prpr tl o pst routs twn prs o ts. Prpr su tl. Exrs. W v mnton ov tt Dstr s lortm wors only or rps wt ll wts non-ntv. Gv n xmpl o wt rp wt ntv wts or w Dstr s lortm norrtly omputs stns. Rrns or Ston.: Bony, Rosn = 0

Lecture 20: Minimum Spanning Trees (CLRS 23)

Lecture 20: Minimum Spanning Trees (CLRS 23) Ltur 0: Mnmum Spnnn Trs (CLRS 3) Jun, 00 Grps Lst tm w n (wt) rps (unrt/rt) n ntrou s rp voulry (vrtx,, r, pt, onnt omponnts,... ) W lso suss jny lst n jny mtrx rprsntton W wll us jny lst rprsntton unlss

More information

Weighted Graphs. Weighted graphs may be either directed or undirected.

Weighted Graphs. Weighted graphs may be either directed or undirected. 1 In mny ppltons, o rp s n ssot numrl vlu, ll wt. Usully, t wts r nonntv ntrs. Wt rps my tr rt or unrt. T wt o n s otn rrr to s t "ost" o t. In ppltons, t wt my msur o t lnt o rout, t pty o ln, t nry rqur

More information

The University of Sydney MATH 2009

The University of Sydney MATH 2009 T Unvrsty o Syny MATH 2009 APH THEOY Tutorl 7 Solutons 2004 1. Lt t sonnt plnr rp sown. Drw ts ul, n t ul o t ul ( ). Sow tt s sonnt plnr rp, tn s onnt. Du tt ( ) s not somorp to. ( ) A onnt rp s on n

More information

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees /1/018 W usully no strns y ssnn -lnt os to ll rtrs n t lpt (or mpl, 8-t on n ASCII). Howvr, rnt rtrs our wt rnt rquns, w n sv mmory n ru trnsmttl tm y usn vrl-lnt non. T s to ssn sortr os to rtrs tt our

More information

Spanning Trees. BFS, DFS spanning tree Minimum spanning tree. March 28, 2018 Cinda Heeren / Geoffrey Tien 1

Spanning Trees. BFS, DFS spanning tree Minimum spanning tree. March 28, 2018 Cinda Heeren / Geoffrey Tien 1 Spnnn Trs BFS, DFS spnnn tr Mnmum spnnn tr Mr 28, 2018 Cn Hrn / Gory Tn 1 Dpt-rst sr Vsts vrts lon snl pt s r s t n o, n tn ktrks to t rst junton n rsums own notr pt Mr 28, 2018 Cn Hrn / Gory Tn 2 Dpt-rst

More information

(Minimum) Spanning Trees

(Minimum) Spanning Trees (Mnmum) Spnnn Trs Spnnn trs Kruskl's lortm Novmr 23, 2017 Cn Hrn / Gory Tn 1 Spnnn trs Gvn G = V, E, spnnn tr o G s onnt surp o G wt xtly V 1 s mnml sust o s tt onnts ll t vrts o G G = Spnnn trs Novmr

More information

Minimum Spanning Trees (CLRS 23)

Minimum Spanning Trees (CLRS 23) Mnmum Spnnn Trs (CLRS 3) T prolm Rll t nton o spnnn tr: Gvn onnt, unrt rp G = (V, E), sust o s o G su tt ty onnt ll vrts n G n orm no yls s ll spnnn tr (ST) o G. Any unrt, onnt rp s spnnn tr. Atully, rp

More information

CMPS 2200 Fall Graphs. Carola Wenk. Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk

CMPS 2200 Fall Graphs. Carola Wenk. Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk CMPS 2200 Fll 2017 Grps Crol Wnk Sls ourtsy o Crls Lsrson wt ns n tons y Crol Wnk 10/23/17 CMPS 2200 Intro. to Alortms 1 Grps Dnton. A rt rp (rp) G = (V, E) s n orr pr onsstn o st V o vrts (snulr: vrtx),

More information

Depth First Search. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong

Depth First Search. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong Dprtmnt o Computr Sn n Ennrn Cns Unvrsty o Hon Kon W v lry lrn rt rst sr (BFS). Toy, w wll suss ts sstr vrson : t pt rst sr (DFS) lortm. Our susson wll on n ous on rt rps, us t xtnson to unrt rps s strtorwr.

More information

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling.

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling. Cptr 4 4 Intrvl Suln Gry Alortms Sls y Kvn Wyn Copyrt 005 Prson-Ason Wsly All rts rsrv Intrvl Suln Intrvl Suln: Gry Alortms Intrvl suln! Jo strts t s n nss t! Two os omptl ty on't ovrlp! Gol: n mxmum sust

More information

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e)

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e) POW CSE 36: Dt Struturs Top #10 T Dynm (Equvln) Duo: Unon-y-Sz & Pt Comprsson Wk!! Luk MDowll Summr Qurtr 003 M! ZING Wt s Goo Mz? Mz Construton lortm Gvn: ollton o rooms V Conntons twn t rooms (ntlly

More information

Minimum Spanning Trees (CLRS 23)

Minimum Spanning Trees (CLRS 23) Mnmum Spnnn Trs (CLRS 3) T prolm Gvn onnt, unrt rp G = (V, E), sust o s o G su tt ty onnt ll vrts n G n orm no yls s ll spnnn tr (ST) o G. Clm: Any unrt, onnt rp s spnnn tr (n nrl rp my v mny spnnn trs).

More information

Lecture II: Minimium Spanning Tree Algorithms

Lecture II: Minimium Spanning Tree Algorithms Ltur II: Mnmum Spnnn Tr Alortms Dr Krn T. Hrly Dprtmnt o Computr Sn Unvrsty Coll Cork Aprl 0 KH (/0/) Ltur II: Mnmum Spnnn Tr Alortms Aprl 0 / 5 Mnmum Spnnn Trs Mnmum Spnnn Trs Spnnn Tr tr orm rom rp s

More information

Theorem 1. An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices.

Theorem 1. An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices. Cptr 11: Trs 11.1 - Introuton to Trs Dnton 1 (Tr). A tr s onnt unrt rp wt no sp ruts. Tor 1. An unrt rp s tr n ony tr s unqu sp pt twn ny two o ts vrts. Dnton 2. A root tr s tr n w on vrtx s n snt s t

More information

CMSC 451: Lecture 4 Bridges and 2-Edge Connectivity Thursday, Sep 7, 2017

CMSC 451: Lecture 4 Bridges and 2-Edge Connectivity Thursday, Sep 7, 2017 Rn: Not ovr n or rns. CMSC 451: Ltr 4 Brs n 2-E Conntvty Trsy, Sp 7, 2017 Hr-Orr Grp Conntvty: (T ollown mtrl ppls only to nrt rps!) Lt G = (V, E) n onnt nrt rp. W otn ssm tt or rps r onnt, t somtms t

More information

Strongly connected components. Finding strongly-connected components

Strongly connected components. Finding strongly-connected components Stronly onnt omponnts Fnn stronly-onnt omponnts Tylr Moor stronly onnt omponnt s t mxml sust o rp wt rt pt twn ny two vrts SE 3353, SMU, Dlls, TX Ltur 9 Som sls rt y or pt rom Dr. Kvn Wyn. For mor normton

More information

Divided. diamonds. Mimic the look of facets in a bracelet that s deceptively deep RIGHT-ANGLE WEAVE. designed by Peggy Brinkman Matteliano

Divided. diamonds. Mimic the look of facets in a bracelet that s deceptively deep RIGHT-ANGLE WEAVE. designed by Peggy Brinkman Matteliano RIGHT-ANGLE WEAVE Dv mons Mm t look o ts n rlt tt s ptvly p sn y Py Brnkmn Mttlno Dv your mons nto trnls o two or our olors. FCT-SCON0216_BNB66 2012 Klm Pulsn Co. Ts mtrl my not rprou n ny orm wtout prmsson

More information

Having a glimpse of some of the possibilities for solutions of linear systems, we move to methods of finding these solutions. The basic idea we shall

Having a glimpse of some of the possibilities for solutions of linear systems, we move to methods of finding these solutions. The basic idea we shall Hvn lps o so o t posslts or solutons o lnr systs, w ov to tos o nn ts solutons. T s w sll us s to try to sply t syst y lntn so o t vrls n so ts qutons. Tus, w rr to t to s lnton. T prry oprton nvolv s

More information

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017 COMP 250 Ltur 29 rp trvrsl Nov. 15/16, 2017 1 Toy Rursv rp trvrsl pt rst Non-rursv rp trvrsl pt rst rt rst 2 Hs up! Tr wr w mstks n t sls or S. 001 or toy s ltur. So you r ollown t ltur rorns n usn ts

More information

23 Minimum Spanning Trees

23 Minimum Spanning Trees 3 Mnmum Spnnn Trs Eltron rut sns otn n to mk t pns o svrl omponnts ltrlly quvlnt y wrn tm totr. To ntronnt st o n pns, w n us n rrnmnt o n wrs, onntn two pns. O ll su rrnmnts, t on tt uss t lst mount o

More information

In which direction do compass needles always align? Why?

In which direction do compass needles always align? Why? AQA Trloy Unt 6.7 Mntsm n Eltromntsm - Hr 1 Complt t p ll: Mnt or s typ o or n t s stronst t t o t mnt. Tr r two typs o mnt pol: n. Wrt wt woul ppn twn t pols n o t mnt ntrtons low: Drw t mnt l lns on

More information

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017 MAT3707/201/1/2017 Tutoril lttr 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Smstr 1 Dprtmnt o Mtmtil Sins SOLUTIONS TO ASSIGNMENT 01 BARCODE Din tomorrow. univrsity o sout ri SOLUTIONS TO ASSIGNMENT

More information

Graph Search (6A) Young Won Lim 5/18/18

Graph Search (6A) Young Won Lim 5/18/18 Grp Sr (6A) Youn Won Lm Copyrt () 2015 2018 Youn W. Lm. Prmon rnt to opy, trut n/or moy t oumnt unr t trm o t GNU Fr Doumntton Ln, Vron 1.2 or ny ltr vron pul y t Fr Sotwr Founton; wt no Invrnt Ston, no

More information

Graph Search Algorithms

Graph Search Algorithms Grp Sr Aortms 1 Grp 2 No ~ ty or omputr E ~ ro or t Unrt or Drt A surprsny r numr o omputton proms n xprss s rp proms. 3 Drt n Unrt Grps () A rt rp G = (V, E), wr V = {1,2,3,4,5,6} n E = {(1,2), (2,2),

More information

CSE 332. Data Structures and Parallelism

CSE 332. Data Structures and Parallelism Am Blnk Ltur 20 Wntr 2017 CSE 332 Dt Struturs n Prlllsm CSE 332: Dt Struturs n Prlllsm Grps 1: Wt s Grp? DFS n BFS LnkLsts r to Trs s Trs r to... 1 Wr W v Bn Essntl ADTs: Lsts, Stks, Quus, Prorty Quus,

More information

CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2

CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2 Am Blnk Ltur 19 Summr 2015 CSE 332: Dt Astrtons CSE 332 Grps 1: Wt s Grp? DFS n BFS Dt Astrtons LnkLsts r to Trs s Trs r to... 1 A Grp s Tny... 2 Wr W v Bn Essntl ADTs: Lsts, Stks, Quus, Prorty Quus, Hps,

More information

23 Minimum Spanning Trees

23 Minimum Spanning Trees 3 Mnmum Spnnn Trs Eltron rut sns otn n to mk t pns o svrl omponnts ltrlly quvlnt y wrn tm totr. To ntronnt st o n pns, w n us n rrnmnt o n wrs, onntn two pns. O ll su rrnmnts, t on tt uss t lst mount o

More information

An Introduction to Clique Minimal Separator Decomposition

An Introduction to Clique Minimal Separator Decomposition Alortms 2010, 3, 197-215; o:10.3390/3020197 Rvw OPEN ACCESS lortms ISSN 1999-4893 www.mp.om/ournl/lortms An Introuton to Clqu Mnml Sprtor Domposton Ann Brry 1,, Romn Poorln 1 n Gnvèv Smont 2 1 LIMOS UMR

More information

Applications of trees

Applications of trees Trs Apptons o trs Orgnzton rts Attk trs to syst Anyss o tr ntworks Prsng xprssons Trs (rtrv o norton) Don-n strutur Mutstng Dstnton-s orwrng Trnsprnt swts Forwrng ts o prxs t routrs Struturs or nt pntton

More information

Closed Monochromatic Bishops Tours

Closed Monochromatic Bishops Tours Cos Monoromt Bsops Tours Jo DMo Dprtmnt o Mtmts n Sttsts Knnsw Stt Unvrsty, Knnsw, Gor, 0, USA mo@nnsw.u My, 00 Astrt In ss, t sop s unqu s t s o to sn oor on t n wt or. Ts ms os tour n w t sop vsts vry

More information

Single Source Shortest Paths (with Positive Weights)

Single Source Shortest Paths (with Positive Weights) Snl Sour Sortst Pts (wt Postv Wts) Yuf To ITEE Unvrsty of Qunslnd In ts ltur, w wll rvst t snl sour sortst pt (SSSP) problm. Rll tt w v lrdy lrnd tt t BFS lortm solvs t problm ffntly wn ll t ds v t sm

More information

Exam 2 Solutions. Jonathan Turner 4/2/2012. CS 542 Advanced Data Structures and Algorithms

Exam 2 Solutions. Jonathan Turner 4/2/2012. CS 542 Advanced Data Structures and Algorithms CS 542 Avn Dt Stutu n Alotm Exm 2 Soluton Jontn Tun 4/2/202. (5 ont) Con n oton on t tton t tutu n w t n t 2 no. Wt t mllt num o no tt t tton t tutu oul ontn. Exln you nw. Sn n mut n you o u t n t, t n

More information

(4, 2)-choosability of planar graphs with forbidden structures

(4, 2)-choosability of planar graphs with forbidden structures (4, )-ooslty o plnr rps wt orn struturs Znr Brkkyzy 1 Crstopr Cox Ml Dryko 1 Krstn Honson 1 Mot Kumt 1 Brnr Lký 1, Ky Mssrsmt 1 Kvn Moss 1 Ktln Nowk 1 Kvn F. Plmowsk 1 Drrk Stol 1,4 Dmr 11, 015 Astrt All

More information

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions ulty o Mtmtis Wtrloo, Ontrio N ntr or ution in Mtmtis n omputin r / Mt irls Mr /, 0 rp Tory - Solutions * inits lln qustion. Tr t ollowin wlks on t rp low. or on, stt wtr it is pt? ow o you know? () n

More information

CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2

CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2 Am Blnk Ltur 0 Autumn 0 CSE 33: Dt Astrtons CSE 33 Grps : Wt s Grp? DFS n BFS Dt Astrtons LnkLsts r to Trs s Trs r to... A Grp s Tny... Wr W v Bn Essntl ADTs: Lsts, Stks, Quus, Prorty Quus, Hps, Vnll Trs,

More information

The Constrained Longest Common Subsequence Problem. Rotem.R and Rotem.H

The Constrained Longest Common Subsequence Problem. Rotem.R and Rotem.H T Constrn Lonst Common Susqun Prolm Rotm.R n Rotm.H Prsntton Outln. LCS Alortm Rmnr Uss o LCS Alortm T CLCS Prolm Introuton Motvton For CLCS Alortm T CLCS Prolm Nïv Alortm T CLCS Alortm A Dynm Prormmn

More information

SAMPLE CSc 340 EXAM QUESTIONS WITH SOLUTIONS: part 2

SAMPLE CSc 340 EXAM QUESTIONS WITH SOLUTIONS: part 2 AMPLE C EXAM UETION WITH OLUTION: prt. It n sown tt l / wr.7888l. I Φ nots orul or pprotng t vlu o tn t n sown tt t trunton rror o ts pproton s o t or or so onstnts ; tt s Not tt / L Φ L.. Φ.. /. /.. Φ..787.

More information

17 Basic Graph Properties

17 Basic Graph Properties Ltur 17: Bs Grp Proprts [Sp 10] O look t t sn y o. Tn t t twnty-svn 8 y 10 olor lossy pturs wt t rls n rrows n prrp on t k o on... n tn look t t sn y o. An tn t t twnty-svn 8 y 10 olor lossy pturs wt t

More information

Planar convex hulls (I)

Planar convex hulls (I) Covx Hu Covxty Gv st P o ots 2D, tr ovx u s t sst ovx oyo tt ots ots o P A oyo P s ovx or y, P, t st s try P. Pr ovx us (I) Coutto Gotry [s 3250] Lur To Bowo Co ovx o-ovx 1 2 3 Covx Hu Covx Hu Covx Hu

More information

The R-Tree. Yufei Tao. ITEE University of Queensland. INFS4205/7205, Uni of Queensland

The R-Tree. Yufei Tao. ITEE University of Queensland. INFS4205/7205, Uni of Queensland Yu To ITEE Unvrsty o Qunsln W wll stuy nw strutur ll t R-tr, w n tout o s mult-mnsonl xtnson o t B-tr. T R-tr supports ntly vrty o qurs (s w wll n out ltr n t ours), n s mplmnt n numrous ts systms. Our

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

Graphs Depth First Search

Graphs Depth First Search Grp Dpt Frt Sr SFO 337 LAX 1843 1743 1233 802 DFW ORD - 1 - Grp Sr Aort - 2 - Outo Ø By unrtnn t tur, you ou to: q L rp orn to t orr n w vrt r ovr, xpor ro n n n pt-rt r. q Cy o t pt-rt r tr,, orwr n ro

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

d e c b a d c b a d e c b a a c a d c c e b

d e c b a d c b a d e c b a a c a d c c e b FLAT PEYOTE STITCH Bin y mkin stoppr -- sw trou n pull it lon t tr until it is out 6 rom t n. Sw trou t in witout splittin t tr. You soul l to sli it up n own t tr ut it will sty in pl wn lt lon. Evn-Count

More information

CS 103 BFS Alorithm. Mark Redekopp

CS 103 BFS Alorithm. Mark Redekopp CS 3 BFS Aloritm Mrk Rkopp Brt-First Sr (BFS) HIGHLIGHTED ALGORITHM 3 Pt Plnnin W'v sn BFS in t ontxt o inin t sortst pt trou mz? S?? 4 Pt Plnnin W xplor t 4 niors s on irtion 3 3 3 S 3 3 3 3 3 F I you

More information

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4 Mt 166 WIR, Sprin 2012, Bnjmin urisp Mt 166 Wk in Rviw 2 Stions 1.1, 1.2, 1.3, & 1.4 1. S t pproprit rions in Vnn irm tt orrspon to o t ollowin sts. () (B ) B () ( ) B B () (B ) B 1 Mt 166 WIR, Sprin 2012,

More information

18 Basic Graph Properties

18 Basic Graph Properties O look t t sn y o. Tn t t twnty-svn 8 y 10 olor lossy pturs wt t rls n rrows n prrp on t k o on... n tn look t t sn y o. An tn t t twnty-svn 8 y 10 olor lossy pturs wt t rls n rrows n prrp on t k o on

More information

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms rp loritms lrnin ojtivs loritms your sotwr systm sotwr rwr lrn wt rps r in mtmtil trms lrn ow to rprsnt rps in omputrs lrn out typil rp loritms wy rps? intuitivly, rp is orm y vrtis n s twn vrtis rps r

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

L.3922 M.C. L.3922 M.C. L.2996 M.C. L.3909 M.C. L.5632 M.C. L M.C. L.5632 M.C. L M.C. DRIVE STAR NORTH STAR NORTH NORTH DRIVE

L.3922 M.C. L.3922 M.C. L.2996 M.C. L.3909 M.C. L.5632 M.C. L M.C. L.5632 M.C. L M.C. DRIVE STAR NORTH STAR NORTH NORTH DRIVE N URY T NORTON PROV N RRONOUS NORTON NVRTNTY PROV. SPY S NY TY OR UT T TY RY OS NOT URNT T S TT T NORTON PROV S ORRT, NSR S POSS, VRY ORT S N ON N T S T TY RY. TS NORTON S N OP RO RORS RT SU "" YW No.

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

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim s Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #34 Introution Min-Cost Spnnin Trs 3 Gnrl Constrution 4 5 Trmintion n Eiiny 6 Aitionl

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

Phylogenetic Tree Inferences Using Quartet Splits. Kevin Michael Hathcock. Bachelor of Science Lenoir-Rhyne University 2010

Phylogenetic Tree Inferences Using Quartet Splits. Kevin Michael Hathcock. Bachelor of Science Lenoir-Rhyne University 2010 Pylont Tr Inrns Usn Qurtt Splts By Kvn Ml Htok Blor o Sn Lnor-Ryn Unvrsty 2010 Sumtt n Prtl Fulllmnt o t Rqurmnts or t Dr o Mstr o Sn n Mtmts Coll o Arts n Sns Unvrsty o Sout Croln 2012 Apt y: Év Czrk,

More information

On Hamiltonian Tetrahedralizations Of Convex Polyhedra

On Hamiltonian Tetrahedralizations Of Convex Polyhedra O Ht Ttrrzts O Cvx Pyr Frs C 1 Q-Hu D 2 C A W 3 1 Dprtt Cputr S T Uvrsty H K, H K, C. E: @s.u. 2 R & TV Trsss Ctr, Hu, C. E: q@163.t 3 Dprtt Cputr S, Mr Uvrsty Nwu St. J s, Nwu, C A1B 35. E: w@r.s.u. Astrt

More information

MATERIAL SEE BOM ANGLES = 2 FINISH N/A

MATERIAL SEE BOM ANGLES = 2 FINISH N/A 9 NOTS:. SSML N NSPT PR SOP 0-9... NSTLL K STKR N X L STKR TO NS O SROU WT TP. 3. PR-PK LNR RNS WT P (XTRM PRSSUR NL R ) RS OR NNRN PPROV QUVLNT. 4. OLOR TT Y T SLS ORR. RRN T MNS OM OR OMPONNTS ONTNN

More information

Tangram Fractions Overview: Students will analyze standard and nonstandard

Tangram Fractions Overview: Students will analyze standard and nonstandard ACTIVITY 1 Mtrils: Stunt opis o tnrm mstrs trnsprnis o tnrm mstrs sissors PROCEDURE Skills: Dsriin n nmin polyons Stuyin onrun Comprin rtions Tnrm Frtions Ovrviw: Stunts will nlyz stnr n nonstnr tnrms

More information

A Gentle Introduction to Matroid Algorithmics

A Gentle Introduction to Matroid Algorithmics A Gntl Introuton to Mtro Alortms Mtts F. Stllmnn Aprl, 06 Mtro xoms T trm mtro ws rst us n 9 y Hsslr Wtny []. ovrvw oms rom t txtooks o Lwlr [] n Wls []. Most o t mtrl n ts A mtro s n y st o xoms wt rspt

More information

Graph Search Algorithms CSE

Graph Search Algorithms CSE Grp Src Aortms 1 Grp b No ~ cty or computr E ~ ro or t cb c Unrct or Drct A surprsny r numbr o computton probms cn b xprss s rp probms. 2 Drct n Unrct Grps () A rct rp G = (V, E), wr V = {1,2,3,4,5,6}

More information

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am 16.unii Introution to Computrs n Prormmin SOLUTIONS to Exmintion /30/0 9:05m - 10:00m Pro. I. Kristin Lunqvist Sprin 00 Grin Stion: Qustion 1 (5) Qustion (15) Qustion 3 (10) Qustion (35) Qustion 5 (10)

More information

Minimum Spanning Trees

Minimum Spanning Trees Mnmum Spnnng Trs Spnnng Tr A tr (.., connctd, cyclc grph) whch contns ll th vrtcs of th grph Mnmum Spnnng Tr Spnnng tr wth th mnmum sum of wghts 1 1 Spnnng forst If grph s not connctd, thn thr s spnnng

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

b.) v d =? Example 2 l = 50 m, D = 1.0 mm, E = 6 V, " = 1.72 #10 $8 % & m, and r = 0.5 % a.) R =? c.) V ab =? a.) R eq =?

b.) v d =? Example 2 l = 50 m, D = 1.0 mm, E = 6 V,  = 1.72 #10 $8 % & m, and r = 0.5 % a.) R =? c.) V ab =? a.) R eq =? xmpl : An 8-gug oppr wr hs nomnl mtr o. mm. Ths wr rrs onstnt urrnt o.67 A to W lmp. Th nsty o r ltrons s 8.5 x 8 ltrons pr u mtr. Fn th mgntu o. th urrnt nsty. th rt vloty xmpl D. mm,.67 A, n N 8.5" 8

More information

Platform Controls. 1-1 Joystick Controllers. Boom Up/Down Controller Adjustments

Platform Controls. 1-1 Joystick Controllers. Boom Up/Down Controller Adjustments Ston 7 - Rpr Prours Srv Mnul - Son Eton Pltorm Controls 1-1 Joystk Controllrs Mntnn oystk ontrollrs t t propr sttns s ssntl to s mn oprton. Evry oystk ontrollr soul oprt smootly n prov proportonl sp ontrol

More information

DOCUMENT STATUS: RELEASE

DOCUMENT STATUS: RELEASE RVSON STORY RV T SRPTON O Y 0-4-0 RLS OR PROUTON 5 MM -04-0 NS TRU PLOT PROUTON -- S O O OR TLS 30 MM 03-3-0 3-044 N 3-45, TS S T TON O PROTTV RM OVR. 3 05--0 LT 3-004, NOT, 3-050 3 0//00 UPT ST ROM SN,

More information

CS 461, Lecture 17. Today s Outline. Example Run

CS 461, Lecture 17. Today s Outline. Example Run Prim s Algorithm CS 461, Ltur 17 Jr Si Univrsity o Nw Mxio In Prim s lgorithm, th st A mintin y th lgorithm orms singl tr. Th tr strts rom n ritrry root vrtx n grows until it spns ll th vrtis in V At h

More information

Priority Search Trees - Part I

Priority Search Trees - Part I .S. 252 Pro. Rorto Taassa oputatoal otry S., 1992 1993 Ltur 9 at: ar 8, 1993 Sr: a Q ol aro Prorty Sar Trs - Part 1 trouto t last ltur, w loo at trval trs. or trval pot losur prols, ty us lar spa a optal

More information

A Simple Method for Identifying Compelled Edges in DAGs

A Simple Method for Identifying Compelled Edges in DAGs A Smpl Mto or Intyn Compll Es n DAGs S.K.M. Won n D. Wu Dprtmnt o Computr Sn Unvrsty o Rn Rn Ssktwn Cn S4S 0A2 Eml: {won, nwu}@s.urn. Astrt Intyn ompll s s mportnt n lrnn t strutur (.., t DAG) o Bysn ntwork.

More information

a ( b ) ( a ) a ( c ) ( d )

a ( b ) ( a ) a ( c ) ( d ) Lzy Complton o Prtl Orr to t Smllst Ltt Krll Brtt 1, Ml Morvn 1, Lour Nourn 2 1 LITP/IBP - Unvrst Dns Drot Prs 7 Cs 7014 2, pl Jussu 75256 Prs Cx 05 Frn. ml: (rtt,morvn)@ltp.p.r. 2 Dprtmnt 'Inormtqu Fonmntl

More information

Data-Parallel Primitives for Spatial Operations Using PM. Quadtrees* primitives that are used to construct the data. concluding remarks.

Data-Parallel Primitives for Spatial Operations Using PM. Quadtrees* primitives that are used to construct the data. concluding remarks. Dt-rlll rmtvs or Sptl Oprtons Usn M Qutrs* Erk G. Hol Hnn Smt Computr Sn Dprtmnt Computr Sn Dprtmnt Cntr or Automton Rsr Cntr or Automton Rsr Insttut or Avn Computr Sns Insttut or Avn Computr Sns Unvrsty

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

One-Dimensional Computational Topology

One-Dimensional Computational Topology Wr rltn so n Stz: Dnn un nur nn, wnn s Sm s Grpn I) ur nn Umsltunsoprton U n BZ-R lrt, II) ur Umrunsoprton wr us r BZ-R ntstt, stllt s Sm nn u r Kullä rlsrrn Grpn r. Dmt st n Gusss Prolm ür n llmnstn Grpn

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

CS September 2018

CS September 2018 Loil los Distriut Systms 06. Loil los Assin squn numrs to msss All ooprtin prosss n r on orr o vnts vs. physil los: rport tim o y Assum no ntrl tim sour Eh systm mintins its own lol lo No totl orrin o

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

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp CSE 373 Grphs 1: Conpts, Dpth/Brth-First Srh ring: Wiss Ch. 9 slis rt y Mrty Stpp http://www.s.wshington.u/373/ Univrsity o Wshington, ll rights rsrv. 1 Wht is grph? 56 Tokyo Sttl Soul 128 16 30 181 140

More information

Problem solving by search

Problem solving by search Prolm solving y srh Tomáš voo Dprtmnt o Cyrntis, Vision or Roots n Autonomous ystms Mrh 5, 208 / 3 Outlin rh prolm. tt sp grphs. rh trs. trtgis, whih tr rnhs to hoos? trtgy/algorithm proprtis? Progrmming

More information

Constructive Geometric Constraint Solving

Constructive Geometric Constraint Solving Construtiv Gomtri Constrint Solving Antoni Soto i Rir Dprtmnt Llngutgs i Sistms Inormàtis Univrsitt Politèni Ctluny Brlon, Sptmr 2002 CGCS p.1/37 Prliminris CGCS p.2/37 Gomtri onstrint prolm C 2 D L BC

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

Shortest Paths in Graphs. Paths in graphs. Shortest paths CS 445. Alon Efrat Slides courtesy of Erik Demaine and Carola Wenk

Shortest Paths in Graphs. Paths in graphs. Shortest paths CS 445. Alon Efrat Slides courtesy of Erik Demaine and Carola Wenk S 445 Shortst Paths n Graphs lon frat Sls courtsy of rk man an arola Wnk Paths n raphs onsr a raph G = (V, ) wth -wht functon w : R. Th wht of path p = v v v k s fn to xampl: k = w ( p) = w( v, v + ).

More information

( ) ( ) ( ) 0. Conservation of Energy & Poynting Theorem. From Maxwell s equations we have. M t. From above it can be shown (HW)

( ) ( ) ( ) 0. Conservation of Energy & Poynting Theorem. From Maxwell s equations we have. M t. From above it can be shown (HW) 8 Conson o n & Ponn To Fo wll s quons w D B σ σ Fo bo n b sown (W) o s W w bo on o s l us n su su ul ow ns [W/ ] [W] su P su B W W 4 444 s W A A s V A A : W W R o n o so n n: [/s W] W W 4 44 9 W : W F

More information

Graphs Breadth First Search

Graphs Breadth First Search Grp Brdt Frt Sr SFO ORD LAX DFW - 1 - Outo Ø By undrtndn t tur, you oud to: q L rp ordn to t ordr n w vrt r dovrd n rdt-rt r. q Idnty t urrnt tt o rdt-rt r n tr o vrt tt r prvouy dovrd, ut dovrd or undovrd.

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

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

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

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

Planar Upward Drawings

Planar Upward Drawings C.S. 252 Pro. Rorto Tmssi Computtionl Gomtry Sm. II, 1992 1993 Dt: My 3, 1993 Sri: Shmsi Moussvi Plnr Upwr Drwings 1 Thorm: G is yli i n only i it hs upwr rwing. Proo: 1. An upwr rwing is yli. Follow th

More information

Copyright 2000, Kevin Wayne 1

Copyright 2000, Kevin Wayne 1 Chptr. Intrvl Shulng Gry Algorthms Sls y Kvn Wyn. Copyrght 005 Prson-Ason Wsly. All rghts rsrv. Intrvl Shulng Intrvl Shulng: Gry Algorthms Intrvl shulng. Jo strts t s n fnshs t f. Two os omptl f thy on't

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

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

OpenMx Matrices and Operators

OpenMx Matrices and Operators OpnMx Mtris n Oprtors Sr Mln Mtris: t uilin loks Mny typs? Dnots r lmnt mxmtrix( typ= Zro", nrow=, nol=, nm="" ) mxmtrix( typ= Unit", nrow=, nol=, nm="" ) mxmtrix( typ= Int", nrow=, nol=, nm="" ) mxmtrix(

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

Sheet Title: Building Renderings M. AS SHOWN Status: A.R.H.P.B. SUBMITTAL August 9, :07 pm

Sheet Title: Building Renderings M. AS SHOWN Status: A.R.H.P.B. SUBMITTAL August 9, :07 pm 1 2 3 4 5 6 7 8 9 1 11 12 13 14 15 16 17 18 19 orthstar expressly reserves its common law copyright and other property rights for all ideas, provisions and plans represented or indicated by these drawings,

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

Fun sheet matching: towards automatic block decomposition for hexahedral meshes

Fun sheet matching: towards automatic block decomposition for hexahedral meshes DOI 10.1007/s00366-010-0207-5 ORIGINAL ARTICLE Fun st mtn: towrs utomt lok omposton or xrl mss Nols Kowlsk Frnk Loux Mttw L. Sttn Stv J. Own Rv: 19 Frury 2010 / Apt: 22 Dmr 2010 Ó Sprnr-Vrl Lonon Lmt 2011

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

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)} Introution Computr Sin & Enginring 423/823 Dsign n Anlysis of Algorithms Ltur 03 Elmntry Grph Algorithms (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) I Grphs r strt t typs tht r pplil to numrous

More information

PRECAST APPROACH SLAB NOTES

PRECAST APPROACH SLAB NOTES ULNS TS ULN RWNS RPRSNT TYPL TLS OR T SN N TLN O PRST PPRO SLS. TS STS R NLU TO PROV N XMPL O T RTN LYOUT O TYPL PRST PPRO SL. TWO RNT PPRO SL SYSTMS R SOWN: SUR PPRO SLS: SLS TT R PL WT T TOP SUR T OR

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

Designing A Concrete Arch Bridge

Designing A Concrete Arch Bridge This is th mous Shwnh ri in Switzrln, sin y Rort Millrt in 1933. It spns 37.4 mtrs (122 t) n ws sin usin th sm rphil mths tht will monstrt in this lsson. To pro with this lsson, lik on th Nxt utton hr

More information