Algorithm Search⌘K

Proofs: Nagamochi-Ibaraki algorithm

These are the human proofs of Nagamochi-Ibaraki algorithm, at full length.

The Nagamochi-Ibaraki algorithm returns a global minimum cut full

This proof shows: correctness, termination.

Setting. G=(V,E)G = (V, E) is undirected with weights w>0w > 0 (zero-weight edges are dropped), parallel edges summed, no self-loops, and n≥2n \ge 2. For a set XX and a vertex v∉Xv \notin X, w(X,v)w(X, v) is the weight of the edges between them, and d(v)=w(V∖{v},v)d(v) = w(V \setminus \{v\}, v). For x≠yx \ne y, λG(x,y)\lambda_G(x, y) is the least weight of a cut that separates xx and yy, and λ(G)\lambda(G) is the least weight of any cut. A vertex of a contracted graph is a group of original vertices, and a cut of a contracted graph is a cut of GG of the same weight.

Lemma 1 (Stoer and Wagner). If v1,…,vkv_1, \ldots, v_k is an MA ordering of a graph HH with k≥2k \ge 2, then λH(vk−1,vk)=dH(vk)\lambda_H(v_{k-1}, v_k) = d_H(v_k).

Proof. This is Lemma 2 of the proof on the Stoer-Wagner page: the cut {vk}\{v_k\} has weight dH(vk)d_H(v_k), and every cut that separates vk−1v_{k-1} and vkv_k has weight at least w({v1,…,vk−1},vk)=dH(vk)w(\{v_1, \ldots, v_{k-1}\}, v_k) = d_H(v_k). That proof uses only the choice rule of the ordering, so it holds for every way of breaking ties. □\square

Lemma 2 (the bound qq). Let v1,…,vkv_1, \ldots, v_k be the MA ordering of a round, and let e={vi,vj}e = \{v_i, v_j\} with i<ji < j. Then q(e)=w({v1,…,vi},vj)q(e) = w(\{v_1, \ldots, v_i\}, v_j) and q(e)≤λG(vi,vj)q(e) \le \lambda_G(v_i, v_j), where GG here is the current graph.

Proof. key(vj)\mathrm{key}(v_j) grows by w(vl,vj)w(v_l, v_j) when vlv_l is scanned, for each l<jl < j, so right after viv_i is scanned it is w({v1,…,vi},vj)w(\{v_1, \ldots, v_i\}, v_j). Let HH be the subgraph induced by {v1,…,vi,vj}\{v_1, \ldots, v_i, v_j\}. The sequence v1,…,vi,vjv_1, \ldots, v_i, v_j is an MA ordering of HH: for l≤il \le i, the key of a vertex of HH when vlv_l is chosen is the same in HH as in GG, since it counts only edges to v1,…,vl−1v_1, \ldots, v_{l-1}, and vlv_l had a key at least as large as every unscanned vertex of GG, which includes the unscanned vertices of HH. By Lemma 1, λH(vi,vj)=dH(vj)=q(e)\lambda_H(v_i, v_j) = d_H(v_j) = q(e). Every cut CC of GG that separates viv_i and vjv_j gives the cut C∩V(H)C \cap V(H) of HH, which also separates them, and the edges of HH that cross it cross CC; so wG(C)≥wH(C∩V(H))≥q(e)w_G(C) \ge w_H(C \cap V(H)) \ge q(e). □\square

Lemma 3 (progress). In a round with β>0\beta > 0, at least one edge is contracted.

Proof. Let vkv_k be the last vertex of the ordering. After line L3, β≤d(vk)\beta \le d(v_k). Since β>0\beta > 0, d(vk)>0d(v_k) > 0, so vkv_k has a neighbor; let viv_i be the neighbor scanned last. By Lemma 2, the edge e={vi,vk}e = \{v_i, v_k\} has q(e)=w({v1,…,vi},vk)=d(vk)≥βq(e) = w(\{v_1, \ldots, v_i\}, v_k) = d(v_k) \ge \beta, so it is contracted. □\square

Theorem. The algorithm stops after at most n−1n - 1 rounds and returns β=λ(G)\beta = \lambda(G) with a set SS whose cut has weight β\beta.

Proof. By Lemma 3 every round either stops at line L4 or lowers the number of vertices, so there are at most n−1n - 1 rounds. Each value of β\beta is the weight of the cut of a group, so β≥λ(G)\beta \ge \lambda(G) and w(S)=βw(S) = \beta at all times.

Suppose the result is larger than λ(G)\lambda(G), and let CC be a minimum cut of GG, so w(C)<βw(C) < \beta at all times. We show that CC survives every contraction: whenever an edge ee is contracted in a round, q(e)≥β>w(C)q(e) \ge \beta > w(C), so by Lemma 2 CC does not separate the ends of ee, if CC is a cut of the current graph. By induction, CC is a cut of every graph of the run, as a union of groups, so every graph of the run has at least two vertices, one inside CC and one outside. So the loop of line L2 never ends by running out of vertices, and it must stop at line L4, with β=0≤w(C)\beta = 0 \le w(C). This contradicts w(C)<βw(C) < \beta. So the result is λ(G)\lambda(G). ■\blacksquare

Back to Nagamochi-Ibaraki algorithm