Algorithm Search⌘K

Proofs: Network simplex method

These are the human proofs of Network simplex method, at full length.

The network simplex method with strongly feasible trees is correct and finite full

This proof shows: correctness, termination.

Setting. G=(V,E)G = (V, E) is directed with finite capacities u≥0u \ge 0, costs cc of any sign, and supplies bb with ∑vb(v)=0\sum_v b(v) = 0. The extended network G+G^+ adds a root rr and one artificial edge per vertex, of cost MM and unlimited capacity, as in line L1. Edges of capacity 0 are fixed at 0 and ignored below. C=max⁡e∣c(e)∣C = \max_e |c(e)|, and M=(C+1)(n+1)M = (C + 1)(n + 1), so 2M>(n−1)C2M > (n - 1) C.

A tree solution is a spanning tree TT of G+G^+ and a feasible flow xx of G+G^+ in which every non-tree edge is empty or full. For a direction of travel along an edge, the residual is u(e)−x(e)u(e) - x(e) when walking from tail to head, and x(e)x(e) when walking from head to tail. TT is strongly feasible if, for every vertex vv, every edge of the tree path from vv to rr, walked toward rr, has positive residual. Potentials π\pi and reduced costs cπc^{\pi} are as on the page; tree edges have cπ=0c^{\pi} = 0.

Lemma 1 (start). The first tree is a strongly feasible tree solution.

Proof. The artificial flows meet every supply: v→rv \to r carries b(v)≥0b(v) \ge 0 out of vv, and r→vr \to v carries −b(v)-b(v) into vv, and rr is balanced since ∑b=0\sum b = 0. Real edges are empty, which is a bound. A tree path from vv to rr is one artificial edge. If it is v→rv \to r, walking toward rr follows the edge, whose capacity is unlimited. If it is r→vr \to v, walking toward rr goes against it, with residual −b(v)>0-b(v) > 0. □\square

Lemma 2 (cost change). For any feasible flows xx, yy of G+G^+ and any potentials π\pi, c(y)−c(x)=∑ecπ(e)(y(e)−x(e))c(y) - c(x) = \sum_e c^{\pi}(e)(y(e) - x(e)).

Proof. ∑e(π(tail e)−π(head e))(y(e)−x(e))=∑vπ(v) (net outflow of y−x at v)=0\sum_e (\pi(\mathrm{tail}\,e) - \pi(\mathrm{head}\,e))(y(e) - x(e)) = \sum_v \pi(v)\,(\text{net outflow of } y - x \text{ at } v) = 0, because y−xy - x has net outflow 0 at every vertex. □\square

Lemma 3 (a pivot). Let ee be eligible, and let WW be its cycle, oriented as at line L5. Pushing δ\delta units around WW keeps feasibility, keeps every non-tree edge at a bound after the exchange of line L8, and changes the cost by −δ ∣cπ(e)∣-\delta\,|c^{\pi}(e)|.

Proof. δ\delta is the least residual along WW in its orientation, so no bound is crossed, and a push around a cycle keeps every net outflow. The edge ff has residual δ\delta, so after the push it is at a bound and may leave the tree; T−f+eT - f + e is a spanning tree because ff lies on the unique cycle of T+eT + e. The entering edge has positive residual in its orientation, at least u(e)>0u(e) > 0, and δ\delta is finite because ee has finite capacity. By Lemma 2 with the old potentials, only ee has a nonzero reduced cost on WW, and it changes by δ\delta in the direction that lowers the cost by δ ∣cπ(e)∣\delta\,|c^{\pi}(e)|. □\square

Lemma 4 (strong feasibility is kept). If TT is strongly feasible and ff is chosen as at line L6, then T′=T−f+eT' = T - f + e is strongly feasible.

Proof. Let ww be the apex. Walk WW in its orientation from ww; ff splits the walk into the part before ff and the part after ff. Removing ff and adding ee, the vertices of WW after ff reach ww in T′T' by continuing along the orientation, and the vertices before ff reach ww by going back against it. Vertices off WW keep their path to WW or to rr, and the path from ww to rr is unchanged; its edges have positive residual toward rr by strong feasibility of TT, and the push did not touch them.

After ff. Every edge of WW after ff is not blocking, by the choice of ff as the last blocking edge, so its residual in the orientation was larger than δ\delta, and after the push it is still positive.

Before ff. Walking against the orientation, the residual of each edge rose by δ\delta. If δ>0\delta > 0, it is positive. If δ=0\delta = 0, we show that ff is on the path from ww to the start aa of ee; then the edges before ff lie on that path, and walking against the orientation there goes up the tree toward ww, where TT had positive residuals, which the push of 0 units did not change. The walk after ee goes from the end of ee up the tree to ww, so those edges have positive residual by strong feasibility, and they are not blocking. The entering edge has residual u(e)>0u(e) > 0. So every blocking edge, and ff in particular, lies on the path from ww down to aa.

So every vertex has a path to rr in T′T' with positive residuals toward rr. □\square

Lemma 5 (potentials rise in a degenerate pivot). If δ=0\delta = 0, the new potentials π′\pi' agree with π\pi outside the subtree XX that ff cut off from rr, and π′(v)=π(v)+∣cπ(e)∣\pi'(v) = \pi(v) + |c^{\pi}(e)| for v∈Xv \in X.

Proof. By Lemma 4, ff is on the path from ww down to aa, so XX is the part below ff, and it contains aa and not the other end of ee. Tree edges inside XX and outside XX are unchanged, so π′\pi' differs from π\pi by a constant Δ\Delta on XX and agrees with it outside, with π′(r)=0\pi'(r) = 0. The new tree edge ee needs reduced cost 0. If e=(a,b)e = (a, b) was empty, c(e)+π(a)+Δ−π(b)=0c(e) + \pi(a) + \Delta - \pi(b) = 0 gives Δ=−cπ(e)>0\Delta = -c^{\pi}(e) > 0. If e=(b,a)e = (b, a) was full, c(e)+π(b)−π(a)−Δ=0c(e) + \pi(b) - \pi(a) - \Delta = 0 gives Δ=cπ(e)>0\Delta = c^{\pi}(e) > 0. □\square

Theorem. The method stops. At the end, if an artificial edge carries flow, GG has no feasible flow; otherwise the flow on the real edges is a minimum-cost feasible flow of GG.

Proof. Termination. A tree solution is determined by TT and by which non-tree edges are full, so there are finitely many. By Lemma 3 a pivot with δ>0\delta > 0 lowers the cost, and by Lemma 5 a pivot with δ=0\delta = 0 keeps the cost and raises ∑vπ(v)\sum_v \pi(v), which depends only on TT. So the pair (cost, −∑vπ(v)-\sum_v \pi(v)) decreases strictly in the lexicographic order at every pivot, no tree solution repeats, and the loop ends.

Optimality in G+G^+. At the end no edge is eligible: tree edges have cπ=0c^{\pi} = 0, empty edges cπ≥0c^{\pi} \ge 0, full edges cπ≤0c^{\pi} \le 0. For any feasible yy of G+G^+, each term of Lemma 2 is ≥0\ge 0: where x(e)=0x(e) = 0, y(e)−x(e)≥0y(e) - x(e) \ge 0 and cπ(e)≥0c^{\pi}(e) \ge 0; where x(e)=u(e)x(e) = u(e), y(e)−x(e)≤0y(e) - x(e) \le 0 and cπ(e)≤0c^{\pi}(e) \le 0. So xx is optimal in G+G^+.

Artificial flow. If xx uses no artificial edge, its restriction is a feasible flow of GG, and it is optimal in GG since every flow of GG is a flow of G+G^+ of the same cost. Suppose instead xx uses an artificial edge but GG has a feasible flow zz, extended by 0 on artificial edges. Then d=x−zd = x - z has net outflow 0 everywhere, and it splits into simple cycles CiC_i with weights λi>0\lambda_i > 0, each conformal to dd: it walks forward only where d>0d > 0 and backward only where d<0d < 0. Some cycle uses an artificial edge, since dd is positive there. A simple cycle through rr uses exactly two artificial edges, both forward because d≥0d \ge 0 on them, and at most n−1n - 1 real edges, so its cost is at least 2M−(n−1)C>02M - (n - 1) C > 0. Subtracting λiCi\lambda_i C_i from xx for all such cycles gives a flow yy that lies between xx and zz on every edge, hence is feasible in G+G^+, and c(y)<c(x)c(y) < c(x). This contradicts the optimality of xx. So artificial flow at the end means that GG has no feasible flow. ■\blacksquare

Back to Network simplex method