Given an undirected, unweighted graph G=(V,E) with n vertices and m edges, find a cut (S, V \setminus S) that minimizes the number of crossing edges.
How do we solve it without randomization?
A remarkably simple randomized approach based on edge contraction:
When we contract an edge, the number of vertices decreases by 1:
Let C be a specific global min-cut of size k. The algorithm succeeds if it never contracts any edge in C.
Since the min-cut size is k, the degree of every vertex must be \ge k.
Thus, the total number of edges m \ge \frac{nk}{2}.
Probability of picking a min-cut edge in round 1: \Pr(e_1 \in C) = \frac{k}{m} \le \frac{k}{nk/2} = \frac{2}{n}
Probability of survival: \Pr(e_1 \notin C) \ge 1 - \frac{2}{n} = \frac{n-2}{n}.
Round i survival probability:
The probability that C survives all n-2 contraction rounds:
By independence of conditional choices: \Pr(\text{Success}) \ge \prod_{i=1}^{n-2} \frac{n-i-1}{n-i+1} = \frac{n-2}{n} \cdot \frac{n-3}{n-1} \cdot \frac{n-4}{n-2} \cdot \frac{n-5}{n-3} \dots \frac{4}{6} \cdot \frac{3}{5} \cdot \frac{2}{4} \cdot \frac{1}{3}
How terms cancel:
Note: This is small, but polynomially bounded!
We can use the success probability of Karger’s algorithm to prove a fundamental combinatorial theorem using the Probabilistic Method:
Theorem: Any undirected, connected graph G = (V,E) on n vertices has at most \binom{n}{2} = \frac{n(n-1)}{2} distinct global min-cuts.
Let C_1, C_2, \dots, C_r be the distinct global min-cuts of G (each of size k).
For any specific min-cut C_i, Karger’s algorithm outputs C_i with probability: \Pr(\text{Algorithm outputs } C_i) \ge \frac{2}{n(n-1)} = \frac{1}{\binom{n}{2}}
Crucially, the algorithm outputs exactly one cut per run. The events of outputting different cuts C_i and C_j are mutually exclusive: \sum_{i=1}^r \Pr(\text{Algorithm outputs } C_i) \le 1
Substituting our lower bound: \sum_{i=1}^r \frac{1}{\binom{n}{2}} \le 1 \implies r \cdot \frac{1}{\binom{n}{2}} \le 1 \implies r \le \binom{n}{2}
Power of Randomization: A purely deterministic, structural combinatorial bound proved easily via a randomized algorithm!
We repeat the contraction algorithm N times independently and return the smallest cut found.
The probability that we fail to find C in all N runs is: \Pr(\text{Failure}) \le \left(1 - \frac{2}{n(n-1)}\right)^N \approx \left(1 - \frac{2}{n^2}\right)^N
Using the identity 1 - x \le e^{-x}, we set N = c \cdot \frac{n^2}{2} \ln n: \Pr(\text{Failure}) \le e^{-\left(\frac{2}{n^2}\right) \cdot c \frac{n^2}{2} \ln n} = e^{-c \ln n} = n^{-c}
Conclusion: Repeating O(n^2 \log n) times finds the min-cut with high probability (1 - 1/n^c).
Total Runtime: A single contraction run takes O(n^2) time. Repeating O(n^2 \log n) times yields a total runtime of O(n^4 \log n).
If deterministic Hao–Orlin runs in O(n^2 \log n) time, why study O(n^4 \log n) Karger?
| Algorithm | Complexity | Code Lines |
|---|---|---|
| Hao-Orlin | $O(n^2 \log n)$ | Hundreds (flow) |
| Karger | $O(n^4 \log n)$ | ~10-15 lines |
| Karger-Stein | $O(n^2 \log^3 n)$ | ~30 lines |
A branching recursive contraction algorithm to speed up the process:
Why is the success probability \Omega(1/\log n) instead of \Omega(1/n^2)?
Answer each question based on Karger’s algorithm:
Expected-Time Data Structures: Skip Lists — balanced search structures without deterministic rebalancing overhead, and backward analysis.
CS G526: Advanced Algorithms & ComplexityTulasimohan Molli