Proofs: Maximum-capacity augmenting path algorithm
These are the human proofs of Maximum-capacity augmenting path algorithm, at full length.
The maximum-capacity augmenting path algorithm returns a maximum flow after at most m ln f* + 1 augmentations full
This proof shows: correctness, termination, complexity.
Setting. is a directed graph with vertices, edges, integer capacities , a source and a sink . Parallel and antiparallel edges are allowed. For a flow , the residual graph has, for each edge , a forward residual edge of capacity and a backward residual edge of capacity . The bottleneck of a path is the least residual capacity on it. Let be the maximum flow value.
Lemma 1 (WIDEST-PATH). When a vertex is extracted for the first time at line L9, equals the largest bottleneck of an - path in (with ), and following via from gives a path with that bottleneck. Vertices with keep .
Proof. Every value is the bottleneck of the path that via records, so always. Suppose the claim fails, and let be the first extracted vertex with . Take a path from to with bottleneck . Let be the first edge of with extracted and not yet extracted before ; it exists because is extracted first and is not yet extracted. The part of up to has bottleneck at least , so and, by the choice of , . When was scanned, line L12 made , and entered with that key. Since came out of before , , a contradiction. The case gives directly.
So WIDEST-PATH returns an empty path exactly when has no - path of positive capacity, and otherwise a path with the largest bottleneck.
Lemma 2 (augmentation). If is an - path in with bottleneck , line L5 gives a flow of value .
Proof. On a forward edge the flow rises by ; on a backward edge it falls by ; so capacities hold. Each inner vertex of has one edge of in and one out, and in each of the four cases of forward or backward edges the net change of its inflow minus outflow is 0. At the net outflow rises by .
Lemma 3 (a wide path exists). If , then has an - path with bottleneck at least .
Proof. Let be a maximum flow. Define on edge by edge: for , if put on the forward residual edge, and otherwise put on the backward one. These amounts are within the residual capacities, is conserved at every vertex other than and because and are, and its value is . At most one residual edge per edge of carries , so has at most edges in its support. By flow decomposition, is a sum of at most path flows and cycle flows, each removing at least one support edge, and the path flows sum to . So some - path carries at least , and each of its edges has residual capacity at least that much.
Lemma 4 (termination). With integer capacities the flow stays integral, and each is a positive integer.
Proof. By induction: residual capacities of an integral flow are integers, so is a positive integer, and Lemma 2 keeps the flow integral.
Theorem. The algorithm stops after at most augmentations when , and after none when . It returns a maximum flow , and the set of vertices that reaches in is a minimum cut.
Proof. Let be the missing flow after augmentations, so . By Lemmas 1 and 3, the next augmentation uses , so , and . For this is less than 1, and is an integer by Lemma 4, so . So after augmentations the flow is maximum; then has no positive - path (otherwise Lemma 2 would give a larger flow), WIDEST-PATH returns empty, and the loop stops. If , at the start has no positive - path and the loop stops at once. At the end, ; every edge from to is full and every edge from to is empty, since otherwise a residual edge would leave . So , and by weak duality is maximum and is a minimum cut.