7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM
|
|
- Priscilla Stevens
- 6 years ago
- Views:
Transcription
1 7. NETWORK FLOW I max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework Lecure lide by Kevin Wayne Copyrigh 2005 Pearon-Addion Weley hp:// La updaed on 11/22/17 6:11 AM
2 7. NETWORK FLOW I SECTION 7.1 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
3 Flow nework A flow nework i a uple G = (V, E,,, c). Digraph (V, E) wih ource V and ink V. Non-negaive capaciy c(e) for each e E. Inuiion. Maerial flowing hrough a ranporaion nework; maerial originae a ource and i en o ink. capaciy
4 Minimum-cu problem Def. An -cu (cu) i a pariion (A, B) of he verice wih A and B. Def. I capaciy i he um of he capaciie of he edge from A o B. cap(a, B) = e A c(e) capaciy = = 30 4
5 Minimum-cu problem Def. An -cu (cu) i a pariion (A, B) of he verice wih A and B. Def. I capaciy i he um of he capaciie of he edge from A o B. cap(a, B) = e A c(e) 10 8 don include edge from B o A capaciy = =
6 Minimum-cu problem Def. An -cu (cu) i a pariion (A, B) of he verice wih A and B. Def. I capaciy i he um of he capaciie of he edge from A o B. cap(a, B) = c(e) e A Min-cu problem. Find a cu of minimum capaciy capaciy = = 28 6
7 v Maximum-flow problem Def. An -flow (flow) f i a funcion ha aifie: For each e E : 0 f(e) c(e) [capaciy] For each v V {, } : f(e) = f(e) [flow conervaion] e v e v flow capaciy inflow a v = = 10 5 / 9 ouflow a v = = / 10 0 / 4 5 / 15 0 / 15 5 / 10 5 / 5 5 / 8 10 / / 15 0 / 4 0 / 6 0 / / / 16 7
8 Maximum-flow problem Def. An -flow (flow) f i a funcion ha aifie: For each e E : 0 f(e) c(e) [capaciy] For each v V {, } : f(e) = f(e) [flow conervaion] e v e v Def. The value of a flow f i: val(f) = f(e) f(e) e e 5 / 9 10 / 10 0 / 4 5 / 15 0 / 15 5 / 10 5 / 5 5 / 8 10 / / 15 0 / 4 0 / 6 0 / / 10 value = = / 16 8
9 Maximum-flow problem Def. An -flow (flow) f i a funcion ha aifie: For each e E : 0 f(e) c(e) [capaciy] For each v V {, } : f(e) = f(e) [flow conervaion] e v e v Def. The value of a flow f i: val(f) = f(e) f(e) e e Max-flow problem. Find a flow of maximum value. 8 / 9 10 / 10 0 / 4 2 / 15 0 / 15 8 / 10 5 / 5 8 / 8 10 / / 15 0 / 4 3 / 6 0 / / 10 value = = / 16 9
10 7. NETWORK FLOW I SECTION 7.1 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
11 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f flow capaciy 0 / 4 0 / 10 0 / 2 0 / 8 0 / 6 0 / 10 value of flow 0 / 10 0 / 9 0 /
12 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f 0 / / 10 0 / / 8 0 / 6 0 / / 10 0 / 9 0 / = 8 12
13 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f 0 / / / 2 8 / 8 0 / 6 0 / / 10 0 / 9 8 / = 10 13
14 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f 0 / 4 10 / 10 2 / 2 8 / / / / 10 2 / 9 10 / = 16 14
15 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f ending flow value = 16 0 / 4 10 / 10 2 / 2 8 / 8 6 / 6 6 / 10 6 / 10 8 / 9 10 /
16 Toward a max-flow algorihm Greedy algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P where each edge ha f (e) < c(e). Augmen flow along pah P. Repea unil you ge uck. flow nework G and flow f bu max-flow value = 19 3 / 4 10 / 10 0 / 2 7 / 8 6 / 6 9 / 10 9 / 10 9 / 9 10 /
17 Why he greedy algorihm fail Q. Why doe he greedy algorihm fail? A. Once greedy algorihm increae flow on an edge, i never decreae i. Ex. The max flow i unique; flow on edge (v, w) i zero. Greedy algorihm could chooe v w for fir augmening pah. flow nework G v 2 Boom line. Need ome mechanim o undo bad deciion w 17
18 Reidual nework Original edge. e = (u, v) E. Flow f (e). Capaciy c(e). Revere edge. e revere = (v, u). original flow nework G u 6 / 17 flow capaciy v Undo flow en. Reidual capaciy. reidual nework Gf reidual capaciy c f (e) = c(e) f(e) e E f(e) e E u 11 6 v revere edge edge wih poiive reidual capaciy Reidual nework. G f = (V, E f,,, c f ). E f = {e : f (e) < c(e)} {e revere : f (e) > 0}. Key propery: f ʹ i a flow in G f iff f + f ʹ i a flow in G. where flow on a revere edge negae flow on correponding forward edge 18
19 Augmening pah Def. An augmening pah i a imple pah in he reidual nework G f. Def. The boleneck capaciy of an augmening pah P i he minimum reidual capaciy of any edge in P. Key propery. Le f be a flow and le P be an augmening pah in G f. Then, afer calling AUGMENT, he reuling f ʹ i a flow and val( f ʹ ) = val( f ) + boleneck(gf, P). AUGMENT ( f, c, P) b boleneck capaciy of pah P. FOREACH edge e P IF (e E ) f [e] f [e] + b. ELSE f [e revere ] f [e revere ] b. RETURN f. 19
20 Ford Fulkeron algorihm Ford Fulkeron augmening pah algorihm. Sar wih f (e) = 0 for each edge e E. Find an pah P in he reidual nework G f. Augmen flow along pah P. Repea unil you ge uck. FORD FULKERSON (G) FOREACH edge e E : f [e] 0. Gf reidual nework of G wih repec o f. WHILE (here exi an pah P in Gf ) f AUGMENT ( f, c, P). Updae Gf. RETURN f. augmening pah 20
21 7. NETWORK FLOW I Secion 7.2 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
22 Relaionhip beween flow and cu Flow value lemma. Le f be any flow and le (A, B) be any cu. Then, he value of he flow f equal he ne flow acro he cu (A, B). val(f) = e A f(e) e A f(e) ne flow acro cu = = 25 5 / 9 10 / 10 0 / 4 5 / 15 0 / 15 5 / 10 5 / 5 5 / 8 10 / 10 value of flow = / 15 0 / 4 0 / 6 0 / / / 16 22
23 Relaionhip beween flow and cu Flow value lemma. Le f be any flow and le (A, B) be any cu. Then, he value of he flow f equal he ne flow acro he cu (A, B). val(f) = e A f(e) e A f(e) ne flow acro cu = = 25 5 / 9 10 / 10 0 / 4 5 / 15 0 / 15 5 / 10 5 / 5 5 / 8 10 / 10 value of flow = / 15 0 / 4 0 / 6 0 / / / 16 23
24 Relaionhip beween flow and cu Flow value lemma. Le f be any flow and le (A, B) be any cu. Then, he value of he flow f equal he ne flow acro he cu (A, B). val(f) = e A f(e) e A f(e) ne flow acro cu = ( ) ( ) = 25 5 / 9 edge from B o A 10 / 10 0 / 4 5 / 15 0 / 15 5 / 10 5 / 5 5 / 8 10 / 10 value of flow = / 15 0 / 4 0 / 6 0 / / / 16 24
25 Relaionhip beween flow and cu Flow value lemma. Le f be any flow and le (A, B) be any cu. Then, he value of he flow f equal he ne flow acro he cu (A, B). val(f) = f(e) f(e) e A e A Pf. val(f) = f(e) f(e) e e by flow conervaion, all erm excep for v = are 0 = f(e) f(e) v A e v e v = e A f(e) e A f(e) 25
26 Relaionhip beween flow and cu Weak dualiy. Le f be any flow and (A, B) be any cu. Then, val( f ) cap(a, B). Pf. val(f) = f(e) f(e) e A e A flow-value lemma e A f(e) e A c(e) = cap(a, B) 8 / 9 10 / 10 0 / 4 2 / 15 0 / 15 8 / / 5 7 / 8 9 / / 15 0 / 4 2 / 6 0 / / / 16 value of flow = 27 capaciy of cu = 30 26
27 Cerificae of opimaliy Corollary. Le f be a flow and le (A, B) be any cu. If val( f ) = cap(a, B), hen f i a max flow and (A, B) i a min cu. weak dualiy Pf. For any flow f ʹ: val( f ʹ) cap(a, B) = val( f ). For any cu (Aʹ, Bʹ): cap(aʹ, Bʹ) val( f ) = cap(a, B). 8 / 9 10 / 10 0 / 4 2 / 15 0 / 15 8 / / 5 8 / 8 10 / / 15 0 / 4 3 / 6 0 / / / 16 value of flow = 28 = capaciy of cu = 28 27
28 Max-flow min-cu heorem Augmening pah heorem. A flow f i a max flow iff no augmening pah. Max-flow min-cu heorem. Value of a max flow = capaciy of a min cu. Pf. The following hree condiion are equivalen for any flow f : i. There exi a cu (A, B) uch ha cap(a, B) = val( f ). ii. f i a max flow. iii. There i no augmening pah wih repec o f. [ i ii ] Suppoe ha (A, B) i a cu uch ha cap(a, B) = val( f ). Then, for any flow f ʹ: val( f ʹ) cap(a, B) = val( f ). Thu, f i a max flow. weak dualiy by aumpion rong dualiy if Ford Fulkeron erminae, hen f i max flow 28
29 Max-flow min-cu heorem Augmening pah heorem. A flow f i a max flow iff no augmening pah. Max-flow min-cu heorem. Value of a max flow = capaciy of a min cu. Pf. The following hree condiion are equivalen for any flow f : i. There exi a cu (A, B) uch ha cap(a, B) = val( f ). ii. f i a max flow. iii. There i no augmening pah wih repec o f. [ ii iii ] We prove conrapoiive: ~iii ~ii. Suppoe ha here i an augmening pah wih repec o f. Can improve flow f by ending flow along hi pah. Thu, f i no a max flow. 29
30 Max-flow min-cu heorem [ iii i ] Le f be a flow wih no augmening pah. Le A be e of node reachable from in reidual nework Gf. By definiion of cu A: A. By definiion of flow f: A. val(f) = e A f(e) e A f(e) original flow nework G A edge e = (v, w) wih v B, w A mu have f(e) = 0 B flow-value lemma = c(e) e A = cap(a, B) edge e = (v, w) wih v A, w B mu have f(e) = c(e) 30
31 7. NETWORK FLOW I SECTION 7.3 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
32 Analyi of Ford Fulkeron algorihm (when capaciie are inegral) Aumpion. Capaciie are ineger beween 1 and C. Inegraliy invarian. Throughou he algorihm, he flow f (e) and he reidual capaciie c f (e) are ineger. Theorem. The algorihm erminae in a mo val( f *) n C ieraion, where f * i a max flow. Pf. Each augmenaion increae he value of he flow by a lea 1. Corollary. The running ime of Ford Fulkeron i O(m n C). Corollary. If C = 1, he running ime of Ford Fulkeron i O(m n). Inegraliy heorem. Then exi a max flow f * for which every flow f * (e) i an ineger. Pf. Since algorihm erminae, heorem follow from invarian. 32
33 Bad cae for Ford Fulkeron Q. I generic Ford Fulkeron algorihm poly-ime in inpu ize? m, n, and log C A. No. If max capaciy i C, hen algorihm can ake C ieraion. v w w v v w w v v w w v each augmening pah end only 1 uni of flow (# augmening pah = 2C) v C C 1 C C w 33
34 Chooing good augmening pah Ue care when elecing augmening pah. Some choice lead o exponenial algorihm. Clever choice lead o polynomial algorihm. Pahology. If capaciie are irraional, algorihm no guaraneed o erminae (or converge o correc anwer)! Goal. Chooe augmening pah o ha: Can find augmening pah efficienly. Few ieraion. 34
35 Chooing good augmening pah Chooe augmening pah wih: Max boleneck capaciy ( fae ). Sufficienly large boleneck capaciy. Fewe edge. Theoreical Improvemen in Algorihmic Efficiency for Nework Flow Problem JACK EDMONDS Univeriy of Waerloo, Waerloo, Onario, Canada AND RICHARD M. KARP Univeriy of California, Berkeley, California ABSTRACT. Thi paper preen new algorihm for he maximum flow problem, he Hichcock ranporaion problem, and he general minimum-co flow problem. Upper bound on he number of ep in hee algorihm are derived, and are hown o compale favorably wih upper bound on he number of ep required by earlier algorihm. Edmond-Karp 1972 (USA) Diniz 1970 (Sovie Union) invened in repone o a cla exercie by Adel on-vel kiĭ 35
36 Capaciy-caling algorihm Inuiion. Chooe augmening pah wih highe boleneck capaciy: i increae flow by max poible amoun in given ieraion. Don worry abou finding exac highe boleneck pah. Mainain caling parameer Δ. Le G f (Δ) be he par of he reidual nework coniing of only hoe arc wih capaciy Δ Gf Gf (Δ), Δ =
37 Capaciy-caling algorihm CAPACITY-SCALING (G) FOREACH edge e E : f [e] 0. Δ large power of 2 C. WHILE (Δ 1) Gf (Δ) Δ-reidual nework of G wih repec o flow f. WHILE (here exi an pah P in Gf (Δ)) f AUGMENT ( f, c, P). Updae Gf (Δ). Δ Δ / 2. RETURN f. 37
38 Capaciy-caling algorihm: proof of correcne Aumpion. All edge capaciie are ineger beween 1 and C. Inegraliy invarian. All flow and reidual capaciie are inegral. Theorem. If capaciy-caling algorihm erminae, hen f i a max flow. Pf. By inegraliy invarian, when Δ = 1 G f (Δ) = G f. Upon erminaion of Δ = 1 phae, here are no augmening pah. 38
39 Capaciy-caling algorihm: analyi of running ime Lemma 1. The ouer while loop repea 1 + log 2 C ime. Pf. Iniially C / 2 < Δ C; Δ decreae by a facor of 2 in each ieraion. Lemma 2. Le f be he flow a he end of a Δ-caling phae. Then, he max-flow value val( f ) + m Δ. Lemma 3. There are a mo 2m augmenaion per caling phae. Pf. Le f be he flow a he end of he previou caling phae. Lemma 2 max-flow value val( f ) + 2 m Δ. Each augmenaion in a Δ-phae increae val( f ) by a lea Δ. Theorem. The caling max-flow algorihm find a max flow in O(m log C) augmenaion. I can be implemened o run in O(m 2 log C) ime. Pf. Follow from Lemma 1 and Lemma 3. proof on nex lide 39
40 Capaciy-caling algorihm: analyi of running ime Lemma 2. Le f be he flow a he end of a Δ-caling phae. Then, he max-flow value val( f ) + m Δ. Pf. We how here exi a cu (A, B) uch ha cap(a, B) val( f ) + m Δ. Chooe A o be he e of node reachable from in G f (Δ). By definiion of cu A: A. By definiion of flow f: A. original flow nework edge e = (v, w) wih v B, w A mu have f(e) < Δ val(f) = e A f(e) e A f(e) A B e A (c(e) ) e A e A c(e) e A e A cap(a, B) m edge e = (v, w) wih v A, w B mu have f(e) > c(e) Δ 40
41 7. NETWORK FLOW I SECTION 17.2 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
42 Shore augmening pah Q. Which augmening pah? A. The one wih he fewe edge. can find via BFS SHORTEST-AUGMENTING-PATH (G) FOREACH e E : f (e) 0. Gf reidual nework of G wih repec o flow f. WHILE (here exi an pah in Gf ) P BREADTH-FIRST-SEARCH (Gf ). f AUGMENT ( f, c, P). Updae Gf. RETURN f. 42
43 Shore augmening pah: overview of analyi Lemma 1. Throughou he algorihm, he lengh of a hore augmening pah never decreae. Lemma 2. Afer a mo m hore-pah augmenaion, he lengh of a hore augmening pah ricly increae. Theorem. The hore-augmening-pah algorihm run in O(m 2 n) ime. Pf. O(m + n) ime o find hore augmening pah via BFS. O(m) augmenaion for pah of lengh k. If here i an augmening pah, here i a imple one. 1 k < n O(m n) augmenaion. 43
44 Shore augmening pah: analyi Def. Given a digraph G = (V, E) wih ource, i level graph i defined by: (v) = number of edge in hore pah from o v. L G = (V, E G ) i he ubgraph of G ha conain only hoe edge (v, w) E wih (w) = (v) + 1. graph G level graph LG = 0 = 1 = 2 = 3 44
45 Shore augmening pah: analyi Def. Given a digraph G = (V, E) wih ource, i level graph i defined by: (v) = number of edge in hore pah from o v. L G = (V, E G ) i he ubgraph of G ha conain only hoe edge (v, w) E wih (w) = (v) + 1. Propery. Can compue level graph in O(m + n) ime. Pf. Run BFS; delee back and ide edge. Key propery. P i a hore v pah in G iff P i an v pah L G. level graph LG = 0 = 1 = 2 = 3 45
46 Shore augmening pah: analyi Lemma 1. The lengh of a hore augmening pah never decreae. Le f and f ʹ be flow before and afer a hore-pah augmenaion. Le L and Lʹ be level graph of G f and G f ʹ. Only back edge added o G f (any pah wih a back edge i longer han previou lengh) level graph L = 0 = 1 = 2 = 3 level graph L 46
47 Shore augmening pah: analyi Lemma 2. Afer a mo m hore-pah augmenaion, he lengh of a hore augmening pah ricly increae. The boleneck edge() i deleed from L afer each augmenaion. No new edge added o L unil lengh of hore pah ricly increae. level graph L = 0 = 1 = 2 = 3 level graph L 47
48 Shore augmening pah: review of analyi Lemma 1. Throughou he algorihm, he lengh of a hore augmening pah never decreae. Lemma 2. Afer a mo m hore-pah augmenaion, he lengh of a hore augmening pah ricly increae. Theorem. The hore-augmening-pah algorihm run in O(m 2 n) ime. Pf. O(m + n) ime o find hore augmening pah via BFS. O(m) augmenaion for pah of lengh k. If here i an augmening pah, here i a imple one. 1 k < n O(m n) augmenaion. 48
49 Shore augmening pah: improving he running ime Noe. Θ(m n) augmenaion neceary on ome flow nework. Try o decreae ime per augmenaion inead. Simple idea O(m n 2 ) [Diniz 1970] Dynamic ree O(m n log n) [Sleaor Tarjan 1983] A Daa Srucure for Dynamic Tree DANIEL D. SLEATOR AND ROBERT ENDRE TARJAN Bell Laboraorie, Murray Hill, New Jerey Received May 8, 1982; revied Ocober 18, 1982 A daa rucure i propoed o mainain a collecion of verex-dijoin ree under a equence of wo kind of operaion: a link operaion ha combine wo ree ino one by adding an edge, and a cu operaion ha divide one ree ino wo by deleing an edge. Each operaion require O(log n) ime. Uing hi daa rucure, new fa algorihm are obained for he following problem: (1) Compuing neare common anceor. (2) Solving variou nework flow problem including finding maximum flow, blocking flow, and acyclic flow. (3) Compuing cerain kind of conrained minimum panning ree. (4) Implemening he nework implex algorihm for minimum-co flow. The mo ignifican applicaion i (2); an O(mn log n)-ime algorihm i obained o find a maximum flow in a nework of n verice and m edge, beaing by a facor of log n he fae algorihm previouly known for pare graph. 49
50 7. NETWORK FLOW I SECTION 18.1 max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
51 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. level graph LG 51
52 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. advance level graph LG 52
53 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. augmen level graph LG 53
54 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. advance level graph LG 54
55 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. rerea level graph LG 55
56 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. advance level graph LG 56
57 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. augmen level graph LG 57
58 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. advance level graph LG 58
59 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. rerea level graph LG 59
60 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. rerea level graph LG 60
61 Blocking-flow algorihm Two ype of augmenaion. Normal: lengh of hore pah doe no change. Special: lengh of hore pah ricly increae. Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. end of phae level graph LG 61
62 Blocking-flow algorihm INITIALIZE (G, f ) ADVANCE (v) LG level-graph of Gf. P. GOTO ADVANCE (). RETREAT (v) IF (v = ) AUGMENT(P). Remove auraed edge from LG. P. GOTO ADVANCE (). IF (v = ) STOP. ELSE Delee v (and all inciden edge) from LG. Remove la edge (u, v) from P. GOTO ADVANCE (u). IF (here exi edge (v, w) LG) Add edge (v, w) o P. GOTO ADVANCE (w). ELSE GOTO RETREAT (v). 62
63 Blocking-flow algorihm: analyi Lemma. A phae can be implemened o run in O(m n) ime. Pf. Iniializaion happen once per phae. A mo m augmenaion per phae. (becaue an augmenaion delee a lea one edge from L G ) A mo n rerea per phae. (becaue a rerea delee one node from L G ) A mo m n advance per phae. O(m) uing BFS O(mn) per phae O(m + n) per phae O(mn) per phae (becaue a mo n advance before rerea or augmenaion) Theorem. [Diniz 1970] The blocking-flow algorihm run in O(mn 2 ) ime. Pf. By lemma, O(mn) ime per phae. A mo n phae (a in hore-augmening-pah analyi). 63
64 Chooing good augmening pah: ummary year mehod # augmenaion running ime 1955 augmening pah n C O(m n C) 1970 fae augmening pah m log (mc) O(m 2 log n log (mc)) 1972 capaciy caling m log C O(m 2 log C) 1985 improved capaciy caling m log C O(m n log C) 1970 hore augmening pah m n O(m 2 n) 1970 blocking flow m n O(m n 2 ) 1983 dynamic ree m n O(m n log n ) augmening pah algorihm wih m edge, n node and ineger capaciie beween 1 and C 64
65 Maximum-flow algorihm: heory year mehod wor cae dicovered by 1951 implex O(m 3 C) Danzig 1955 augmening pah O(m 2 C) Ford Fulkeron 1970 hore augmening pah O(m 3 ) Diniz, Edmond Karp 1970 fae augmening pah O(m 2 log m log( m C )) Diniz, Edmond Karp 1977 blocking flow O(m 5/2 ) Cherkaky 1978 blocking flow O(m 7/3 ) Galil 1983 dynamic ree O(m 2 log m) Sleaor Tarjan 1985 improved capaciy caling O(m 2 log C) Gabow 1997 lengh funcion O(m 3/2 log m log C) Goldberg Rao 2012 compac nework O(m 2 / log m) Orlin?? O(m)? max-flow algorihm for pare digraph wih m edge, ineger capaciie beween 1 and C 65
66 Maximum-flow algorihm: pracice Puh-relabel algorihm (SECTION 7.4). [Goldberg Tarjan 1988] Increae flow one edge a a ime inead of one augmening pah a a ime. A New Approach o he Maximum-Flow Problem ANDREW V. GOLDBERG Maachue Iniue of Technology, Cambridge, Maachue AND ROBERT E. TARJAN Princeon Univeriy, Princeon, New Jerey, and AT&T Bell Laboraorie, Murray Hill, New Jerey Abrac. All previouly known effcien maximum-flow algorihm work by finding augmening pah, eiher one pah a a ime (a in he original Ford and Fulkeron algorihm) or all hore-lengh augmening pah a once (uing he layered nework approach of Dinic). An alernaive mehod baed on he preflow concep of Karzanov i inroduced. A preflow i like a flow, excep ha he oal amoun flowing ino a verex i allowed o exceed he oal amoun flowing ou. The mehod mainain a preflow in he original nework and puhe local flow exce oward he ink along wha are eimaed o be hore pah. The algorihm and i analyi are imple and inuiive, ye he algorihm run a fa a any oher known mehod on dene. graph, achieving an O(n)) ime bound on an n-verex graph. By incorporaing he dynamic ree daa rucure of Sleaor and Tarjan, we obain a verion of he algorihm running in O(nm log(n /m)) ime on an n-verex, m-edge graph. Thi i a fa a any known mehod for any graph deniy and faer on graph of moderae deniy. The algorihm alo admi eficien diribued and parallel implemenaion. A parallel implemenaion running in O(n log n) ime uing n proceor and O(m) pace i obained. Thi ime bound mache ha of he Shiloach-Vihkin algorihm, which alo ue n proceor bu require O(n ) pace. Caegorie and Subjec Decripor: F.2.2 [Analyi of Algorihm and Problem Complexiy]: Non- 66
67 Maximum-flow algorihm: pracice Warning. Wor-cae running ime i generally no ueful for predicing or comparing max-flow algorihm performance in pracice. Be in pracice. Puh relabel mehod wih gap relabeling: O(m 3/2 ). On Implemening Puh-Relabel Mehod for he Maximum Flow Problem Bori V. Cherkaky 1 and Andrew V. Goldberg 2 1 Cenral Iniue for Economic and Mahemaic, Kraikova S. 32, , Mocow, Ruia cher@eemi.mk.u 2 Compuer Science Deparmen, Sanford Univeriy Sanford, CA 94305, USA goldberg ~c. anford, edu Abrac. We udy efficien implemenaion of he puh-relabel mehod for he maximum flow problem. The reuling code are faer han he previou code, and much faer on ome problem familie. The peedup i due o he combinaion of heuriic ued in our implemenaion. We alo exhibi a family of problem for which he running ime of all known mehod eem o have a roughly quadraic growh rae. ELSEVIER European Journal of Operaional Reearch 97 (1997) Theory and Mehodology EUROPEAN JOURNAL OF OPERATIONAL RESEARCH Compuaional inveigaion of maximum flow algorihm Ravindra K. Ahuja a, Murali Kodialam a b, Ajay K. Mihra c, Jame B. Orlin d,. Deparmen ~'lndurial and Managemen Engineering. Indian Iniue of Technology. Kanpur, , India b AT& T Bell Laboraorie, Holmdel, NJ 07733, USA c KA'F-Z Graduae School of Buine, Univeriy of Piburgh, Piburgh, PA 15260, USA d Sloun School of Managemen, Maachue Iniue of Technology. Cambridge. MA USA Received 30 Augu 1995; acceped 27 June
68 Maximum-flow algorihm: pracice Compuer viion. Differen algorihm work beer for ome dene problem ha arie in applicaion o compuer viion. An Experimenal Comparion of Min-Cu/Max-Flow Algorihm for Energy Minimizaion in Viion Yuri Boykov and Vladimir Kolmogorov Abrac VERMA, BATRA: MAXFLOW REVISITED 1 MaxFlow Reviied: An Empirical Comparion of Maxflow Algorihm for Dene Viion Problem Afer [15, 31, 19, 8, 25, 5] minimum cu/maximum flow algorihm on graph emerged a an increaingly ueful ool for exac or approximae energy minimizaion in low-level viion. The combinaorial opimizaion lieraure provide many min-cu/max-flow algorihm wih differen polynomial ime complexiy. Their pracical efficiency, however, ha o dae been udied mainly ouide he cope of compuer viion. The goal ofhipaperioprovidean experimenal comparion of he efficiency of min-cu/max flow algorihm for applicaion in viion. We compare he running ime of everal andard algorihm, a well a a Tanmay Verma anmay08054@iiid.ac.in Dhruv Bara dbara@ic.edu Abrac IIIT-Delhi Delhi, India TTI-Chicago Chicago, USA new algorihm ha we have recenly developed. The algorihm we udy include boh Goldberg-Tarjan yle puh-relabel mehod and algorihm baed on Ford-Fulkeron yle augmening pah. We benchmark hee algorihm on a number of ypical graph in he conex of image reoraion, ereo, and egmenaion. In many cae our new algorihm work everal ime faer han any of he oher mehod making near real-ime performance poible. An implemenaion of our max-flow/min-cu algorihm i available upon reque for reearch purpoe. Algorihm for finding he maximum amoun of flow poible in a nework (or maxflow) play a cenral role in compuer viion problem. We preen an empirical comparion of differen max-flow algorihm on modern problem. Our problem inance arie from energy minimizaion problem in Objec Caegory Segmenaion, Image Deconvoluion, Super Reoluion, Texure Reoraion, Characer Compleion and 3D Segmenaion. We compare 14 differen implemenaion and find ha he mo popularly ued implemenaion of Kolmogorov [5] i no longer he fae algorihm available, epecially for dene graph. 68
69 7. NETWORK FLOW I max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework
70 Biparie maching Q. Which max-flow algorihm o ue for biparie maching? Generic augmening pah: O(m val( f * )) = O(m n). Capaciy caling: O(m 2 log C) = O(m 2 ). Blocking flow: O(m n 2 ). Q. Sugge more ophiicaed algorihm are no o fa when C = 1. A. No, ju need more clever analyi! Nex. We prove ha hore-augmening-pah algorihm can be implemened o run in O(m n 1/2 ) ime. NETWORK FLOW AND TESTING GRAPH CONNECTIVITY* SHIMON EVEN" AND R. ENDRE TARJAN:I: Abrac. An algorihm of Dinic for finding he maximum flow in a nework i decribed. I i hen hown ha if he verex capaciie are all equal o one, he algorihm require a mo O(IV[ 1/2 IEI) ime, and if he edge capaciie are all equal o one, he algorihm require a mo O(I VI 2/3. IEI) ime. Alo, hee bound are igh for Dinic algorihm. Thee reul are ued o e he verex conneciviy of a graph in O(IVI 1/z. IEI 2) ime and he edge conneciviy in O(I V[ 5/3. IEI) ime. 70
71 Simple uni-capaciy nework Def. A flow nework i a imple uni-capaciy nework if: Every edge ha capaciy 1. Every node (oher han or ) ha eiher (i) exacly one enering edge or (ii) exacly one leaving edge (or boh). Propery. Le G be a imple uni-capaciy nework and le f be a 0 1 flow, hen Gf i a imple uni-capaciy nework. Ex. Biparie maching
72 Simple uni-capaciy nework Shore-augmening-pah algorihm. Normal augmenaion: lengh of hore pah doe no change. Special augmenaion: lengh of hore pah ricly increae. Theorem. [Even Tarjan 1975] In imple uni-capaciy nework, he horeaugmening-pah algorihm compue a maximum flow in O(m n 1/2 ) ime. Pf. Lemma 1. Each phae of normal augmenaion ake O(m) ime. Lemma 2. Afer a mo n 1/2 phae, val( f ) val( f * ) n 1/2. Lemma 3. Afer a mo n 1/2 addiional augmenaion, flow i opimal. Lemma 3. Afer a mo n 1/2 addiional augmenaion, flow i opimal. Pf. Each augmenaion increae flow value by a lea 1. 72
73 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG advance level graph LG 73
74 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG augmen level graph LG 74
75 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG advance level graph LG 75
76 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG rerea level graph LG 76
77 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG advance level graph LG 77
78 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG augmen level graph LG 78
79 Simple uni-capaciy nework Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. delee all edge in augmening pah from LG end of phae level graph LG 79
80 Simple uni-capaciy nework: analyi Phae of normal augmenaion. Explicily mainain level graph L G. Sar a, advance along an edge in LG unil reach or ge uck. If reach, augmen and and updae L G. If ge uck, delee node from L G and go o previou node. Lemma 1. A phae of normal augmenaion ake O(m) ime. Pf. O(m) o creae level graph L G. O(1) per edge ince each edge ravered and deleed a mo once. O(1) per node ince each node deleed a mo once. 80
81 Simple uni-capaciy nework: analyi Lemma 2. Afer a mo n 1/2 phae, val( f ) val( f * ) n 1/2. Afer n 1/2 phae, lengh of hore augmening pah i > n 1/2. Level graph ha more han n 1/2 level. Le 1 h n 1/2 be layer wih min number of node: Vh n 1/2. level graph LG for flow f V 0 V n 1/2 V 1 V h 81
82 Simple uni-capaciy nework: analyi Lemma 2. Afer a mo n 1/2 phae, val( f ) val( f * ) n 1/2. Afer n 1/2 phae, lengh of hore augmening pah i > n 1/2. Level graph ha more han n 1/2 level. Le 1 h n 1/2 be layer wih min number of node: Vh n 1/2. Le A = {v : (v) < h} {v : (v) = h and v ha 1 ougoing reidual edge}. capf (A, B) Vh n 1/2 val( f ) val( f * ) n 1/2. reidual nework Gf reidual edge A V 0 V 1 V h V 1/2 n 82
7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM
7. NETWORK FLOW I max-flow and min-cu problem Ford Fulkeron algorihm max-flow min-cu heorem capaciy-caling algorihm hore augmening pah blocking-flow algorihm imple uni-capaciy nework Lecure lide by Kevin
More informationMax Flow, Min Cut COS 521. Kevin Wayne Fall Soviet Rail Network, Cuts. Minimum Cut Problem. Flow network.
Sovie Rail Nework, Max Flow, Min u OS Kevin Wayne Fall Reference: On he hiory of he ranporaion and maximum flow problem. lexander Schrijver in Mah Programming, :,. Minimum u Problem u Flow nework.! Digraph
More informationSoviet Rail Network, 1955
Sovie Rail Nework, 1 Reference: On he hiory of he ranporaion and maximum flow problem. Alexander Schrijver in Mah Programming, 1: 3,. Maximum Flow and Minimum Cu Max flow and min cu. Two very rich algorihmic
More informationAlgorithms. Algorithms 6.4 MAXIMUM FLOW
Algorihm ROBERT SEDGEWICK KEVIN WAYNE 6.4 MAXIMUM FLOW Algorihm F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE hp://alg4.c.princeon.edu inroducion Ford Fulkeron algorihm maxflow mincu heorem analyi
More information! Abstraction for material flowing through the edges. ! G = (V, E) = directed graph, no parallel edges.
Sovie Rail Nework, haper Nework Flow Slide by Kevin Wayne. opyrigh Pearon-ddion Weley. ll righ reerved. Reference: On he hiory of he ranporaion and maximum flow problem. lexander Schrijver in Mah Programming,
More informationThe Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm
Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,
More informationMaximum Flow and Minimum Cut
// Sovie Rail Nework, Maximum Flow and Minimum Cu Max flow and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy. Nework Flow Flow nework.
More informationThe Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm
Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,
More informationFord Fulkerson algorithm max-flow min-cut theorem. max-flow min-cut theorem capacity-scaling algorithm
7. NETWORK FLOW I 7. NETWORK FLOW I max-flow and min-cu problem max-flow and min-cu problem Ford Fulkeron algorihm Ford Fulkeron algorihm max-flow min-cu heorem max-flow min-cu heorem capaciy-caling algorihm
More informationMaximum Flow. Contents. Max Flow Network. Maximum Flow and Minimum Cut
Conen Maximum Flow Conen. Maximum low problem. Minimum cu problem. Max-low min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Princeon Univeriy COS Theory o Algorihm Spring Kevin
More informationSoviet Rail Network, 1955
7.1 Nework Flow Sovie Rail Nework, 19 Reerence: On he hiory o he ranporaion and maximum low problem. lexander Schrijver in Mah Programming, 91: 3, 00. (See Exernal Link ) Maximum Flow and Minimum Cu Max
More information6/3/2009. CS 244 Algorithm Design Instructor: t Artur Czumaj. Lecture 8 Network flows. Maximum Flow and Minimum Cut. Minimum Cut Problem.
Maximum Flow and Minimum Cu CS lgorihm Deign Inrucor: rur Czumaj Lecure Nework Max and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy.
More informationAlgorithm Design and Analysis
Algorihm Deign and Analyi LECTURES 17 Nework Flow Dualiy of Max Flow and Min Cu Algorihm: Ford-Fulkeron Capaciy Scaling Sofya Rakhodnikova S. Rakhodnikova; baed on lide by E. Demaine, C. Leieron, A. Smih,
More informationToday: Max Flow Proofs
Today: Max Flow Proof COSC 58, Algorihm March 4, 04 Many of hee lide are adaped from everal online ource Reading Aignmen Today cla: Chaper 6 Reading aignmen for nex cla: Chaper 7 (Amorized analyi) In-Cla
More informationGraphs III - Network Flow
Graph III - Nework Flow Flow nework eup graph G=(V,E) edge capaciy w(u,v) 0 - if edge doe no exi, hen w(u,v)=0 pecial verice: ource verex ; ink verex - no edge ino and no edge ou of Aume every verex v
More informationAlgorithm Design and Analysis
Algorihm Deign and Analyi LECTURE 0 Nework Flow Applicaion Biparie maching Edge-dijoin pah Adam Smih 0//0 A. Smih; baed on lide by E. Demaine, C. Leieron, S. Rakhodnikova, K. Wayne La ime: Ford-Fulkeron
More information1 Motivation and Basic Definitions
CSCE : Deign and Analyi of Algorihm Noe on Max Flow Fall 20 (Baed on he preenaion in Chaper 26 of Inroducion o Algorihm, 3rd Ed. by Cormen, Leieron, Rive and Sein.) Moivaion and Baic Definiion Conider
More informationMAXIMUM FLOW. introduction Ford-Fulkerson algorithm maxflow-mincut theorem
MAXIMUM FLOW inroducion Ford-Fulkeron algorihm maxflow-mincu heorem Mincu problem Inpu. An edge-weighed digraph, ource verex, and arge verex. each edge ha a poiive capaciy capaciy 9 10 4 15 15 10 5 8 10
More informationFlow networks. Flow Networks. A flow on a network. Flow networks. The maximum-flow problem. Introduction to Algorithms, Lecture 22 December 5, 2001
CS 545 Flow Nework lon Efra Slide courey of Charle Leieron wih mall change by Carola Wenk Flow nework Definiion. flow nework i a direced graph G = (V, E) wih wo diinguihed verice: a ource and a ink. Each
More informationMain Reference: Sections in CLRS.
Maximum Flow Reied 09/09/200 Main Reference: Secion 26.-26. in CLRS. Inroducion Definiion Muli-Source Muli-Sink The Ford-Fulkeron Mehod Reidual Nework Augmening Pah The Max-Flow Min-Cu Theorem The Edmond-Karp
More informationProblem Set If all directed edges in a network have distinct capacities, then there is a unique maximum flow.
CSE 202: Deign and Analyi of Algorihm Winer 2013 Problem Se 3 Inrucor: Kamalika Chaudhuri Due on: Tue. Feb 26, 2013 Inrucion For your proof, you may ue any lower bound, algorihm or daa rucure from he ex
More informationNetwork Flows: Introduction & Maximum Flow
CSC 373 - lgorihm Deign, nalyi, and Complexiy Summer 2016 Lalla Mouaadid Nework Flow: Inroducion & Maximum Flow We now urn our aenion o anoher powerful algorihmic echnique: Local Search. In a local earch
More informationMatching. Slides designed by Kevin Wayne.
Maching Maching. Inpu: undireced graph G = (V, E). M E i a maching if each node appear in a mo edge in M. Max maching: find a max cardinaliy maching. Slide deigned by Kevin Wayne. Biparie Maching Biparie
More informationGreedy. I Divide and Conquer. I Dynamic Programming. I Network Flows. Network Flow. I Previous topics: design techniques
Algorihm Deign Technique CS : Nework Flow Dan Sheldon April, reedy Divide and Conquer Dynamic Programming Nework Flow Comparion Nework Flow Previou opic: deign echnique reedy Divide and Conquer Dynamic
More informationCS 473G Lecture 15: Max-Flow Algorithms and Applications Fall 2005
CS 473G Lecure 1: Max-Flow Algorihm and Applicaion Fall 200 1 Max-Flow Algorihm and Applicaion (November 1) 1.1 Recap Fix a direced graph G = (V, E) ha doe no conain boh an edge u v and i reveral v u,
More information4/12/12. Applications of the Maxflow Problem 7.5 Bipartite Matching. Bipartite Matching. Bipartite Matching. Bipartite matching: the flow network
// Applicaion of he Maxflow Problem. Biparie Maching Biparie Maching Biparie maching. Inpu: undireced, biparie graph = (, E). M E i a maching if each node appear in a mo one edge in M. Max maching: find
More informationCSE 521: Design & Analysis of Algorithms I
CSE 52: Deign & Analyi of Algorihm I Nework Flow Paul Beame Biparie Maching Given: A biparie graph G=(V,E) M E i a maching in G iff no wo edge in M hare a verex Goal: Find a maching M in G of maximum poible
More informationintroduction Ford-Fulkerson algorithm
Algorihm ROBERT SEDGEWICK KEVIN WAYNE. MAXIMUM FLOW. MAXIMUM FLOW inroducion inroducion Ford-Fulkeron algorihm Ford-Fulkeron algorihm Algorihm F O U R T H E D I T I O N maxflow-mincu heorem analyi of running
More informationintroduction Ford-Fulkerson algorithm
Algorihm ROBERT SEDGEWICK KEVIN WAYNE. MAXIMUM FLOW. MAXIMUM FLOW inroducion inroducion Ford-Fulkeron algorihm Ford-Fulkeron algorihm Algorihm F O U R T H E D I T I O N maxflow-mincu heorem analyi of running
More informationMaximum Flow. How do we transport the maximum amount data from source to sink? Some of these slides are adapted from Lecture Notes of Kevin Wayne.
Conen Conen. Maximum flow problem. Minimum cu problem. Max-flow min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Chaper Maximum How do we ranpor he maximum amoun daa from ource
More informationNetwork Flows UPCOPENCOURSEWARE number 34414
Nework Flow UPCOPENCOURSEWARE number Topic : F.-Javier Heredia Thi work i licened under he Creaive Common Aribuion- NonCommercial-NoDeriv. Unpored Licene. To view a copy of hi licene, vii hp://creaivecommon.org/licene/by-nc-nd/./
More informationNetwork Flow. Data Structures and Algorithms Andrei Bulatov
Nework Flow Daa Srucure and Algorihm Andrei Bulao Algorihm Nework Flow 24-2 Flow Nework Think of a graph a yem of pipe We ue hi yem o pump waer from he ource o ink Eery pipe/edge ha limied capaciy Flow
More informationCSE 421 Introduction to Algorithms Winter The Network Flow Problem
CSE 42 Inroducion o Algorihm Winer 202 The Nework Flow Problem 2 The Nework Flow Problem 5 a 4 3 x 3 7 6 b 4 y 4 7 6 c 5 z How much uff can flow from o? 3 Sovie Rail Nework, 955 Reference: On he hiory
More information16 Max-Flow Algorithms and Applications
Algorihm A proce canno be underood by opping i. Underanding mu move wih he flow of he proce, mu join i and flow wih i. The Fir Law of Mena, in Frank Herber Dune (196) There a difference beween knowing
More informationAlgorithmic Discrete Mathematics 6. Exercise Sheet
Algorihmic Dicree Mahemaic. Exercie Shee Deparmen of Mahemaic SS 0 PD Dr. Ulf Lorenz 7. and 8. Juni 0 Dipl.-Mah. David Meffer Verion of June, 0 Groupwork Exercie G (Heap-Sor) Ue Heap-Sor wih a min-heap
More informationCSC 364S Notes University of Toronto, Spring, The networks we will consider are directed graphs, where each edge has associated with it
CSC 36S Noe Univeriy of Torono, Spring, 2003 Flow Algorihm The nework we will conider are direced graph, where each edge ha aociaed wih i a nonnegaive capaciy. The inuiion i ha if edge (u; v) ha capaciy
More informationRandomized Perfect Bipartite Matching
Inenive Algorihm Lecure 24 Randomized Perfec Biparie Maching Lecurer: Daniel A. Spielman April 9, 208 24. Inroducion We explain a randomized algorihm by Ahih Goel, Michael Kapralov and Sanjeev Khanna for
More informationCS4445/9544 Analysis of Algorithms II Solution for Assignment 1
Conider he following flow nework CS444/944 Analyi of Algorihm II Soluion for Aignmen (0 mark) In he following nework a minimum cu ha capaciy 0 Eiher prove ha hi aemen i rue, or how ha i i fale Uing he
More informationFlow networks, flow, maximum flow. Some definitions. Edmonton. Saskatoon Winnipeg. Vancouver Regina. Calgary. 12/12 a.
Flow nework, flow, maximum flow Can inerpre direced graph a flow nework. Maerial coure hrough ome yem from ome ource o ome ink. Source produce maerial a ome eady rae, ink conume a ame rae. Example: waer
More informationFlow Networks. Ma/CS 6a. Class 14: Flow Exercises
0/0/206 Ma/CS 6a Cla 4: Flow Exercie Flow Nework A flow nework i a digraph G = V, E, ogeher wih a ource verex V, a ink verex V, and a capaciy funcion c: E N. Capaciy Source 7 a b c d e Sink 0/0/206 Flow
More informationAlgorithms and Data Structures 2011/12 Week 9 Solutions (Tues 15th - Fri 18th Nov)
Algorihm and Daa Srucure 2011/ Week Soluion (Tue 15h - Fri 18h No) 1. Queion: e are gien 11/16 / 15/20 8/13 0/ 1/ / 11/1 / / To queion: (a) Find a pair of ube X, Y V uch ha f(x, Y) = f(v X, Y). (b) Find
More informationReminder: Flow Networks
0/0/204 Ma/CS 6a Cla 4: Variou (Flow) Execie Reminder: Flow Nework A flow nework i a digraph G = V, E, ogeher wih a ource verex V, a ink verex V, and a capaciy funcion c: E N. Capaciy Source 7 a b c d
More information18 Extensions of Maximum Flow
Who are you?" aid Lunkwill, riing angrily from hi ea. Wha do you wan?" I am Majikhie!" announced he older one. And I demand ha I am Vroomfondel!" houed he younger one. Majikhie urned on Vroomfondel. I
More informationAdmin MAX FLOW APPLICATIONS. Flow graph/networks. Flow constraints 4/30/13. CS lunch today Grading. in-flow = out-flow for every vertex (except s, t)
/0/ dmin lunch oday rading MX LOW PPLIION 0, pring avid Kauchak low graph/nework low nework direced, weighed graph (V, ) poiive edge weigh indicaing he capaciy (generally, aume ineger) conain a ingle ource
More information3/3/2015. Chapter 7. Network Flow. Maximum Flow and Minimum Cut. Minimum Cut Problem
// Chaper Nework Flow Maximum Flow and Minimum Cu Max flow and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy. Nonrivial applicaion /
More informationIntroduction to Congestion Games
Algorihmic Game Theory, Summer 2017 Inroducion o Congeion Game Lecure 1 (5 page) Inrucor: Thoma Keelheim In hi lecure, we ge o know congeion game, which will be our running example for many concep in game
More information23 Maximum Flows and Minimum Cuts
A proce canno be underood by opping i. Underanding mu move wih he flow of he proce, mu join i and flow wih i. The Fir Law of Mena, in Frank Herber Dune (196) Conrary o expecaion, flow uually happen no
More informationThey were originally developed for network problem [Dantzig, Ford, Fulkerson 1956]
6. Inroducion... 6. The primal-dual algorihmn... 6 6. Remark on he primal-dual algorihmn... 7 6. A primal-dual algorihmn for he hore pah problem... 8... 9 6.6 A primal-dual algorihmn for he weighed maching
More informationBasic Tools CMSC 641. Running Time. Problem. Problem. Algorithmic Design Paradigms. lg (n!) (lg n)! (lg n) lgn n.2
Baic Tool CMSC April, Review Aympoic Noaion Order of Growh Recurrence relaion Daa Srucure Li, Heap, Graph, Tree, Balanced Tree, Hah Table Advanced daa rucure: Binomial Heap, Fibonacci Heap Soring Mehod
More information26.1 Flow networks. f (u,v) = 0.
26 Maimum Flow Ju a we can model a road map a a direced graph in order o find he hore pah from one poin o anoher, we can alo inerpre a direced graph a a flow nework and ue i o anwer queion abou maerial
More informationEECE 301 Signals & Systems Prof. Mark Fowler
EECE 31 Signal & Syem Prof. Mark Fowler Noe Se #27 C-T Syem: Laplace Tranform Power Tool for yem analyi Reading Aignmen: Secion 6.1 6.3 of Kamen and Heck 1/18 Coure Flow Diagram The arrow here how concepual
More informationMaximum Flow in Planar Graphs
Maximum Flow in Planar Graph Planar Graph and i Dual Dualiy i defined for direced planar graph a well Minimum - cu in undireced planar graph An - cu (undireced graph) An - cu The dual o he cu Cu/Cycle
More informationPlease Complete Course Survey. CMPSCI 311: Introduction to Algorithms. Approximation Algorithms. Coping With NP-Completeness. Greedy Vertex Cover
Pleae Complee Coure Survey CMPSCI : Inroducion o Algorihm Dealing wih NP-Compleene Dan Sheldon hp: //owl.oi.uma.edu/parner/coureevalsurvey/uma/ Univeriy of Maachue Slide Adaped from Kevin Wayne La Compiled:
More informationAverage Case Lower Bounds for Monotone Switching Networks
Average Cae Lower Bound for Monoone Swiching Nework Yuval Filmu, Toniann Piai, Rober Robere, Sephen Cook Deparmen of Compuer Science Univeriy of Torono Monoone Compuaion (Refreher) Monoone circui were
More informationChapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.
Chapter 7 Network Flow Slide by Kevin Wayne. Copyright 5 Pearon-Addion Weley. All right reerved. Soviet Rail Network, 55 Reference: On the hitory of the tranportation and maximum flow problem. Alexander
More informationToday s topics. CSE 421 Algorithms. Problem Reduction Examples. Problem Reduction. Undirected Network Flow. Bipartite Matching. Problem Reductions
Today opic CSE Algorihm Richard Anderon Lecure Nework Flow Applicaion Prolem Reducion Undireced Flow o Flow Biparie Maching Dijoin Pah Prolem Circulaion Loweround conrain on flow Survey deign Prolem Reducion
More informationCMPS 6610/4610 Fall Flow Networks. Carola Wenk Slides adapted from slides by Charles Leiserson
CMP 6610/4610 Fall 2016 Flow Nework Carola Wenk lide adaped rom lide by Charle Leieron Max low and min c Fndamenal problem in combinaorial opimizaion Daliy beween max low and min c Many applicaion: Biparie
More information16 Max-Flow Algorithms
A process canno be undersood by sopping i. Undersanding mus move wih he flow of he process, mus join i and flow wih i. The Firs Law of Mena, in Frank Herber s Dune (196) There s a difference beween knowing
More informationApril 3, The maximum flow problem. See class notes on website.
5.05 April, 007 The maximum flow problem See cla noe on webie. Quoe of he day You ge he maxx for he minimum a TJ Maxx. -- ad for a clohing ore Thi wa he mo unkinde cu of all -- Shakepeare in Juliu Caear
More informationu(t) Figure 1. Open loop control system
Open loop conrol v cloed loop feedbac conrol The nex wo figure preen he rucure of open loop and feedbac conrol yem Figure how an open loop conrol yem whoe funcion i o caue he oupu y o follow he reference
More informationNetwork flows. The problem. c : V V! R + 0 [ f+1g. flow network G = (V, E, c), a source s and a sink t uv not in E implies c(u, v) = 0
Nework flow The problem Seing flow nework G = (V, E, c), a orce and a ink no in E implie c(, ) = 0 Flow from o capaciy conrain kew-ymmery flow-coneraion ale of he flow jfj = P 2V Find a maximm flow from
More information7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching
Chaper. Biparie Maching Nework Flow Slide by Kein Wayne. Copyrigh 00 Pearon-Addion Weley. All righ reered. Maching Biparie Maching Maching. Inpu: undireced graph G = (V, E). M E i a maching if each node
More informationRandom Walk with Anti-Correlated Steps
Random Walk wih Ani-Correlaed Seps John Noga Dirk Wagner 2 Absrac We conjecure he expeced value of random walks wih ani-correlaed seps o be exacly. We suppor his conjecure wih 2 plausibiliy argumens and
More information7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching
Chaper. Biparie Maching Nework Flow Slide by Kevin Wayne. Copyrigh PearonAddion Weley. All righ reerved. Maching Biparie Maching Maching. Inpu: undireced graph G = (V, E). M E i a maching if each node
More informationCHAPTER 7: SECOND-ORDER CIRCUITS
EEE5: CI RCUI T THEORY CHAPTER 7: SECOND-ORDER CIRCUITS 7. Inroducion Thi chaper conider circui wih wo orage elemen. Known a econd-order circui becaue heir repone are decribed by differenial equaion ha
More information20/20 20/20 0/5 0/5 20/20 20/20 5/5 0/5 0/5 5/5 0/20 25/30 20/20 30/30 20/20 0/5 5/5 20/20 0/5 0/5 15/20 15/25 20/20 10/10
Annoncemen CSEP Applied Algorihm Richard Anderon Lecre 9 Nework Flow Applicaion Reading for hi week 7.-7.. Nework flow applicaion Nex week: Chaper 8. NP-Compleene Final exam, March 8, 6:0 pm. A UW. hor
More informationAlgorithms and Theory of Computation. Lecture 11: Network Flow
Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a
More informationCourse Notes for EE227C (Spring 2018): Convex Optimization and Approximation
Course Noes for EE7C Spring 018: Convex Opimizaion and Approximaion Insrucor: Moriz Hard Email: hard+ee7c@berkeley.edu Graduae Insrucor: Max Simchowiz Email: msimchow+ee7c@berkeley.edu Ocober 15, 018 3
More informationSelfish Routing. Tim Roughgarden Cornell University. Includes joint work with Éva Tardos
Selfih Rouing Tim Roughgarden Cornell Univeriy Include join work wih Éva Tardo 1 Which roue would you chooe? Example: one uni of raffic (e.g., car) wan o go from o delay = 1 hour (no congeion effec) long
More informationLongest Common Prefixes
Longes Common Prefixes The sandard ordering for srings is he lexicographical order. I is induced by an order over he alphabe. We will use he same symbols (,
More information18.03SC Unit 3 Practice Exam and Solutions
Sudy Guide on Sep, Dela, Convoluion, Laplace You can hink of he ep funcion u() a any nice mooh funcion which i for < a and for > a, where a i a poiive number which i much maller han any ime cale we care
More informationAn introduction to the theory of SDDP algorithm
An inroducion o he heory of SDDP algorihm V. Leclère (ENPC) Augus 1, 2014 V. Leclère Inroducion o SDDP Augus 1, 2014 1 / 21 Inroducion Large scale sochasic problem are hard o solve. Two ways of aacking
More informationGeometric Path Problems with Violations
Click here o view linked Reference 1 1 1 0 1 0 1 0 1 0 1 Geomeric Pah Problem wih Violaion Anil Mahehwari 1, Subha C. Nandy, Drimi Paanayak, Saanka Roy and Michiel Smid 1 1 School of Compuer Science, Carleon
More informationMechtild Stoer * Frank Wagner** Abstract. fastest algorithm known. The runtime analysis is straightforward. In contrast to
SERIE B INFORMATIK A Simple Min Cu Algorihm Mechild Soer * Frank Wagner** B 9{1 May 199 Abrac We preen an algorihm for nding he minimum cu of an edge-weighed graph. I i imple in every repec. I ha a hor
More information, the. L and the L. x x. max. i n. It is easy to show that these two norms satisfy the following relation: x x n x = (17.3) max
ecure 8 7. Sabiliy Analyi For an n dimenional vecor R n, he and he vecor norm are defined a: = T = i n i (7.) I i eay o how ha hee wo norm aify he following relaion: n (7.) If a vecor i ime-dependen, hen
More informationSupplement for Stochastic Convex Optimization: Faster Local Growth Implies Faster Global Convergence
Supplemen for Sochasic Convex Opimizaion: Faser Local Growh Implies Faser Global Convergence Yi Xu Qihang Lin ianbao Yang Proof of heorem heorem Suppose Assumpion holds and F (w) obeys he LGC (6) Given
More informationTo become more mathematically correct, Circuit equations are Algebraic Differential equations. from KVL, KCL from the constitutive relationship
Laplace Tranform (Lin & DeCarlo: Ch 3) ENSC30 Elecric Circui II The Laplace ranform i an inegral ranformaion. I ranform: f ( ) F( ) ime variable complex variable From Euler > Lagrange > Laplace. Hence,
More informationChapter 7: Inverse-Response Systems
Chaper 7: Invere-Repone Syem Normal Syem Invere-Repone Syem Baic Sar ou in he wrong direcion End up in he original eady-ae gain value Two or more yem wih differen magniude and cale in parallel Main yem
More informationDETC2004/CIE ALGORITHMIC FOUNDATIONS FOR CONSISTENCY-CHECKING OF INTERACTION-STATES OF MECHATRONIC SYSTEMS
Proceeding of DETC 04 ASME 2004 Deign Engineering Technical Conference and Compuer and Informaion in Engineering Conference Sal Lake Ciy, Uah, USA, Sepember 28-Ocober 2, 2004 DETC2004/CIE-79 ALGORITHMIC
More informationStationary Distribution. Design and Analysis of Algorithms Andrei Bulatov
Saionary Disribuion Design and Analysis of Algorihms Andrei Bulaov Algorihms Markov Chains 34-2 Classificaion of Saes k By P we denoe he (i,j)-enry of i, j Sae is accessible from sae if 0 for some k 0
More informationWrap up: Weighted, directed graph shortest path Minimum Spanning Tree. Feb 25, 2019 CSCI211 - Sprenkle
Objecive Wrap up: Weighed, direced graph hore pah Minimum Spanning Tree eb, 1 SI - Sprenkle 1 Review Wha are greedy algorihm? Wha i our emplae for olving hem? Review he la problem we were working on: Single-ource,
More informationNetwork Flow Applications
Hopial problem Neork Flo Applicaion Injured people: n Hopial: k Each peron need o be brough o a hopial no more han 30 minue aay Each hopial rea no more han n/k" people Gien n, k, and informaion abou people
More informationStability in Distribution for Backward Uncertain Differential Equation
Sabiliy in Diribuion for Backward Uncerain Differenial Equaion Yuhong Sheng 1, Dan A. Ralecu 2 1. College of Mahemaical and Syem Science, Xinjiang Univeriy, Urumqi 8346, China heng-yh12@mail.inghua.edu.cn
More informationDynamic Programming 11/8/2009. Weighted Interval Scheduling. Weighted Interval Scheduling. Unweighted Interval Scheduling: Review
//9 Algorihms Dynamic Programming - Weighed Ineral Scheduling Dynamic Programming Weighed ineral scheduling problem. Insance A se of n jobs. Job j sars a s j, finishes a f j, and has weigh or alue j. Two
More informationTopics in Combinatorial Optimization May 11, Lecture 22
8.997 Topics in Combinaorial Opimizaion May, 004 Lecure Lecurer: Michel X. Goemans Scribe: Alanha Newman Muliflows an Disjoin Pahs Le G = (V,E) be a graph an le s,,s,,...s, V be erminals. Our goal is o
More informationSelfish Routing and the Price of Anarchy. Tim Roughgarden Cornell University
Selfih Rouing and he Price of Anarchy Tim Roughgarden Cornell Univeriy 1 Algorihm for Self-Inereed Agen Our focu: problem in which muliple agen (people, compuer, ec.) inerac Moivaion: he Inerne decenralized
More informationCS261: A Second Course in Algorithms Lecture #1: Course Goals and Introduction to Maximum Flow
CS61: A Second Coure in Algorihm Lecure #1: Coure Goal and Inroducion o Maximum Flo Tim Roughgarden January 5, 016 1 Coure Goal CS61 ha o major coure goal, and he coure pli roughly in half along hee line.
More informationResearch Article On Double Summability of Double Conjugate Fourier Series
Inernaional Journal of Mahemaic and Mahemaical Science Volume 22, Aricle ID 4592, 5 page doi:.55/22/4592 Reearch Aricle On Double Summabiliy of Double Conjugae Fourier Serie H. K. Nigam and Kuum Sharma
More informationNECESSARY AND SUFFICIENT CONDITIONS FOR LATENT SEPARABILITY
NECESSARY AND SUFFICIENT CONDITIONS FOR LATENT SEPARABILITY Ian Crawford THE INSTITUTE FOR FISCAL STUDIES DEPARTMENT OF ECONOMICS, UCL cemmap working paper CWP02/04 Neceary and Sufficien Condiion for Laen
More informationIntroduction to SLE Lecture Notes
Inroducion o SLE Lecure Noe May 13, 16 - The goal of hi ecion i o find a ufficien condiion of λ for he hull K o be generaed by a imple cure. I urn ou if λ 1 < 4 hen K i generaed by a imple curve. We will
More informationAlgorithms. Algorithms 6.4 MAXIMUM FLOW
Algorithms ROBERT SEDGEWICK KEVIN WAYNE 6.4 MAXIMUM FLOW Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE http://algs4.cs.princeton.edu introduction Ford Fulkerson algorithm maxflow mincut
More information7. NETWORK FLOW II. Soviet rail network (1950s) Max-flow and min-cut applications. "Free world" goal. Cut supplies (if cold war turns into real war).
Sovie rail nework (9). NETWORK FLOW II "Free world" goal. Cu upplie (if cold war urn ino real war). Lecure lide by Kevin Wayne Copyrigh Pearon-Addion Weley Copyrigh Kevin Wayne hp://www.c.princeon.edu/~wayne/kleinberg-ardo
More informationNotes for Lecture 17-18
U.C. Berkeley CS278: Compuaional Complexiy Handou N7-8 Professor Luca Trevisan April 3-8, 2008 Noes for Lecure 7-8 In hese wo lecures we prove he firs half of he PCP Theorem, he Amplificaion Lemma, up
More informationCMU-Q Lecture 3: Search algorithms: Informed. Teacher: Gianni A. Di Caro
CMU-Q 5-38 Lecure 3: Search algorihms: Informed Teacher: Gianni A. Di Caro UNINFORMED VS. INFORMED SEARCH Sraegy How desirable is o be in a cerain inermediae sae for he sake of (effecively) reaching a
More informationThe multisubset sum problem for finite abelian groups
Alo available a hp://amc-journal.eu ISSN 1855-3966 (prined edn.), ISSN 1855-3974 (elecronic edn.) ARS MATHEMATICA CONTEMPORANEA 8 (2015) 417 423 The muliube um problem for finie abelian group Amela Muraović-Ribić
More informationNotes on cointegration of real interest rates and real exchange rates. ρ (2)
Noe on coinegraion of real inere rae and real exchange rae Charle ngel, Univeriy of Wiconin Le me ar wih he obervaion ha while he lieraure (mo prominenly Meee and Rogoff (988) and dion and Paul (993))
More informationWhat is maximum Likelihood? History Features of ML method Tools used Advantages Disadvantages Evolutionary models
Wha i maximum Likelihood? Hiory Feaure of ML mehod Tool ued Advanage Diadvanage Evoluionary model Maximum likelihood mehod creae all he poible ree conaining he e of organim conidered, and hen ue he aiic
More informationLaplace Transform. Inverse Laplace Transform. e st f(t)dt. (2)
Laplace Tranform Maoud Malek The Laplace ranform i an inegral ranform named in honor of mahemaician and aronomer Pierre-Simon Laplace, who ued he ranform in hi work on probabiliy heory. I i a powerful
More informationARTIFICIAL INTELLIGENCE. Markov decision processes
INFOB2KI 2017-2018 Urech Univeriy The Neherland ARTIFICIAL INTELLIGENCE Markov deciion procee Lecurer: Silja Renooij Thee lide are par of he INFOB2KI Coure Noe available from www.c.uu.nl/doc/vakken/b2ki/chema.hml
More informationPrice of Stability and Introduction to Mechanism Design
Algorihmic Game Theory Summer 2017, Week 5 ETH Zürich Price of Sabiliy and Inroducion o Mechanim Deign Paolo Penna Thi i he lecure where we ar deigning yem which involve elfih player. Roughly peaking,
More information