Download presentation
Presentation is loading. Please wait.
Published byElmer Douglas Modified over 9 years ago
1
Maximum Flow Algorithms —— ACM 黄宇翔
2
目录 Max-flow min-cut theorem 12 Augmenting path algorithms 3 Push-relabel maximum flow algorithm
3
Maximum flow problem source : s, sink : t for any (u, v), (v, u) does not exist and c(u, v) > 0 for any vertex v, there's a path s→v→t the flow f : V × V → R, satisfies two properties : for any (u, v), 0 ≤ f (u, v) ≤ c (u, v) for any u ∈ V - {s, t}, ∑ f (u, v) = ∑ f (v, u) | f | = ∑ f (s, v) - ∑ f (v, s), we want it max
4
Residual Network for a flow f in a flow network G, define residual capacity as c f (u, v) = c (u, v) - f (u, v)
5
Augment path
6
Lemma f is a flow on G G f is the residual network induced from f Δf is a flow on G f we define a new flow on G : f ↑ Δf for any (u, v), (f ↑ Δf) (u, v) = f (u, v) + Δf (u, v) - Δf (v, u) then we have : | f ↑ Δf | = | f | + | Δf |
7
Cut Definitions : a cut (S, T) is a partition of V which satisfies : s ∈ S and t ∈ T f (S, T) = ∑ ∑ f (u, v) - ∑ ∑ f (v, u) c (S, T) = ∑ ∑ c (u, v) Properties : for any cut (S, T), f (S, T) = | f | for any cut (S, T), f (S, T) ≤ c (S, T)
8
Max-flow min-cut theorem The following statements are equivalent : f is a max flow of G There's no augmenting path in G f There exists a cut (S, T) satisfies | f | = c (S, T) Proof has been mentioned above
9
Augmenting path algorithms Ford-Fulkerson : O ( E | f * | ) Edmonds-Karp : O ( V E 2 ) SAP (= shortest augmenting path) : O ( V 2 E ) Dinic : O ( V 2 E ) ISAP (= improved shortest augmenting path) : O ( V 2 E ) (GAP)
10
Push-relabel maximum flow algorithm preflow : for any v ∈ V, ∑ f (v, u) - ∑ f (u, v) ≥ 0 excess flow e (u) = ∑ f (v, u) - ∑ f (u, v) h (u) : the shortest distance to t Push (u, v) // when e (u) > 0, c f (u, v) > 0, and u.h = v.h + 1 Δf (u, v) = min (e (u), c f (u, v)) if (u, v) ∈ E f (u, v) += Δf (u, v) else f (u, v) -= Δf (u, v) e (u) -= Δf (u, v) v (u) += Δf (u, v) Relabel (u) // when e (u) > 0, for all (u, v) ∈ E f, h (u) <= h (v) h (u) = min (h (v))
11
Push-relabel maximum flow algorithm
20
Thanks for listening 2015-11-17
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.