Minimum Spanning Trees
|
|
- Elfrieda Ashlynn Moody
- 5 years ago
- Views:
Transcription
1 Minimum Spnning Trs
2 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: 1. Evryon stys connctd: cn rch vry hous from ll othr houss, nd. Totl rpir cost is minimum 11 b c d i 6 1 h g f 1
3 Minimum Spnning Trs A connctd, undirctd grph: Vrtics = houss, Edgs = rods A wight w(u, v) on ch dg (u, v) E Find T E such tht: 1. T conncts ll vrtics. w(t) = Σ (u,v) T w(u, v) is minimizd b c d 11 i 1 h 1 g f 3
4 Minimum Spnning Trs T forms tr = spnning tr A spnning tr whos wight is minimum ovr ll spnning trs is clld minimum spnning tr, or MST. b c d 11 i 1 g 1 g f
5 Proprtis of Minimum Spnning Trs Minimum spnning trs r not uniqu Cn rplc (b, c) with (, h) to obtin diffrnt spnning tr with th sm cost MST hv no cycls W cn tk out n dg of cycl, nd still hv th vrtics connctd whil rducing th cost b c d 11 i 1 h 1 g f # of dgs in MST: V - 1 5
6 Growing MST Minimum-spnning-tr problm: find MST for connctd, undirctd grph, with wight function ssocitd with its dgs A gnric solution: Build st A of dgs (initilly mpty) Incrmntlly dd dgs to A such tht thy would blong to MST An dg (u, v) is sf for A if nd only if A {(u, v)} is lso subst of som MST 11 b c d i 6 1 h g f 1 W will dd only sf dgs 6
7 Gnric MST lgorithm 1. A. whil A is not spnning tr 3. do find n dg (u, v) tht is sf for A. A A {(u, v)} 5. rturn A How do w find sf dgs? b c d 11 i 1 h 1 g f
8 Finding Sf Edgs Lt s look t dg (h, g) Is it sf for A initilly? Ltr on: S b c d 11 i 1 h 1 g f V - S Lt S V b ny st of vrtics tht includs h but not g (so tht g is in V - S) In ny MST, thr hs to b on dg (t lst) tht conncts S with V - S Why not choos th dg with minimum wight (h,g)?
9 Dfinitions A cut (S, V - S) is prtition of vrtics into disjoint sts S nd V - S An dg crosss th cut b c d S 11 i 1 S V- S V- S h g f 1 (S, V - S) if on ndpoint is in S nd th othr in V S A cut rspcts st A of dgs no dg in A crosss th cut An dg is light dg crossing cut its wight is minimum ovr ll dgs crossing th cut For givn cut, thr cn b > 1 light dg crossing it
10 Thorm Lt A b subst of som MST, (S, V - S) b cut tht rspcts A, nd (u, v) b light dg crossing (S, V - S). Thn (u, v) is sf for A. Proof: Lt T b MST tht includs A Edgs in A r shdd Assum T dos not includ th dg (u, v) Id: construct nothr MST T tht includs A {(u, v)} u v S V - S
11 Thorm - Proof T contins uniqu pth p btwn u nd v (u, v) forms cycl with dgs on p S (u, v) crosss th cut pth p x must cross th cut (S, V - S) t lst onc: lt (x, y) b tht dg Lt s rmov (x, y) brks T into two componnts. u v p V - S y Adding (u, v) rconncts th componnts T = T - {(x, y)} {(u, v)} 11
12 Thorm Proof (cont.) T = T - {(x, y)} {(u, v)} Hv to show tht T is MST: S (u, v) is light dg w(u, v) w(x, y) w(t ) = w(t) - w(x, y) + w(u, v) w(t) Sinc T is spnning tr u v p x V - S y w(t) w(t ) T must b n MST s wll 1
13 Thorm Proof (cont.) Nd to show tht (u, v) is sf for A: i.., (u, v) cn b prt of MST A T nd (x, y) A A T S x A {(u, v)} T Sinc T is n MST u p y (u, v) is sf for A v V - S 13
14 Discussion In GENERIC-MST: A is forst contining connctd componnts Initilly, ch componnt is singl vrtx Any sf dg mrgs two of ths componnts into on Ech componnt is tr Sinc n MST hs xctly V - 1 dgs - ftr itrting V - 1 tims, w hv only on componnt 1
15 Th Algorithm of Kruskl Strt with ch vrtx bing its own componnt Rptdly mrg two componnts into on by choosing th light dg tht conncts thm 11 b c d i 6 1 h g f 1 W would dd dg (c, f) Scn th st of dgs in monotoniclly incrsing ordr by wight Uss disjoint-st dt structur to dtrmin whthr n dg conncts vrtics in diffrnt componnts 15
16 Oprtions on Disjoint Dt Sts MAKE-SET(u) crts nw st whos only mmbr is u FIND-SET(u) rturns rprsnttiv lmnt from th st tht contins u My b ny of th lmnts of th st tht hs prticulr proprty E.g.: S u = {r, s, t, u}, th proprty is tht th lmnt b th first on lphbticlly FIND-SET(u) = r FIND-SET(s) = r FIND-SET hs to rturn th sm vlu for givn st 16
17 Oprtions on Disjoint Dt Sts UNION(u, v) units th dynmic sts tht contin u nd v, sy S u nd S v E.g.: S u = {r, s, t, u}, S v = {v, x, y} UNION (u, v) = {r, s, t, u, v, x, y} 1
18 KRUSKAL(V, E, w) 1. A. for ch vrtx v V 3. do MAKE-SET(v). sort E into non-dcrsing ordr by wight w 5. for ch (u, v) tkn from th sortd list 6. do if FIND-SET(u) FIND-SET(v). thn A A {(u, v)}. UNION(u, v). rturn A Running tim: O(E lgv) dpndnt on th implmnttion of th disjoint-st dt structur 1
19 Exmpl 11 1: (h, g) b c d : (c, i), (g, f) : (, b), (c, f) 6: (i, g) : (c, d), (i, h) i 6 1 h g f 1 : (, h), (b, c) : (d, ) : (, f) 11: (b, h) 1: (d, f) {}, {b}, {c}, {d}, {}, {f}, {g}, {h}, {i} 1. Add (h, g). Add (c, i) 3. Add (g, f). Add (, b) 5. Add (c, f) 6. Ignor (i, g). Add (c, d). Ignor (i, h). Add (, h). Ignor (b, c) 11. Add (d, ) 1. Ignor (, f) 13. Ignor (b, h) 1. Ignor (d, f) {g, h}, {}, {b}, {c}, {d}, {}, {f}, {i} {g, h}, {c, i}, {}, {b}, {d}, {}, {f} {g, h, f}, {c, i}, {}, {b}, {d}, {} {g, h, f}, {c, i}, {, b}, {d}, {} {g, h, f, c, i}, {, b}, {d}, {} {g, h, f, c, i}, {, b}, {d}, {} {g, h, f, c, i, d}, {, b}, {} {g, h, f, c, i, d}, {, b}, {} {g, h, f, c, i, d,, b}, {} {g, h, f, c, i, d,, b}, {} {g, h, f, c, i, d,, b, } {g, h, f, c, i, d,, b, } {g, h, f, c, i, d,, b, } {g, h, f, c, i, d,, b, } 1
20 Th lgorithm of Prim Th dgs in st A lwys form singl tr Strts from n rbitrry root : V A = {} At ch stp: Find light dg crossing cut (V A, V - V A ) Add this dg to A Rpt until th tr spns ll vrtics Grdy strtgy b c d 11 i 1 h 1 g f At ch stp th dg ddd contributs th minimum mount possibl to th wight of th tr 0
21 How to Find Light Edgs Quickly? Us priority quu Q: Contins ll vrtics not yt includd in th tr (V V A ) V = {}, Q = {b, c, d,, f, g, h, i} With ch vrtx w ssocit ky: b c d 11 i 1 h g f 1 ky[v] = minimum wight of ny dg (u, v) conncting v to vrtx in th tr Ky of v is if v is not djcnt to ny vrtics in V A Aftr dding nw nod to V A w updt th wights of ll th nods djcnt to it W ddd nod ky[b] =, ky[h] = 1
22 PRIM(V, E, w, r) 1. Q b c d. for ch u V 0 3. do ky[u] 11 i 1. π[u] NIL 5. INSERT(Q, u) h g f 1 6. DECREASE-KEY(Q, r, 0) 0. whil Q Q = {, b, c, d,, f, g, h, i}. do u EXTRACT-MIN(Q) V A =. for ch v Adj[u] Extrct-MIN(Q). do if v Q nd w(u, v) < ky[v] 11. thn π[v] u 1. DECREASE-KEY(Q, v, w(u, v))
23 Exmpl b c d 11 i 1 h g f 1 0 Q = {, b, c, d,, f, g, h, i} V A = Extrct-MIN(Q) b c d 11 i 1 h g f 1 ky [b] = π [b] = ky [h] = π [h] = Q = {b, c, d,, f, g, h, i} V A = {} Extrct-MIN(Q) b 3
24 Exmpl b c d 11 i 1 h g f 1 b c d 11 i 1 h g f 1 ky [c] = π [c] = b ky [h] = π [h] = - unchngd Q = {c, d,, f, g, h, i} V A = {, b} Extrct-MIN(Q) c ky [d] = π [d] = c ky [f] = π [f] = c ky [i] = π [i] = c Q = {d,, f, g, h, i} V A = {, b, c} Extrct-MIN(Q) i
25 Exmpl b c d 11 i 1 h g f 1 b c d 11 i 1 h 1 g f ky [h] = π [h] = i ky [g] = 6 π [g] = i Q = {d,, f, g, h} V A = {, b, c, i} Extrct-MIN(Q) f ky [g] = π [g] = f ky [d] = π [d] = c unchngd ky [] = π [] = f Q = {d,, g, h} V A = {, b, c, i, f} Extrct-MIN(Q) g 5
26 Exmpl b c d 11 i 1 h 1 g f 1 b c d 11 i 1 h 1 g f 1 ky [h] = 1 π [h] = g 1 Q = {d,, h} V A = {, b, c, i, f, g} Extrct-MIN(Q) h Q = {d, } V A = {, b, c, i, f, g, h} Extrct-MIN(Q) d 6
27 Exmpl b c d 11 i 1 h 1 g f 1 ky [] = π [] = f Q = {} V A = {, b, c, i, f, g, h, d} Extrct-MIN(Q) Q = V A = {, b, c, i, f, g, h, d, }
28 PRIM(V, E, w, r) 1. Q. for ch u V 3. do ky[u]. π[u] NIL 5. INSERT(Q, u) 6. DECREASE-KEY(Q, r, 0) ky[r] 0. whil Q. do u EXTRACT-MIN(Q). for ch v Adj[u]. do if v Q nd w(u, v) < ky[v] 11. thn π[v] u Totl tim: O(VlgV + ElgV) = O(ElgV) O(V) if Q is implmntd s min-hp Excutd V tims Tks O(lgV) Excutd O(E) tims Constnt 1. DECREASE-KEY(Q, v, w(u, v)) Min-hp oprtions: O(VlgV) Tks O(lgV) O(ElgV)
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 informationCOMP108 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 informationPreview. Graph. Graph. Graph. Graph Representation. Graph Representation 12/3/2018. Graph Graph Representation Graph Search Algorithms
/3/0 Prvw Grph Grph Rprsntton Grph Srch Algorthms Brdth Frst Srch Corrctnss of BFS Dpth Frst Srch Mnmum Spnnng Tr Kruskl s lgorthm Grph Drctd grph (or dgrph) G = (V, E) V: St of vrt (nod) E: St of dgs
More informationSpanning Tree. Preview. Minimum Spanning Tree. Minimum Spanning Tree. Minimum Spanning Tree. Minimum Spanning Tree 10/17/2017.
0//0 Prvw Spnnng Tr Spnnng Tr Mnmum Spnnng Tr Kruskl s Algorthm Prm s Algorthm Corrctnss of Kruskl s Algorthm A spnnng tr T of connctd, undrctd grph G s tr composd of ll th vrtcs nd som (or prhps ll) of
More informationAn 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 informationFSA. 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 informationOutline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)
4/25/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 2 Eulr s rig prolm
More information12/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 information5/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 informationCS 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 informationCSC 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 informationWeighted 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 informationOutline. 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 informationPaths. 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 informationCh 1.2: Solutions of Some Differential Equations
Ch 1.2: Solutions of Som Diffrntil Equtions Rcll th fr fll nd owl/mic diffrntil qutions: v 9.8.2v, p.5 p 45 Ths qutions hv th gnrl form y' = y - b W cn us mthods of clculus to solv diffrntil qutions of
More informationSearching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list.
3 3 4 8 6 3 3 4 8 6 3 3 4 8 6 () (d) 3 Sarching Linkd Lists Sarching Linkd Lists Sarching Linkd Lists ssum th list is sortd, but is stord in a linkd list. an w us binary sarch? omparisons? Work? What if
More informationOutline. 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 informationWeek 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 informationIntegration 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 informationWeighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths
Dt Strutur LECTURE Shortt pth lgorithm Proprti of hortt pth Bllmn-For lgorithm Dijktr lgorithm Chptr in th txtook (pp ). Wight grph -- rminr A wight grph i grph in whih g hv wight (ot) w(v i, v j ) >.
More informationV={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 informationCSE 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 informationStrongly Connected Components
Strongly Connctd Componnts Lt G = (V, E) b a dirctd graph Writ if thr is a path from to in G Writ if and is an quivalnc rlation: implis and implis s quivalnc classs ar calld th strongly connctd componnts
More informationCycles 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 informationBasic 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 informationV={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}
s s of s Computr Sin & Enginring 423/823 Dsign n Anlysis of Ltur 03 (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) s of s s r strt t typs tht r pplil to numrous prolms Cn ptur ntitis, rltionships twn
More informationb. 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 informationTOPIC 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 informationINTEGRALS. 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 informationMath 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 informationWalk 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 informationCS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:
CS2: Grphs Prihr Ch. 4 Rosn Ch. Grphs A olltion of nos n gs Wht n this rprsnt? n A omputr ntwork n Astrtion of mp n Soil ntwork CS2 - Hsh Tls 2 Dirt Grphs Grphs/Ntworks Aroun Us A olltion of nos n irt
More informationThe Equitable Dominating Graph
Intrnational Journal of Enginring Rsarch and Tchnology. ISSN 0974-3154 Volum 8, Numbr 1 (015), pp. 35-4 Intrnational Rsarch Publication Hous http://www.irphous.com Th Equitabl Dominating Graph P.N. Vinay
More informationCSI35 Chapter 11 Review
1. Which of th grphs r trs? c f c g f c x y f z p q r 1 1. Which of th grphs r trs? c f c g f c x y f z p q r . Answr th qustions out th following tr 1) Which vrtx is th root of c th tr? ) wht is th hight
More informationLecture 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 informationCSE303 - 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 informationGraph 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 informationOn spanning trees and cycles of multicolored point sets with few intersections
On spanning trs and cycls of multicolord point sts with fw intrsctions M. Kano, C. Mrino, and J. Urrutia April, 00 Abstract Lt P 1,..., P k b a collction of disjoint point sts in R in gnral position. W
More informationLecture 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 information4.5 Minimum Spanning Tree. Chapter 4. Greedy Algorithms. Minimum Spanning Tree. Applications
Chaptr. Minimum panning Tr Grdy Algorithms lids by Kvin Wayn. Copyright 200 Parson-Addison Wsly. All rights rsrvd. Minimum panning Tr Applications Minimum spanning tr. Givn a connctd graph G = (V, E) with
More information13. Binary tree, height 4, eight terminal vertices 14. Full binary tree, seven vertices v 7 v13. v 19
0. Spnning Trs n Shortst Pths 0. Consir th tr shown blow with root v 0.. Wht is th lvl of v 8? b. Wht is th lvl of v 0? c. Wht is th hight of this root tr?. Wht r th chilrn of v 0?. Wht is th prnt of v
More informationExamples and applications on SSSP and MST
Exampls an applications on SSSP an MST Dan (Doris) H & Junhao Gan ITEE Univrsity of Qunslan COMP3506/7505, Uni of Qunslan Exampls an applications on SSSP an MST Dijkstra s Algorithm Th algorithm solvs
More information1 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 informationcycle 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 informationCSE 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 informationConstructive 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 informationSection 3: Antiderivatives of Formulas
Chptr Th Intgrl Appli Clculus 96 Sction : Antirivtivs of Formuls Now w cn put th is of rs n ntirivtivs togthr to gt wy of vluting finit intgrls tht is ct n oftn sy. To vlut finit intgrl f(t) t, w cn fin
More informationGraphs. 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 informationGraphs. 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 information4.5 Minimum Spanning Tree. Chapter 4. Greedy Algorithms. Minimum Spanning Tree. Motivating application
1 Chaptr. Minimum panning Tr lids by Kvin Wayn. Copyright 200 Parson-Addison Wsly. All rights rsrvd. *Adjustd by Gang Tan for C33: Algorithms at Boston Collg, Fall 0 Motivating application Minimum panning
More informationCSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review
rmup CSE 7: AVL trs rmup: ht is n invrint? Mihl L Friy, Jn 9, 0 ht r th AVL tr invrints, xtly? Disuss with your nighor. AVL Trs: Invrints Intrlu: Exploring th ln invrint Cor i: xtr invrint to BSTs tht
More informationa 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 information1.2. Linear Variable Coefficient Equations. y + b "! = a y + b " Remark: The case b = 0 and a non-constant can be solved with the same idea as above.
1 12 Liner Vrible Coefficient Equtions Section Objective(s): Review: Constnt Coefficient Equtions Solving Vrible Coefficient Equtions The Integrting Fctor Method The Bernoulli Eqution 121 Review: Constnt
More informationExam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013
CS Avn Dt Struturs n Algorithms Exm Solution Jon Turnr //. ( points) Suppos you r givn grph G=(V,E) with g wights w() n minimum spnning tr T o G. Now, suppos nw g {u,v} is to G. Dsri (in wors) mtho or
More informationWhy the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.
Why th Juntion Tr lgorithm? Th Juntion Tr lgorithm hris Willims 1 Shool of Informtis, Univrsity of Einurgh Otor 2009 Th JT is gnrl-purpos lgorithm for omputing (onitionl) mrginls on grphs. It os this y
More informationLinear 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 informationRiemann Sums and Riemann Integrals
Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 2013 Outline 1 Riemnn Sums 2 Riemnn Integrls 3 Properties
More informationCONTINUITY AND DIFFERENTIABILITY
MCD CONTINUITY AND DIFFERENTIABILITY NCERT Solvd mpls upto th sction 5 (Introduction) nd 5 (Continuity) : Empl : Chck th continuity of th function f givn by f() = + t = Empl : Emin whthr th function f
More informationLast 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 informationRiemann Sums and Riemann Integrals
Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 203 Outline Riemnn Sums Riemnn Integrls Properties Abstrct
More information, between the vertical lines x a and x b. Given a demand curve, having price as a function of quantity, p f (x) at height k is the curve f ( x,
Clculus for Businss nd Socil Scincs - Prof D Yun Finl Em Rviw vrsion 5/9/7 Chck wbsit for ny postd typos nd updts Pls rport ny typos This rviw sht contins summris of nw topics only (This rviw sht dos hv
More informationConnected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs
Prm University, Mth. Deprtment Summry of lecture 9 Algorithms nd Dt Structures Disjoint sets Summry of this lecture: (CLR.1-3) Dt Structures for Disjoint sets: Union opertion Find opertion Mrco Pellegrini
More information1 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 informationChapter 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 informationAlgorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph
Intrntionl J.Mth. Comin. Vol.1(2014), 80-86 Algorithmi n NP-Compltnss Aspts of Totl Lit Domintion Numr of Grph Girish.V.R. (PES Institut of Thnology(South Cmpus), Bnglor, Krntk Stt, Ini) P.Ush (Dprtmnt
More informationCS 241 Analysis of Algorithms
CS 241 Anlysis o Algorithms Prossor Eri Aron Ltur T Th 9:00m Ltur Mting Lotion: OLB 205 Businss HW6 u lry HW7 out tr Thnksgiving Ring: Ch. 22.1-22.3 1 Grphs (S S. B.4) Grphs ommonly rprsnt onntions mong
More informationInstructions 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 informationAbstract Interpretation: concrete and abstract semantics
Abstract Intrprtation: concrt and abstract smantics Concrt smantics W considr a vry tiny languag that manags arithmtic oprations on intgrs valus. Th (concrt) smantics of th languags cab b dfind by th funzcion
More informationCS 253: Algorithms. Chapter 24. Shortest Paths. Credit: Dr. George Bebis
CS : Algorithms Chapter 4 Shortest Paths Credit: Dr. George Bebis Shortest Path Problems How can we find the shortest route between two points on a road map? Model the problem as a graph problem: Road
More informationAnalysis of Algorithms - Elementary graphs algorithms -
Analysis of Algorithms - Elmntary graphs algorithms - Anras Ermahl MRTC (Mälaralns Ral-Tim Rsach Cntr) anras.rmahl@mh.s Autumn 00 Graphs Graphs ar important mathmatical ntitis in computr scinc an nginring
More information10. EXTENDING TRACTABILITY
Coping with NP-compltnss 0. EXTENDING TRACTABILITY ining small vrtx covrs solving NP-har problms on trs circular arc covrings vrtx covr in bipartit graphs Q. Suppos I n to solv an NP-complt problm. What
More informationDFA (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 informationpriority queue ADT heaps 1
COMP 250 Lctur 23 priority quu ADT haps 1 Nov. 1/2, 2017 1 Priority Quu Li a quu, but now w hav a mor gnral dinition o which lmnt to rmov nxt, namly th on with highst priority..g. hospital mrgncy room
More information(a) v 1. v a. v i. v s. (b)
Outlin RETIMING Struturl optimiztion mthods. Gionni D Mihli Stnford Unirsity Rtiming. { Modling. { Rtiming for minimum dly. { Rtiming for minimum r. Synhronous Logi Ntwork Synhronous Logi Ntwork Synhronous
More information, 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 informationProblem 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 informationAnalysis of Algorithms - Elementary graphs algorithms -
Analysis of Algorithms - Elmntary graphs algorithms - Anras Ermahl MRTC (Mälaralns Ral-Tim Rsarch Cntr) anras.rmahl@mh.s Autumn 004 Graphs Graphs ar important mathmatical ntitis in computr scinc an nginring
More informationME 522 PRINCIPLES OF ROBOTICS. FIRST MIDTERM EXAMINATION April 19, M. Kemal Özgören
ME 522 PINCIPLES OF OBOTICS FIST MIDTEM EXAMINATION April 9, 202 Nm Lst Nm M. Kml Özgörn 2 4 60 40 40 0 80 250 USEFUL FOMULAS cos( ) cos cos sin sin sin( ) sin cos cos sin sin y/ r, cos x/ r, r 0 tn 2(
More informationCIVL 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 informationLinked-List Implementation. Linked-lists for two sets. Multiple Operations. UNION Implementation. An Application of Disjoint-Set 1/9/2014
Disjoint Sts Data Strutur (Chap. 21) A disjoint-st is a olltion ={S 1, S 2,, S k } o distint dynami sts. Eah st is idntiid by a mmbr o th st, alld rprsntativ. Disjoint st oprations: MAKE-SET(x): rat a
More informationThis Week. Computer Graphics. Introduction. Introduction. Graphics Maths by Example. Graphics Maths by Example
This Wk Computr Grphics Vctors nd Oprtions Vctor Arithmtic Gomtric Concpts Points, Lins nd Plns Eploiting Dot Products CSC 470 Computr Grphics 1 CSC 470 Computr Grphics 2 Introduction Introduction Wh do
More informationLecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)
Lecture 3 (5.3.2018) (trnslted nd slightly dpted from lecture notes by Mrtin Klzr) Riemnn integrl Now we define precisely the concept of the re, in prticulr, the re of figure U(, b, f) under the grph of
More information5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem
Thorm 10-1: Th Hnshkin Thorm Lt G=(V,E) n unirt rph. Thn Prt 10. Grphs CS 200 Alorithms n Dt Struturs v V (v) = 2 E How mny s r thr in rph with 10 vrtis h of r six? 10 * 6 /2= 30 1 Thorm 10-2 An unirt
More informationCS 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 informationCS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12
Aministrivi: CS61B Ltur #33 Autogrr will run this vning. Toy s Rings: Grph Struturs: DSIJ, Chptr 12 Lst moifi: W Nov 8 00:39:28 2017 CS61B: Ltur #33 1 Why Grphs? For xprssing non-hirrhilly rlt itms Exmpls:
More informationOutlines: Graphs Part-4. Applications of Depth-First Search. Directed Acyclic Graph (DAG) Generic scheduling problem.
Outlins: Graps Part-4 Applications o DFS Elmntary Grap Aloritms Topoloical Sort o Dirctd Acyclic Grap Stronly Connctd Componnts PART-4 1 2 Applications o Dpt-First Sarc Topoloical Sort: Usin dpt-irst sarc
More informationECE 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 information1 The Riemann Integral
The Riemnn Integrl. An exmple leding to the notion of integrl (res) We know how to find (i.e. define) the re of rectngle (bse height), tringle ( (sum of res of tringles). But how do we find/define n re
More informationWe partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.
Mth 255 - Vector lculus II Notes 4.2 Pth nd Line Integrls We begin with discussion of pth integrls (the book clls them sclr line integrls). We will do this for function of two vribles, but these ides cn
More informationEngineering 323 Beautiful HW #13 Page 1 of 6 Brown Problem 5-12
Enginring Bautiful HW #1 Pag 1 of 6 5.1 Two componnts of a minicomputr hav th following joint pdf for thir usful liftims X and Y: = x(1+ x and y othrwis a. What is th probability that th liftim X of th
More informationModule 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 informationCase Study VI Answers PHA 5127 Fall 2006
Qustion. A ptint is givn 250 mg immit-rls thophyllin tblt (Tblt A). A wk ltr, th sm ptint is givn 250 mg sustin-rls thophyllin tblt (Tblt B). Th tblts follow on-comprtmntl mol n hv first-orr bsorption
More informationCPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming
CPSC 665 : An Algorithmist s Toolkit Lctur 4 : 21 Jan 2015 Lcturr: Sushant Sachdva Linar Programming Scrib: Rasmus Kyng 1. Introduction An optimization problm rquirs us to find th minimum or maximum) of
More informationPropositional 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 informationAnnouncements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms
Grphs & Grph Algorithms Ltur CS Fll 5 Announmnts Upoming tlk h Mny Crrs o Computr Sintist Or how Computr Sin gr mpowrs you to o muh mor thn o Dn Huttnlohr, Prossor in th Dprtmnt o Computr Sin n Johnson
More informationCombinatorial 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 informationA general N-dimensional vector consists of N values. They can be arranged as a column or a row and can be real or complex.
Lnr lgr Vctors gnrl -dmnsonl ctor conssts of lus h cn rrngd s column or row nd cn rl or compl Rcll -dmnsonl ctor cn rprsnt poston, loct, or cclrton Lt & k,, unt ctors long,, & rspctl nd lt k h th componnts
More informationWinter 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 informationConvert 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 informationGreedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016
Ltur 4 Gry Algorithms, Ativity Sltion, Minimum Spnning Trs Sris: Logn Short (5), Virgini Dt: My, Gry Algorithms Suppos w wnt to solv prolm, n w r l to om up with som rursiv ormultion o th prolm tht woul
More information