Professional Documents
Culture Documents
Etwork LOW: Lecture Slides by Kevin Wayne
Etwork LOW: Lecture Slides by Kevin Wayne
N ETWORK F LOW I
capacity
4 15 15 10
10
s 5 8 10 t
15
4 6 15 10
16
3
Minimum cut problem
Def. Its capacity is the sum of the capacities of the edges from A to B.
cap( A, B) = ∑ c(e)
e out of A
10
s 5 t
15
capacity = 10 + 5 + 15 = 30
4
Minimum cut problem
Def. Its capacity is the sum of the capacities of the edges from A to B.
cap( A, B) = ∑ c(e)
e out of A
10
s 8 t
16
capacity = 10 + 8 + 16 = 34
5
Minimum cut problem
Def. Its capacity is the sum of the capacities of the edges from A to B.
cap( A, B) = ∑ c(e)
e out of A
10
s 8 t
10
capacity = 10 + 8 + 10 = 28
6
Maximum flow problem
€
flow capacity
inflow at v = 5 + 5 + 0 = 10
5/9 outflow at v = 10 + 0 = 10
5 5
10 0/4 /1 0 / 15 /
10
/ 5
10
s 5/5 5/8 v 10 / 10 t
10
/ 0 0 / 15 10
15 0/4 /6 /
10
10 / 16
7
Maximum flow problem
€
5/9
5 5
10 0/4 /1 0 / 15 /
10
/ 5
10
s 5/5 5/8 10 / 10 t
10
/ 0 0 / 15 10
15 0/4 /6 /
10
value = 5 + 10 + 10 = 25
10 / 16
8
Maximum flow problem
€
8/9
2 8
10 0/4 /1 0 / 15 /
10
/ 5
10
s 5/5 8/8 10 / 10 t
13
/ 3 0 / 15 10
15 0/4 /6 /
10
value = 8 + 10 + 10 = 28
13 / 16
9
7. N ETWORK F LOW I
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
flow capacity
network G 0/4
0
0 /
10 0/2 /8 0/6 10
/
0 value of flow
s 0 / 10 0/9 0 / 10 t 0
11
Towards a max-flow algorithm
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
network G 0/4
8
— 0
0 /
8 10 0/2 /8 0/6 10
/
—0
8
s 0 / 10 0/9 —
0 / 10 t 0 +8=8
12
Towards a max-flow algorithm
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
network G 0/4
0
0 2 —
0/2 8 0/6 /
10 / 1 /8 10
—8
2 2
s 0 / 10 —
0/9 —
8 / 10 t 8 + 2 = 10
13
Towards a max-flow algorithm
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
network G 0/4
6
0—
10 2/2 8
/8 6 —
0/6 /
/ 10
10
6 8
s 0 / 10
— 2/9
— 10 / 10 t 10 + 6 = 16
14
Towards a max-flow algorithm
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
network G 0/4
6
10 2/2 8
/8 6/6 /
/ 10
10
s 6 / 10 8/9 10 / 10 t 16
15
Towards a max-flow algorithm
Greedy algorithm.
・Start with f (e) = 0 for all edge e ∈ E.
・Find an s↝t path P where each edge has f (e) < c(e).
・Augment flow along path P.
・Repeat until you get stuck.
network G 3/4
9
10 0/2 7
/8 6/6 /
/ 10
10
s 9 / 10 9/9 10 / 10 t 19
16
Residual graph
Residual edge.
・"Undo" flow sent.
・e = (u, v) and eR = (v, u). residual graph Gf residual
・Residual capacity: capacity
u 11 v
⎧c(e) − f (e) if e ∈ E 6
c f (e) = ⎨
⎩ f (e) if e R ∈ E
AUGMENT (f, c, P)
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
18
Ford-Fulkerson algorithm
FORD-FULKERSON (G, s, t, c)
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
19
Ford-Fulkerson algorithm demo
0/4
0
0 /
10 0/2 /8 0/6 10
/
0 value of flow
s 0 / 10 0/9 0 / 10 t 0
residual graph Gf
4
residual capacity
8 10
2 6
10
s 10 9 10 t
20
Ford-Fulkerson algorithm demo
network G
0/4
8
— 0
0 /
8 10 0/2 /8 0/6 10
/
—0
8
s 0 / 10 0/9 —
0 / 10 t 0 +8=8
residual graph Gf
4
8 10
2 6
10
s 10 9 10 t
21
Ford-Fulkerson algorithm demo
network G
0/4
0
0 2 —
0/2 8 0/6 /
10 / 1 /8 10
—8
2 2
s 0 / 10 —
0/9 —
8 / 10 t 8 + 2 = 10
residual graph Gf
4
8 10
2 8 6
2
s 10 9 2 t
8 22
Ford-Fulkerson algorithm demo
network G
0/4
6
—
0
10 2/2 8
/8 6 —
0/6 /
/ 10
10
6 8
s —
0 / 10 —
2/9 10 / 10 t 10 + 6 = 16
residual graph Gf
4
8 10
2 6
10
s 10 7 10 t
2 23
Ford-Fulkerson algorithm demo
network G
2
—
0/4
8
—
6
10 0 —
2/2 8
/8 6/6 /
/ 10
10
8
s —
6 / 10 8/9 10 / 10 t 16 + 2 = 18
residual graph Gf
4
8 4
2 6
10
s 4 1 10 t
6 8 24
Ford-Fulkerson algorithm demo
network G
3
—
2/4
9
7 —
8
10 0/2
—
8
/8 6/6 /
/ 10
10
9 9
s —
8 / 10 —
8/9 10 / 10 t 18 + 1 = 19
2
residual graph Gf
2
8 2
2 6
10
s 2 1 10 t
8 8 25
Ford-Fulkerson algorithm demo
network G
3/4
9
10 0/2 7
/8 6/6 /
/ 10 max flow
min cut
10
s 9 / 10 9/9 10 / 10 t 19
3
residual graph Gf
1
s 1 9 10 t
9 26
7. N ETWORK F LOW I
Flow value lemma. Let f be any flow and let (A, B) be any cut. Then, the net
flow across (A, B) equals the value of f.
∑ f (e) − ∑ f (e) = v( f )
e out of A e in to A
5/9
5 5
10 0/4 /1 0 / 15 /
10
/ 5
10
10
/ 0 0 / 15 10
15 0/4 /6 /
10
10 / 16
28
Relationship between flows and cuts
Flow value lemma. Let f be any flow and let (A, B) be any cut. Then, the net
flow across (A, B) equals the value of f.
∑ f (e) − ∑ f (e) = v( f )
e out of A e in to A
5/9
5 5
10 0/4 /1 0 / 15 /
10
/ 5
10
10
/ 0 0 / 15 10
15 0/4 /6 /
10
10 / 16
29
Relationship between flows and cuts
Flow value lemma. Let f be any flow and let (A, B) be any cut. Then, the net
flow across (A, B) equals the value of f.
∑ f (e) − ∑ f (e) = v( f )
e out of A e in to A
5/9
edges from B to A
5 5
10 0/4 /1 0 / 15 /
10
/ 5
10
10
/ 0 0 / 15 10
15 0/4 /6 /
10
10 / 16
30
Relationship between flows and cuts
Flow value lemma. Let f be any flow and let (A, B) be any cut. Then, the net
flow across (A, B) equals the value of f.
∑ f (e) − ∑ f (e) = v( f )
e out of A e in to A
Pf. € v( f ) = ∑ f (e)
v( f ) = ∑of ssf (e)
ee out
out of
e out of s
= ∑ f (e) − ∑ f (e).
= ee out
out of
∑to AAf (e). ▪
∑of AAf (e) − ee in
in to
e out of A e in to A
€
€
31
Relationship between flows and cuts
Weak duality. Let f be any flow and (A, B) be any cut. Then, v( f ) ≤ cap(A, B).
Pf. v(
v( ff )) =
= ∑
∑ ff (e)
(e) −
− ∑
∑ ff (e)
(e)
v(
v( ff )) =
= e out∑ ∑ f (e) −
of Af (e) − e in∑ ∑ to Aff (e)
(e)
ee out
out of
of A
A ee in
in to
to A
A
e out of A e in to A
≤
≤ ∑
∑ f (e)
f (e)
flow-value ≤
≤ e out∑∑ of Aff (e)
(e)
ee out of A
lemma e out
out of
of A
A
≤
≤ ∑
∑ c(e)
c(e)
≤
≤ ∑
e out∑ c(e)
c(e)
of A
ee out
out of
of A
A
e out of A
= cap(A,
cap(A, B)
=
=
= cap(A, B)
cap(A, B)
B) ▪
8/9
€
€
€
€ 2 8
/1 /
10 0/4 5 0 / 15 10
/ 10
10
s 5/5 7/8 9 / 10 t s 5 t
12
/ 2
15 0/4 /6 0 / 15 10 15
/
10
12 / 16
Pf. The following three conditions are equivalent for any flow f :
i. There exists a cut (A, B) such that cap(A, B) = val(f ).
ii. f is a max-flow.
iii. There is no augmenting path with respect to f.
[i ii ]
・Suppose that (A, B) is a cut such that cap(A, B) = val(f ).
・Then, for any flow f ', val(f ') ≤ cap(A, B) = val(f ).
・Thus, f is a max-flow. ▪
weak duality by assumption
33
Max-flow min-cut theorem
Pf. The following three conditions are equivalent for any flow f :
i. There exists a cut (A, B) such that cap(A, B) = val(f ).
ii. f is a max-flow.
iii. There is no augmenting path with respect to f.
34
Max-flow min-cut theorem
[ iii i]
・Let f be a flow with no augmenting paths.
・Let A be set of nodes reachable from s in residual graph Gf.
・By definition of cut A, s ∈ A.
・By definition of flow f, t ∉ A. edge e = (v, w) with v ∈ B, w ∈ A
must have f(e) = 0
original network G
v( f ) = ∑ f (e) − ∑ f (e)
v( f ) = e out∑of Af (e) − e in∑to Af (e) A B
v( f ) = e out∑of Af (e) − e in∑to Af (e)
flow-value
= e out∑of Ac(e) e in to A
= e out∑of Ac(e) t
lemma = e out∑of Ac(e)
= cap(A,
e out of A B)
= cap(A, B)
= cap(A, B)
s
€
€
€
35
7. N ETWORK F LOW I
37
Bad case for Ford-Fulkerson
・s→w→v→t
・…
・s→v→w→t v C t
・s→w→v→t
C 1 C
s C w
38
Choosing good augmenting paths
39
Choosing good augmenting paths
JACK EDMONDS
RICHARD M. K A R P
ABSTRACT. This paper presents new algorithms for t h e m a x i m u m flow problem, the Hitchcock
t r a n s p o r t a t i o n problem, and t h e general m i n i m u m - c o s t flow problem. U p p e r bounds on the
numbers of steps in these algorithms are derived, and are shown to compale favorably with
upper bounds on t h e numbers of steps required by earlier algorithms.
First, the paper states the m a x i m u m flow problem, gives the F o r d - F u l k e r s o n labeling method
for its solution, and points out t h a t an improper choice of flow a u g m e n t i n g p a t h s can lead to
s s
0
0
10
10
11
11
2
2
0
0
12
12
17
17
2
2
t t
Gf Gf (Δ), Δ = 100 41
Capacity-scaling algorithm
CAPACITY-SCALING(G, s, t, c)
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
WHILE (Δ ≥ 1)
Gf (Δ) ← Δ-residual graph.
WHILE (there exists an augmenting path P in Gf (Δ))
f ← AUGMENT (f, c, P).
Update Gf (Δ).
Δ ← Δ / 2.
RETURN f.
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
42
Capacity-scaling algorithm: proof of correctness
Integrality invariant. All flow and residual capacity values are integral.
43
Capacity-scaling algorithm: analysis of running time
Theorem. The scaling max-flow algorithm finds a max flow in O(m log C)
augmentations. It can be implemented to run in O(m2 log C) time.
Pf. Follows from LEMMA 1 and LEMMA 3. ▪
44
Capacity-scaling algorithm: analysis of running time
val(
v( ff )) = ∑ f (e) − ∑ f (e) A B
v( f ) = e out∑of A f (e) − e in∑ to A f (e)
v( f ) =
≥ e out∑
∑of A f (e) − e in∑
(c(e) − Δ) to A f (e)
− ∑ Δ
v( f ) = e out∑of A f (e) − e in∑ to A f (e)
of A(c(e) − Δ) − e in∑ t
≥ e out∑
e out of A e in to A
to A Δ
≥ e out∑of A(c(e) − Δ) − e in∑ to A Δ
= ∑ c(e) − ∑ Δ − ∑Δ
≥ e out∑of A(c(e) − Δ) − e in∑ to A Δ
= e out∑of Ac(e) − e out∑of AΔe in−toeAin∑to AΔ
e out of A
= e out∑of Ac(e) − e out∑of AΔ − e in∑to AΔ
≥
= cap(A, B)
c(e) -
− mΔ ∑of AΔ − e in∑to AΔ s
e out∑of A e out
≥ cap(A,
e out of A
B) - mΔ
e out of A e in to A
≥ cap(A, B) - mΔ
≥ cap(A, B) - mΔ
edge e = (v, w) with v ∈ A, w ∈ B
must have f(e) ≥ c(e) – Δ
45
7. N ETWORK F LOW I
SHORTEST-AUGMENTING-PATH(G, s, t, c)
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
FOREACH e ∈ E : f (e) ← 0.
Gf ← residual graph.
WHILE (there exists an augmenting path in Gf )
P ← BREADTH-FIRST-SEARCH (Gf, s, t).
f ← AUGMENT (f, c, P).
Update Gf.
RETURN f.
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
47
Shortest augmenting path: overview of analysis
L1. Throughout the algorithm, length of the shortest path never decreases.
L2. After at most m shortest path augmentations, the length of the shortest
augmenting path strictly increases.
48
Shortest augmenting path: analysis
Def. Given a digraph G = (V, E) with source s, its level graph is defined by:
・ℓ(v) = number of edges in shortest path from s to v.
・LG = (V, EG) is the subgraph of G that contains only those edges (v,w) ∈ E
with ℓ(w) = ℓ(v) + 1.
graph G
s t
level graph LG
s t
ℓ= 0 ℓ= 1 ℓ= 2 ℓ= 3
49
Shortest augmenting path: analysis
Def. Given a digraph G = (V, E) with source s, its level graph is defined by:
・ℓ(v) = number of edges in shortest path from s to v.
・LG = (V, EG) is the subgraph of G that contains only those edges (v,w) ∈ E
with ℓ(w) = ℓ(v) + 1.
level graph LG
s t
ℓ= 0 ℓ= 1 ℓ= 2 ℓ= 3
50
Shortest augmenting path: analysis
L1. Throughout the algorithm, length of the shortest path never decreases.
・Let f and f ' be flow before and after a shortest path augmentation.
・Let L and L' be level graphs of Gf and Gf ' .
・Only back edges added to Gf '
(any path with a back edge is longer than previous length) ▪
level graph L
s t
ℓ= 0 ℓ= 1 ℓ= 2 ℓ= 3
s t
51
Shortest augmenting path: analysis
L2. After at most m shortest path augmentations, the length of the shortest
augmenting path strictly increases.
・The bottleneck edge(s) is deleted from L after each augmentation.
・No new edge added to L until length of shortest path strictly increases. ▪
level graph L
s t
ℓ= 0 ℓ= 1 ℓ= 2 ℓ= 3
s t
52
Shortest augmenting path: review of analysis
L1. Throughout the algorithm, length of the shortest path never decreases.
L2. After at most m shortest path augmentations, the length of the shortest
augmenting path strictly increases.
53
Shortest augmenting path: improving the running time
The most significant application is (2); an O(mn log n)-time algorithm is obtained to find a
maximum flow in a network of n vertices and m edges, beating by a factor of log n the fastest
algorithm previously known for sparse graphs.
1. INTR~DIJCTI~N 54
s t
level graph LG
56
Blocking-flow algorithm
advance
s t
level graph LG
57
Blocking-flow algorithm
augment
s t
level graph LG
58
Blocking-flow algorithm
advance
s t
level graph LG
59
Blocking-flow algorithm
retreat
s t
level graph LG
60
Blocking-flow algorithm
advance
s t
level graph LG
61
Blocking-flow algorithm
augment
s t
level graph LG
62
Blocking-flow algorithm
advance
s t
level graph LG
63
Blocking-flow algorithm
retreat
s t
level graph LG
64
Blocking-flow algorithm
retreat
s t
level graph LG
65
Blocking-flow algorithm
end of phase
s t
level graph LG
66
Blocking-flow algorithm
INITIALIZE(G, s, t, f, c) ADVANCE(v)
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
LG ← level-graph of Gf. IF (v = t)
P ← ∅. AUGMENT(P).
GOTO ADVANCE(s). Remove saturated edges from LG.
P ← ∅.
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
GOTO ADVANCE(s).
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
67
Blocking-flow algorithm: analysis
68
Choosing good augmenting paths: summary
69
Maximum flow algorithms: theory
? ? O(m) ?
max-flow algorithms for sparse digraphs with m edges, integer capacities between 1 and C
70
Maximum flow algorithms: practice
ANDREW V. GOLDBERG
Massachusetts Institute of Technology, Cambridge, Massachusetts
AND
ROBERT E. TARJAN
Princeton University, Princeton, New Jersey, and AT&T Bell Laboratories, Murray Hill, New Jersey
Abstract. All previously known efftcient maximum-flow algorithms work by finding augmenting paths,
either one path at a time (as in the original Ford and Fulkerson algorithm) or all shortest-length
augmenting paths at once (using the layered network approach of Dinic). An alternative method based
on the preflow concept of Karzanov is introduced. A preflow is like a flow, except that the total amount
flowing into a vertex is allowed to exceed the total amount flowing out. The method maintains a preflow
in the original network and pushes local flow excess toward the sink along what are estimated to be
shortest paths. The algorithm and its analysis are simple and intuitive, yet the algorithm runs as fast as
any other known method on dense.graphs, achieving an O(n)) time bound on an n-vertex graph. By
incorporating the dynamic tree data structure of Sleator and Tarjan, we obtain a version of the algorithm
running in O(nm log(n’/m)) time on an n-vertex, m-edge graph. This is as fast as any known method
for any graph density and faster on graphs of moderate density. The algorithm also admits efticient
distributed and parallel implementations. A parallel implementation running in O(n’log n) time using
n processors and O(m) space is obtained. This time bound matches that of the Shiloach-Vishkin
algorithm, which also uses n processors but requires O(n’) space.
Categories and Subject Descriptors: F.2.2 [Analysis of Algorithms and Problem Complexity]: Non-
numerical Algorithms and Problems; G.2.2 [Discrete Mathematics]: Graph Theory-graph algorithms; 71
network problems
General Terms: Algorithms, Design, Theory, Verification
Maximum flow algorithms: practice
On I m p l e m e n t i n g P u s h - R e l a b e l M e t h o d
for the M a x i m u m Flow P r o b l e m
EUROPEAN
JOURNAL
OF OPERATIONAL
Boris V. Cherkassky 1 and Andrew V. Goldberg 2 RESEARCH
ELSEVIER European Journal of Operational Research 97 (1997) 509-542
1 Central Institute for Economics and Mathematics,
Krasikova St. 32, 117418, Moscow, Russia
cher@eemi.msk.su
2 Computer Science Department, Stanford University Theory and Methodology
Stanford, CA 94305, USA
goldberg~cs. stanford, edu Computational investigations of maximum flow algorithms
Ravindra K . A h u j a a, M u r a l i K o d i a l a m b, A j a y K . M i s h r a c, J a m e s B . O r l i n d,.
A b s t r a c t . We study efficient implementations of the push-relabel method a Department t~'lndustrial and Management Engineering. Indian Institute of Technology. Kanpur, 208 016, India
for the maximum flow problem. The resulting codes are faster than the b AT& T Bell Laboratories, Holmdel, NJ 07733, USA
c KA'F-ZGraduate School of Business, University of Pittsburgh, Pittsburgh, PA 15260, USA
previous codes, and much faster on some problem families. The speedup d Sloun School of Management, Massachusetts Institute of Technology. Cambridge. MA 02139. USA
is due to the combination of heuristics used in our implementations. We
also exhibit a family of problems for which the running time of all known Received 30 August 1995; accepted 27 June 1996
methods seem to have a roughly quadratic growth rate.
Abstract
1 Introduction The maximum flow algorithm is distinguished by the long line of successive contributions researchers have made in
obtaining algorithms with incrementally better worst-case complexity. Some, but not all, of these theoretical improvements
The rnaximum flow problem is a classical combinatorial problem that comes up have produced improvements in practice. The purpose of this paper is to test some of the major algorithmic ideas developed
in a wide variety of applications. In this paper we study implementations of the in the recent years and to assess their utility on the empirical front. However, our study differs from previous studies in
several ways. Whereas previous studies focus primarily on CPU time analysis, our analysis goes further and provides 72
push-rdabel [13, 17] method for the problem.
detailed insight into algorithmic behavior. It not only observes how algorithms behave but also tries to explain why
The basic methods for the maximum flow problem include the network sim- algorithms behave that way. We have limited our study to the best previous maximum flow algorithms and some of the
plex method of Dantzig [6, 7], the augmenting path method of Ford and F~lker- recent algorithms that are likely to be efficient in practice. Our study encompasses ten maximum flow algorithms and five
Maximum flow algorithms: practice
In IEEE Transactions on PAMI, Vol. 26, No. 9, pp. 1124-1137, Sept. 2004 p.1
After [15, 31, 19, 8, 25, 5] minimum cut/maximum flow algorithms on graphs emerged as Tanmay Verma IIIT-Delhi
an increasingly useful tool for exact or approximate energy minimization in low-level vision. tanmay08054@iiitd.ac.in Delhi, India
The combinatorial optimization literature provides many min-cut/max-flow algorithms with
Dhruv Batra TTI-Chicago
dbatra@ttic.edu Chicago, USA
different polynomial time complexity. Their practical efficiency, however, has to date been
studied mainly outside the scope of computer vision. The goal of this paper is to provide an
new algorithm that we have recently developed. The algorithms we study include both Algorithms for finding the maximum amount of flow possible in a network (or max-
Goldberg-Tarjan style “push-relabel” methods and algorithms based on Ford-Fulkerson flow) play a central role in computer vision problems. We present an empirical compari-
son of different max-flow algorithms on modern problems. Our problem instances arise
style “augmenting paths”. We benchmark these algorithms on a number of typical graphs
from energy minimization problems in Object Category Segmentation, Image Deconvo-
in the contexts of image restoration, stereo, and segmentation. In many cases our new lution, Super Resolution, Texture Restoration, Character Completion and 3D Segmen-
algorithm works several times faster than any of the other methods making near real-time tation. We compare 14 different implementations and find that the most popularly used
implementation of Kolmogorov [5] is no longer the fastest algorithm available, especially
performance possible. An implementation of our max-flow/min-cut algorithm is available
for dense graphs.
upon request for research purposes.
Key words. Dinic’s algorithm, maximum flow, connectivity, vertex connectivity, edge connec- 75
tivity
flow. Let be a
Unit-capacity simple networks
1 1
76
Unit-capacity simple networks
77
Unit-capacity simple networks
advance
level graph LG
78
Unit-capacity simple networks
augment
level graph LG
79
Unit-capacity simple networks
advance
level graph LG
80
Unit-capacity simple networks
retreat
level graph LG
81
Unit-capacity simple networks
advance
level graph LG
82
Unit-capacity simple networks
augment
level graph LG
83
Unit-capacity simple networks
end of phase
level graph LG
84
Unit-capacity simple networks: analysis
85
Unit-capacity simple networks: analysis
V0 V1 Vh Vn1/2
86
Unit-capacity simple networks: analysis
V0 V1 Vh Vn1/2
87