Purpose: Find the global minimum cut of an undirected weighted graph in with high probability — a large improvement over running plain Karger’s contraction times.
The Insight
Karger’s basic algorithm contracts random edges until two vertices remain. A specific minimum cut survives all contractions with probability , so you must repeat times — that is where the cost lies.
But look at where the failure happens. The probability that a given min cut survives contraction from down to vertices is
Contracting to succeeds with probability about — the early contractions are almost free of risk; only the last few are dangerous. So: contract cheaply down to , then recurse twice to give the risky part two independent chances.
Algorithm
MinCut(G):
if |V(G)| <= 6:
return brute-force minimum cut
t = ceil(1 + |V(G)| / sqrt(2))
G1 = contract G randomly down to t vertices
G2 = contract G randomly down to t vertices (independent)
return min(MinCut(G1), MinCut(G2))
Complexity
per run, with success probability . Repeating times gives a high-probability result in
Compare: repetitions of basic Karger cost .
Solving the recurrence for success probability
Let be the success probability. Each branch succeeds if the contraction preserves the cut (probability ) and the recursive call succeeds:
Substituting shows this solves to — the doubling exactly compensates for the halving.
Comparison of min-cut algorithms
| Algorithm | Time | Type |
|---|---|---|
| max-flow runs | deterministic | |
| Stoer-Wagner | deterministic, simple | |
| Karger | randomized | |
| Karger-Stein | randomized | |
| Nagamochi-Ibaraki | deterministic | |
| Karger 2000 (tree packing) | randomized, near-linear |
For a contest
Write Stoer-Wagner. It is deterministic, about 30 lines, and is fine for the that global-min-cut problems use. Karger-Stein is here for the beautiful recursion, not the leaderboard.
Variants / Use Cases
- Counting minimum cuts — a corollary of Karger’s analysis is that a graph has at most minimum cuts, and Karger-Stein can enumerate them
- Approximate min cuts — the same analysis bounds the number of cuts within a factor by
- Karger’s algorithm — the base contraction procedure
- Global Min Cut — the topic page
- Network reliability, clustering, image segmentation — where global min cuts appear