algorithm
play

ALGORITHM NORTHERN LIGHTS YUN LIU DONGFENG YU TIANXIANG GAO - PowerPoint PPT Presentation

KARGER'S MINCUT ALGORITHM NORTHERN LIGHTS YUN LIU DONGFENG YU TIANXIANG GAO ZHIYUAN LI XIAOYANG ZHENG SOME SOLUTIONS For all pairs of vertexes u and v , run maximum flow. toooo slow Stoer Wagner Algorithm nice


  1. KARGER'S MINCUT ALGORITHM NORTHERN LIGHTS YUN LIU DONGFENG YU TIANXIANG GAO ZHIYUAN LI XIAOYANG ZHENG

  2. SOME SOLUTIONS • For all pairs of vertexes u and v , run maximum flow. • toooo slow • Stoer – Wagner Algorithm • nice deterministic algorithm • Karger's Algorithm • nice randomized alogorithm

  3. GLOBAL MINIMUM CUT • A cut (S,T) in an undirected graph G=(V,E) is a partition of the vertices V into two non-empty, disjoint sets S ∪ T=V . • The weight of a cut is the sum of the weight of all edges between S and T . • We want to find a cut with the minimum weight among all of the cuts.

  4. GLOBAL MINIMUM CUT A CUT WITH VALUE 3 A MINCUT WITH VALUE 2

  5. NOTATION • n : number of vertexes • m : number of edges • degree(u) denotes the number of edges touching node u • G/e is the graph after G contract e

  6. KARGER’S ALGO IN UNWEIGHTED GRAPH • The minimum cut is usually very small. So if we randomly choose an edge, it is very likely to be not in the mincut.

  7. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  8. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  9. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  10. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  11. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  12. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  13. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  14. KARGER’S ALGO IN UNWEIGHTED GRAPH 1. Pick an edge of G at random and collapse its two endpoints into a single node. 2. Repeat 1 until just two nodes remain. Repeat until just two nodes remain: • The edges between the two nodes is a cut. • We claim this procedure is very likely to find a mincut.

  15. A FEW LAMMAS • A cut in G/e is also a cut in G

  16. A FEW LAMMAS • Let S and T be a mincut, suppose e does not cross the cut, mincut(G) = mincut(G/e)

  17. 2 P(FOUND A MINCUT) ≥ 𝑜 2 • Prove that there is a vertex with degree not greater than 2 𝑛 𝑜 . • Proof • The sum of degree is 2m since each edge has 2 ends. So, the average vertex degree is 2 𝑛 𝑜 . Therefore, there exists at least one vertex with degree not greater than 2 𝑛 𝑜 .

  18. 2 P(FOUND A MINCUT) ≥ 𝑜 2 • Prove that the size of the mincut is at most 2 𝑛 𝑜 . • Proof • Consider the partition of G into two pieces, one containing a single node u, and the other containing the remaining n − 1 nodes. The size of this cut is degree(u). Since we already prove there is a vertex with degree not 𝑛 greater than 2 𝑜 , there exists a cut with value at most 𝑛 𝑛 𝑜 . So, that the size of the mincut is at most 2 𝑜 . 2

  19. 2 P(FOUND A MINCUT) ≥ 𝑜 2 • Prove that for a randomly chosen edge e , P(e is not in the 𝑜−2 mincut) ≥ 𝑜 • Proof 𝑛 • The size of the mincut is at most 2 𝑜 , so P(e is in the 2𝑛 1 2 mincut) ≤ 𝑜 . 𝑜 × 𝑛 = • Therefore, P(e is not in the mincut) ≥ 1 − 2 𝑜−2 𝑜 = 𝑜

  20. 2 P(FOUND A MINCUT) ≥ 𝑜 2 • Prove that P(found a mincut) ≥ 2 𝑜 2 • Proof • Pr(final cut is the minimum cut) = Pr(first selected edge is not in mincut) × Pr(second selected edge is not in mincut) × · · · = 𝑜−2 𝑜 × 𝑜−3 𝑜−1 × 𝑜−4 𝑜−2 … × 2 4 × 1 𝑜(𝑜−1) ≥ 2 2 3 = 𝑜 2

  21. REPEAT IT 𝑂 2 𝑀𝑃𝐻 𝑂 TIMES • Prove that P(found a mincut after 𝑜 2 log 𝑜 times) ≥ 1 − 1 𝑜 • Proof 𝑜2 2 ×ln 𝑜 ≥ • P(found a mincut after 𝑜 2 log 𝑜 times) ≥ 1 − 1 − 1 𝑜2 2 1 = 1 − 1 1 − 1 − 𝑓 ln 𝑜 𝑜

  22. TIME COMPLEXITY • 𝑜 2 ⋅ 𝑜 2 log 𝑜 = 𝑜 4 log 𝑜

  23. A STRONG IMPROVEMENT • This toooo slow. 2 • P(e is not in the mincut) ≥ 1 − 𝑜 is almost 1 when n is 1 large, but decreases to 3 when n=3. • We want to avoid that.

  24. A STRONG IMPROVEMENT

  25. A STRONG IMPROVEMENT

  26. TIME COMPLEXITY • 𝑜 2 log 𝑜 ⋅ log 2 𝑜 = 𝑜 2 log 3 𝑜

  27. WE CAN DO IT IN WEIGHTED GRAPH • 𝑃(𝑜 2 log 3 𝑜)

  28. SUMMARY • Karger’s Algorithm in unweighted Graph 𝑃(𝑜 4 𝑚𝑝𝑕𝑜) • A strong improvement 𝑃(𝑜 2 𝑚𝑝𝑕 3 𝑜) • Karger’s Algorithm in weighted Graph 𝑃(𝑜 2 𝑚𝑝𝑕 3 𝑜)

  29. REFERENCES [1] D. R. Karger and C. Stein. A new approach to the minimum cut problem. J. ACM, 43(4):601 – 640, 1996.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend