Supervertex contractions and Karger's survival bounds #
Combinatorial and probabilistic core for Karger's randomized contraction algorithm [Karger1993]
and the Karger–Stein recursive algorithm [KargerStein1996] on n-vertex weighted undirected
multigraphs represented as symmetric zero-diagonal adjacency matrices W : Fin n → Fin n → ℕ.
Multigraphs, cut weights, global minimum cuts and contractions along supervertex maps are the
general notions of CslibFrontier.Foundations.Combinatorics.WeightedCut (Cslib.WeightedCut), and
the swap-compacted contraction of one pair of supervertices (mergePair, embedCompact,
contractMatrix, contractPart) is
CslibFrontier.Foundations.Combinatorics.WeightedCut.Contraction;
this module adds edge-weight-proportional sampling and the survival bounds. Nothing here refers to
a machine: the word-RAM programs (CslibFrontier.Algorithms.WordRAM.Karger.Contract,
CslibFrontier.Algorithms.WordRAM.KargerMinCut) store the matrix in row-major order
(Cslib.Algorithms.WordRAM.Karger.flattenMatrix) and import these facts.
Source statements and notation mapping #
- Cut-survival bounds (paraphrase):
[Karger1993], Section 2, Theorem 2.1 and Corollary 2.1 (paraphrase): contracting randomly chosen edges in ann-vertex multigraph down to2meta-vertices preserves any fixed global minimum cut with probability at leastC(n, 2)⁻¹ = 2 / (n * (n - 1)), and repeatingO(n ^ 2 log n)independent trials finds a minimum cut with high probability.[KargerStein1996], Section 2, Lemma 2.1, Theorem 2.2, and Corollary 2.3, and Section 2.1, Corollary 2.4 (paraphrase): a fixed cut survives contraction if and only if no contracted edge crosses it; atkactive supervertices every singleton cut has weight at leastminCut W, so total doubled weightSis at leastk * minCut W, a single edge-weight-proportional step crosses a fixed minimum cut with probability at most2 / k, and contracting fromndown totsupervertices preserves the cut with probability at leastC(t, 2) / C(n, 2) = t * (t - 1) / (n * (n - 1)).[MitzenmacherUpfal2017], Section 1.5, Theorem 1.8 (paraphrase): multiplying the conditional single-step survival bounds1 - 2 / i = (i - 2) / ifori = n, …, 3telescopes to2 / (n * (n - 1)).
- Notation mapping and implementation variants:
C(t, 2) / C(n, 2)andC(n, 2)⁻¹↔((t * (t - 1) : ℕ) : ℝ≥0∞) / (n * (n - 1))and2 / (n * (n - 1))(step_survival_prob_ge,telescope_survival_step);[KargerStein1996], Section 3.1, Lemma 3.1 selects(u, v)with probability2 * W u v / Svia twoRandom-Selectdraws (uproportional toD(u)thenvproportional toW(u, v)); ouredgeOffset/IsSampledPairformalizes an equivalent single-draw variant using one uniform drawr ∈ Fin S(S = totalDoubledWeight W = ∑ u, rowDeg W u) resolved by prefix sums overrowDegthen row weightsW u v, achieving the same2 * W u v / Sdistribution;[KargerStein1996], Section 3.2 (Figure 5) updates then × nmatrix inO(n)time per contraction (hence Corollary 3.2'sO(n ^ 2)total); ourembedCompact/contractMatrixswap-compacts active slotk - 1into the removed slotvso each contraction onkactive supervertices scans only0..k - 1(O(k)time);highProbTrials n = (n * (n - 1) / 2) * (Nat.log 2 n + 2)and the elementaryReal.exp-free Bernoulli boundhighProb_failure_le(≤ 1 / (2 * n)) are our own concrete parameter choices instantiating theO(n ^ 2 log n)repeated-trial amplification of[Karger1993], Section 2, Corollary 2.1.
Main definitions #
Cslib.Algorithms.Karger.edgeOffset,Cslib.Algorithms.Karger.IsSampledPair: prefix-sum interval characterization of edge-weight-proportional sampling fromFin S.
Main results #
Cslib.Algorithms.Karger.surviving_card_eq,Cslib.Algorithms.Karger.step_survival_prob_ge: a fixed minimum cut survives one edge-proportional contraction onksupervertices with probability at least(k - 2) / k.Cslib.Algorithms.Karger.telescope_survival_step: telescoping multiplication identity((m - 1) / (m + 1)) * (t * (t - 1) / (m * (m - 1))) = t * (t - 1) / ((m + 1) * m)inℝ≥0∞.Cslib.Algorithms.Karger.highProb_failure_le: elementary Bernoulli amplification bound(1 - 2 / (n * (n - 1))) ^ ((n * (n - 1) / 2) * (Nat.log 2 n + 2)) ≤ 1 / (2 * n).
References #
IsSampledPair W r u v holds when sample r falls inside the half-open interval
[edgeOffset W u v, edgeOffset W u v + W u v).
Instances For
One-step survival probability lower bound: if k ≥ 2, 0 < totalDoubledWeight W, and
k * cutWeight W B ≤ totalDoubledWeight W, then a uniform sample r : Fin (totalDoubledWeight W)
satisfies SampleSurvives W B r with probability at least (k - 2) / k.
Telescoping and Bernoulli amplification #
Telescoping cancellation step for contractDownTo survival probability from m + 1 down to
t (2 ≤ t ≤ m):
((m - 1) / (m + 1)) * (t * (t - 1) / (m * (m - 1))) = t * (t - 1) / ((m + 1) * m).
Elementary high-probability trial count (n * (n - 1) / 2) * (Nat.log 2 n + 2) for Basic
Karger amplification.
Instances For
Elementary failure probability bound for highProbTrials n independent contractions:
(1 - 2 / (n * (n - 1))) ^ ((n * (n - 1) / 2) * (Nat.log 2 n + 2)) ≤ 1 / (2 * n).