introduction to algorithms - duke universityreif/courses/alglectures/...introduction to algorithms...

35
Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II Max-flow, min-cut theorem Ford-Fulkerson algorithm and analysis Edmonds-Karp algorithm and analysis Best algorithms to date Prof. Charles E. Leiserson

Upload: others

Post on 29-Mar-2020

20 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Introduction to Algorithms6.046J/18.401J

LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson algorithm

and analysis • Edmonds-Karp algorithm

and analysis • Best algorithms to date

Prof. Charles E. Leiserson

Page 2: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Recall from Lecture 22• Flow value: | f | = f (s, V).• Cut: Any partition (S, T) of V such that s ∈ S

and t ∈ T. • Lemma. | f | = f (S, T) for any cut (S, T). • Corollary. | f | ≤ c(S, T) for any cut (S, T).• Residual graph: The graph Gf = (V, Ef ) with

strictly positive residual capacities cf (u, v) = c(u, v) – f (u, v) > 0.

• Augmenting path: Any path from s to t in Gf . • Residual capacity of an augmenting path:

,c f ( p) = min {c f ( v u )}. ,( v u )∈p

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.2

Page 3: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Max-flow, min-cut theorem

Theorem. The following are equivalent:1. | f | = c(S, T) for some cut (S, T). 2. f is a maximum flow. 3. f admits no augmenting paths.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.3

Page 4: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Max-flow, min-cut theorem

Theorem. The following are equivalent:1. | f | = c(S, T) for some cut (S, T). 2. f is a maximum flow. 3. f admits no augmenting paths. Proof. (1) ⇒ (2): Since | f | ≤ c(S, T) for any cut (S, T) (by the corollary from Lecture 22), the assumption that | f | = c(S, T) implies that f is a maximum flow.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.4

Page 5: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Max-flow, min-cut theorem

Theorem. The following are equivalent:1. | f | = c(S, T) for some cut (S, T). 2. f is a maximum flow. 3. f admits no augmenting paths. Proof. (1) ⇒ (2): Since | f | ≤ c(S, T) for any cut (S, T) (by the corollary from Lecture 22), the assumption that | f | = c(S, T) implies that f is a maximum flow. (2) ⇒ (3): If there were an augmenting path, theflow value could be increased, contradicting the maximality of f.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.5

Page 6: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Proof (continued)(3) ⇒ (1): Suppose that f admits no augmenting paths. Define S = {v ∈ V : there exists a path in Gf from s to v}, and let T = V – S. Observe that s ∈ S and t ∈ T, and thus (S, T) is a cut. Consider any vertices u ∈ S and v ∈ T.

ss uu vv S Tpath in Gf

We must have cf (u, v) = 0, since if cf (u, v) > 0, then v ∈ S, not v ∈ T as assumed. Thus, f (u, v) = c(u, v), since cf (u, v) = c(u, v) –

S, T) = cf (u, v). Summing over all u ∈ S and v ∈ T

yields f ( (S, T), and since | f | = f (S, T), the theorem follows. © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.6

Page 7: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p)

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.7

Page 8: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

109 109

109

1

109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.8

Page 9: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

0:109 0:109

0:109

0:1

0:109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.9

Page 10: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

0:109 0:109

0:109

0:1

0:109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.10

Page 11: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

1:109 0:109

1:109

1:1

0:109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.11

Page 12: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

G: ss tt

1:109 0:109

1:109

1:1

0:109

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.12

Page 13: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

G: ss tt

1:109 1:109

1:109

0:1

1:109

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.13

Page 14: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

1:109 1:109

1:109

0:1

1:109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.14

Page 15: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

2:109 1:109

2:109

1:1

1:109

G:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.15

Page 16: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Ford-Fulkerson max-flow algorithm

Algorithm:f [u, v] ← 0 for all u, v ∈ V while an augmenting path p in G wrt f exists

do augment f by cf (p) Can be slow:

ss tt

2:109 1:109

2:109

1:1

1:109

G:

2 billion iterations on a graph with 4 vertices! © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.16

Page 17: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Edmonds-Karp algorithm

G

Edmonds and Karp noticed that many people’s implementations of Ford-Fulkerson augment along a breadth-first augmenting path: a shortest path in

f from s to t where each edge has weight 1. These implementations would always run relatively fast. Since a breadth-first augmenting path can be found in O(E) time, their analysis, which provided the first polynomial-time bound on maximum flow, focuses on bounding the number of flow augmentations. (In independent work, Dinic also gave polynomial-time bounds.)

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.17

Page 18: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Monotonicity lemmaLemma. Let δ(v) = δf (s, v) be the breadth-first distance from s to v in Gf . During the Edmonds-Karp algorithm, δ(v) increases monotonically.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.18

Page 19: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Monotonicity lemmaLemma. Let δ(v) = δf (s, v) be the breadth-first distance from s to v in Gf . During the Edmonds-Karp algorithm, δ(v) increases monotonically. Proof. Suppose that augmenting a flow f on G produces a new flow f ′. Let δ′(v) = δf ′(s, v). We’ll show δ′(v) ≥ δ(v) by induction on δ′(v). For the base case, δ′(v) = 0 implies v = s, and since δ(s) = 0, we have δ′(v) ≥ δ(v). For the inductive case, consider a breadth-first path s → L → u → v in Gf ′. We must have δ′(v) = δ′(u) + 1, since subpaths of shortest paths are shortest paths. Hence, we have δ′(u) ≥ δ(u) by induction, because δ′(v) > δ′(u). Certainly, (u, v) ∈ Ef ′.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.19

Page 20: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Proof of Monotonicity Lemma — Case 1

Consider two cases depending on whether (u, v) ∈ Ef .

Case 1: (u, v) ∈ Ef .

We have δ(v) ≤ δ(u) + 1 (triangle inequality)

≤ δ′(u) + 1 (induction) = δ′(v) (breadth-first path),

and thus monotonicity of δ(v) is established.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.20

Page 21: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Proof of Monotonicity Lemma — Case 2

Case: (u, v) ∉ Ef . Since (u, v) ∈ Ef ′ , the augmenting path p that produced f ′ from f must have included (v, u). Moreover, p is a breadth-first path in Gf :

p = s → L → v → u → L → t .Thus, we have

δ(v) = δ(u) – 1 (breadth-first path) ≤ δ′(u) – 1 (induction) = δ′(v) – 2 (breadth-first path) < δ′(v) ,

thereby establishing monotonicity for this case, too. © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.21

Page 22: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentationsTheorem. The number of flow augmentations in the Edmonds-Karp algorithm (Ford-Fulkerson with breadth-first augmenting paths) is O(VE).

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.22

Page 23: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentationsTheorem. The number of flow augmentations in the Edmonds-Karp algorithm (Ford-Fulkerson with breadth-first augmenting paths) is O(VE). Proof. Let p be an augmenting path, and suppose that we have cf (u, v) = cf (p) for edge (u, v) ∈ p. Then, we say that (u, v) is critical, and it disappears from the residual graph after flow augmentation.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.23

Page 24: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentationsTheorem. The number of flow augmentations in the Edmonds-Karp algorithm (Ford-Fulkerson with breadth-first augmenting paths) is O(VE). Proof. Let p be an augmenting path, and suppose that we have cf (u, v) = cf (p) for edge (u, v) ∈ p. Then, we say that (u, v) is critical, and it disappears from the residual graph after flow augmentation. Example: cf (p) = 2

2 4 7 2 3

ssGf : tt 3 2 1 2

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.24

Page 25: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.25

Page 26: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

Example: uu

vv ss tt

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.26

Page 27: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

ss uu

vv tt

δ(u) = 5

δ(v) = 6

Example:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.27

Page 28: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

Example: δ(u) = 5

tt uu

vv ss

δ(v) = 6 © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.28

Page 29: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

ss uu

vv tt

δ(u) ≥ 7

δ(v) ≥ 6

Example:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.29

Page 30: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

Example: δ(u) ≥ 7

tt uu

vv ss

δ(v) ≥ 6 © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.30

Page 31: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Counting flow augmentations(continued)

The first time an edge (u, v) is critical, we have δ(v) = δ(u) + 1, since p is a breadth-first path. We must wait until (v, u) is on an augmenting path before (u, v) can be critical again. Let δ′ be the distance function when (v, u) is on an augmenting path. Then, we have

δ′(u) = δ′(v) + 1 (breadth-first path) ≥ δ(v) + 1 (monotonicity) = δ(u) + 2 (breadth-first path).

ss uu

vv tt

δ(u) ≥ 7

δ(v) ≥ 8

Example:

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.31

Page 32: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Running time of Edmonds-Karp

Distances start out nonnegative, never decrease, and are at most |V| – 1 until the vertex becomes unreachable. Thus, (u, v) occurs as a critical edge O(V) times, because δ(v) increases by at least 2 between occurrences. Since the residual graph contains O(E) edges, the number of flow augmentations is O(V E).

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.32

Page 33: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Running time of Edmonds-Karp

Distances start out nonnegative, never decrease, and are at most |V| – 1 until the vertex becomes unreachable. Thus, (u, v) occurs as a critical edge O(V) times, because δ(v) increases by at least 2 between occurrences. Since the residual graph contains O(E) edges, the number of flow augmentations is O(V E).

Corollary. The Edmonds-Karp maximum-flow algorithm runs in O(V E2) time.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.33

Page 34: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Running time of Edmonds-Karp

Distances start out nonnegative, never decrease, and are at most |V| – 1 until the vertex becomes unreachable. Thus, (u, v) occurs as a critical edge O(V) times, because δ(v) increases by at least 2 between occurrences. Since the residual graph contains O(E) edges, the number of flow augmentations is O(V E).

Corollary. The Edmonds-Karp maximum-flow algorithm runs in O(V E2) time. Proof. Breadth-first search runs in O(E) time, and all other bookkeeping is O(V) per augmentation.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.34

Page 35: Introduction to Algorithms - Duke Universityreif/courses/alglectures/...Introduction to Algorithms 6.046J/18.401J LECTURE 21 Network Flow II • Max-flow, min-cut theorem • Ford-Fulkerson

Best to date

• The asymptotically fastest algorithm to date for maximum flow, due to King, Rao, and Tarjan, runs in O(V E logE/(V lg V)V) time.

• If we allow running times as a function of edge weights, the fastest algorithm for maximum flow, due to Goldberg and Rao, runs in time

O(min{V 2/3, E 1/2} ⋅ E lg (V 2/E + 2) ⋅ lg C), where C is the maximum capacity of any edge in the graph.

© 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.35