1 / 20

Maximum Flow Algorithms

Maximum Flow Algorithms. —— ACM 黄宇翔. 1. 2. 3. 目录. Max-flow min-cut theorem. Augmenting path algorithms. Push-relabel maximum flow algorithm. 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

Download Presentation

Maximum Flow Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Maximum Flow Algorithms —— ACM 黄宇翔

  2. 1 2 3 目录 Max-flow min-cut theorem Augmenting path algorithms 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 cf (u, v) = c (u, v) - f (u, v)

  5. Augment path

  6. Lemma • f is a flow on G • Gf is the residual network induced from f • Δf is a flow on Gf • 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 Gf • 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 E2 ) • SAP (= shortest augmenting path) : O ( V2 E ) • Dinic : O ( V2 E ) • ISAP (= improved shortest augmenting path) : O ( V2 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, cf (u, v) > 0, and u.h = v.h + 1 Δf (u, v) = min (e (u), cf (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) ∈ Ef, h (u) <= h (v) h (u) = min (h (v))

  11. Push-relabel maximum flow algorithm

  12. Push-relabel maximum flow algorithm

  13. Push-relabel maximum flow algorithm

  14. Push-relabel maximum flow algorithm

  15. Push-relabel maximum flow algorithm

  16. Push-relabel maximum flow algorithm

  17. Push-relabel maximum flow algorithm

  18. Push-relabel maximum flow algorithm

  19. Push-relabel maximum flow algorithm

  20. Thanks for listening 2020/1/4

More Related