Algorithm Search⌘K

Proofs: Even-Tarjan vertex connectivity algorithm

These are the human proofs of Even-Tarjan vertex connectivity algorithm, at full length.

The Even-Tarjan algorithm returns the vertex connectivity full

This proof shows: correctness.

Let G=(V,E)G = (V, E) be an undirected graph with vertices v1,…,vnv_1, \ldots, v_n, n≥1n \ge 1. Parallel edges and loops are allowed. A loop joins a vertex to itself and parallel edges join the same two vertices, so neither changes which pairs of distinct vertices are adjacent, which ss-tt paths exist, or which sets XX make G−XG - X disconnected. So we may assume GG is simple. Define κ(G)\kappa(G) and κ(s,t)\kappa(s, t) as on the main page.

Lemma 1 (pairs). If GG is not complete, then κ(G)=min⁡{κ(s,t):s≠t not adjacent}\kappa(G) = \min \{ \kappa(s, t) : s \neq t \text{ not adjacent} \}.

Proof. If XX separates the non-adjacent ss and tt, then G−XG - X contains ss and tt and has no ss-tt path, so it is disconnected; hence κ(G)≤κ(s,t)\kappa(G) \le \kappa(s, t). Conversely, let G−XG - X be disconnected with ∣X∣=κ(G)|X| = \kappa(G), and pick ss and tt in two different components of G−XG - X. They are not adjacent, and XX separates them, so κ(s,t)≤∣X∣=κ(G)\kappa(s, t) \le |X| = \kappa(G). A non-complete graph has a non-adjacent pair s,ts, t, and V∖{s,t}V \setminus \{s, t\} separates them, so the sets in the definition are not empty. □\square

Lemma 2 (LOCAL). For non-adjacent s≠ts \neq t and an integer c≥0c \ge 0, LOCAL(s,t,c)(s, t, c) returns min⁡(c,κ(s,t))\min(c, \kappa(s, t)).

Proof. In the split digraph DD, a set of ff paths from ss to tt in GG that share no inner vertex gives ff arc-disjoint paths from souts_{\mathrm{out}} to tint_{\mathrm{in}}: the path s,w1,…,wr,ts, w_1, \ldots, w_r, t becomes sout,w1,in,w1,out,…,wr,out,tins_{\mathrm{out}}, w_{1,\mathrm{in}}, w_{1,\mathrm{out}}, \ldots, w_{r,\mathrm{out}}, t_{\mathrm{in}}, and two such paths share no arc since they share no ww. Conversely, an integral flow of value ff with unit capacities splits into ff arc-disjoint paths from souts_{\mathrm{out}} to tint_{\mathrm{in}}, and since the only arc that leaves winw_{\mathrm{in}} is win→woutw_{\mathrm{in}} \to w_{\mathrm{out}}, two of them never pass the same w∉{s,t}w \notin \{s, t\}. We may drop cycles from these paths, so a path ends at its first visit to tint_{\mathrm{in}} and never passes sins_{\mathrm{in}}, whose only leaving arc goes back to souts_{\mathrm{out}}. So the maximum flow value equals the most ss-tt paths in GG that share no inner vertex, which is κ(s,t)\kappa(s, t) by Menger's theorem (Diestel, Section 3.3). Each round of lines L11 and L12 adds 1 to an integral flow, and by the augmenting path theorem the loop stops without the cap exactly when the flow is maximum. So LOCAL returns cc if κ(s,t)≥c\kappa(s, t) \ge c, and κ(s,t)\kappa(s, t) otherwise. □\square

Lemma 3 (upper invariant). At every moment, k≥κ(G)k \ge \kappa(G).

Proof. At line L1, k=n−1≥κ(G)k = n - 1 \ge \kappa(G), because κ(G)≤n−1\kappa(G) \le n - 1 in both cases of the definition: a disconnecting set leaves at least two vertices. Line L6 only replaces kk by min⁡(k,x)\min(k, x) with x=min⁡(k,κ(vi,vj))x = \min(k, \kappa(v_i, v_j)), and both kk and κ(vi,vj)\kappa(v_i, v_j) are at least κ(G)\kappa(G) by induction and Lemma 1. □\square

Theorem. VERTEX-CONNECTIVITY(G)(G) returns κ(G)\kappa(G).

Proof. It terminates, since ii grows by one at each round of line L3, and k≤n−1k \le n - 1.

If GG is complete, line L5 never holds, kk stays n−1=κ(G)n - 1 = \kappa(G), and that is returned.

Otherwise let κ=κ(G)\kappa = \kappa(G), and let XX be a set with ∣X∣=κ|X| = \kappa such that G−XG - X is disconnected. Then ∣X∣≤n−2|X| \le n - 2, so the vertices v1,…,vκ+1v_1, \ldots, v_{\kappa + 1} exist and are κ+1\kappa + 1 in number, and at least one of them is not in XX. Let i∗i^* be the least index with vi∗∉Xv_{i^*} \notin X, so i∗≤κ+1i^* \le \kappa + 1. Pick a vertex vjv_j in a component of G−XG - X that does not contain vi∗v_{i^*}. Then vj∉Xv_j \notin X, and vjv_j is not adjacent to vi∗v_{i^*}. Every vℓv_\ell with ℓ<i∗\ell < i^* is in XX, so j>i∗j > i^*.

Suppose the algorithm returns a value other than κ\kappa. By Lemma 3 the value is larger, so k>κk > \kappa at every moment, since kk never increases. In particular, at the test of line L3 with i=i∗i = i^*, k≥κ+1≥i∗k \ge \kappa + 1 \ge i^*, so the loop body runs for i=i∗i = i^*. Line L4 reaches jj, line L5 holds, and line L6 sets kk to at most min⁡(k,κ(vi∗,vj))\min(k, \kappa(v_{i^*}, v_j)) by Lemma 2. Since XX separates vi∗v_{i^*} from vjv_j, κ(vi∗,vj)≤κ\kappa(v_{i^*}, v_j) \le \kappa, so k≤κk \le \kappa after this step, a contradiction. ■\blacksquare

Back to Even-Tarjan vertex connectivity algorithm