Motivation
The Hitchcock transportation problem asks how to ship a commodity from m supply points to n demand points at minimum total cost. It was posed by Hitchcock in 1941 and is one of the founding problems of linear programming and network optimization; it is solved routinely in logistics, and its structure (a bipartite network with supplies, demands and per-unit costs) recurs in assignment, optimal transport and matching.
The classical algorithms for it, the Ford–Fulkerson primal–dual method among them, augment flow one path at a time. With integral data their number of augmentations is bounded only by the total supply ∑iai, which is exponential in the number of binary digits used to write the data. Edmonds and Karp, Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems (J. ACM 19(2), 1972, doi:10.1145/321694.321699), introduced capacity scaling: solve a coarse version of the problem first, then refine one binary digit at a time. Their Theorem 9 (p. 260) bounds the total number of augmentations by a quantity proportional to max(m,n) times the number of bits of the data, which made the transportation problem, and through standard reductions the minimum-cost flow problem, one of the first network problems with a polynomial-time ("good") algorithm in the sense of Edmonds.
Timeline. Hitchcock (1941) posed the problem; Ford and Fulkerson (1956–1962) gave the primal–dual labeling method and the optimality conditions by node potentials; Edmonds and Karp (1972) gave the scaling method and the bound formalized here. Strongly polynomial algorithms, independent of the size of the numbers, came later (Tardos 1985; Orlin 1988).
Setting
The network of Figure 1 (p. 259) has a source s, a sink t, supply nodes s1,…,sm and demand nodes t1,…,tn, with m,n≥1. Its arcs are (s,si) with capacity ai and cost 0; (si,tj) with capacity +∞ and cost dij≥0; (tj,t) with capacity bj and cost 0; and the return arc (t,s) with capacity +∞ and cost 0. The supplies ai and demands bj are positive integers with ∑iai=∑jbj=:B.
A flow assigns a nonnegative number to every arc, at most the capacity, with inflow equal to outflow at every node. Write f0i=f(s,si), fij=f(si,tj), fj0=f(tj,t); the value of f is f(t,s), and a maximum flow is one of largest value. Its cost is ∑i,jdijfij; a flow is extreme if no flow of the same value is cheaper. A flow is pseudo-extreme if there are real ui,vj with ui−vj+dij≥0 for all i,j and fij=0 whenever ui−vj+dij>0.
An augmenting path relative to f is a sequence of distinct nodes from s to t in which each step either follows an arc with spare capacity or traverses backwards an arc carrying positive flow; augmenting pushes the minimum spare amount ε along it and raises f(t,s) by ε.
For p≥0, Problem p has the same network and costs, with capacities ⌊ai/2p⌋ and ⌊bj/2p⌋. Choose l with every ai,bj<2l. The scaling method solves Problems l−1,l−2,…,0 in turn. Each phase performs augmentations keeping every flow pseudo-extreme, until no augmenting path is left. Problem l−1 starts from the zero flow, and Problem p−1 starts from twice the final flow of Problem p.
Formalization targets
Goal: Theorem 9
For every run of the scaling method, the total number ∑p<lKp of flow augmentations satisfies
p=0∑l−1Kp≤max(m,n)(2+⌊log2max(m,n)∑i=1mai⌋).
The bound holds for every l admissible for the data and every choice of costs, and is stated with the paper's constant exactly.
Milestones
- §1.1: augmentation preserves feasibility and raises the value by ε>0; a flow is maximum iff no augmenting path exists.
- Theorem 8: a maximum flow is extreme iff there are potentials u0,…,um, v0,…,vn with (5a)–(5f).
- §2.2: a pseudo-extreme maximum flow is extreme.
- Lemma 3: if f is pseudo-extreme in Problem p, then 2f is pseudo-extreme in Problem p−1.
- The maximum-flow value of Problem p is fp∗=min(∑i⌊ai/2p⌋,∑j⌊bj/2p⌋).
- Eq. (6): ∑pKp≤f0∗−∑p=1l−1fp∗.
- fp∗≥max(0,B/2p−max(m,n)).
Significance
The result. Theorem 9 shows that scaling reduces the number of augmentations from order B to order max(m,n)log2(B/max(m,n)), which is roughly the length of the binary encoding of the data. Combined with the O(mn) cost of one augmentation it gives a polynomial-time algorithm for the transportation problem; through the reduction of minimum-cost flow to transportation (p. 261) it gives one for minimum-cost flow. Capacity and cost scaling became standard techniques in network optimization and in combinatorial optimization generally. Theorem 8 and the pseudo-extreme criterion are the optimality certificates for transportation, a special case of linear-programming complementary slackness.
Formalizing it. The theorem has been proved since 1972. This mission produces a machine-checked version of the bound, of the exact counting argument (eq. (6)) and of the arithmetic estimate that turns it into the stated constant, together with the potential-based optimality conditions for the transportation network. To our knowledge no machine-checked bound on the number of augmentations of a flow algorithm exists on the platform.
Difficulty
The obvious argument bounds the number of augmentations by the increase in flow value, since each augmentation raises the value by a positive integer. Applied to Problem 0 directly this gives only B. The scaling bound needs three things that the naive count does not supply. First, doubling the final flow of Problem p must give a feasible, still pseudo-extreme, starting flow for Problem p−1 (Lemma 3). Second, the gap between that start and the optimum of Problem p−1 must be small, which requires the exact maximum-flow value fp∗ of each scaled problem. Third, the telescoping sum of the gaps must be estimated against log2(B/max(m,n)) with the floors handled exactly. Integrality of every intermediate flow is not assumed; it has to be carried along the run from the integral capacities and the zero start.
Formalization scope
Everything lives in the namespace EdmondsKarp.Scaling. Nodes form an inductive type (s, t, src i, dst j). A flow is a structure with components f0, fx, fz, ret for the four arc families, real valued; the infinite capacities are encoded by the absence of an upper bound. IsMaxFlow is a predicate comparing values with every flow, not a supremum. Problem p uses natural-number division for ⌊ai/2p⌋. Augmenting paths are lists of distinct nodes from s to t whose consecutive pairs have positive residual amount (resCap, valued in WithTop ℝ); they never use the return arc.
A run of the scaling method (IsScalingRun) is a family of phases Fp0,…,Fp(Kp) for p<l. It starts from 0 in Problem l−1, restarts from 2Fp(Kp) in Problem p−1, and advances by one augmentation per step. Every flow is pseudo-extreme, and each phase ends with no augmenting path left. The paper's path-selection rule (minimum weight for the modified reduced costs Δˉ) is abstracted to this invariant, which the paper states for it, so every run of the paper's method is covered.
The goal compares the count, cast to Z, with max(m,n)(2+⌊log2(B/max(m,n))⌋), using Real.logb 2 and Int.floor. The constant is the printed one; neither O(⋅) nor a weaker constant is acceptable. Positivity of all ai,bj is a hypothesis, because without it the printed bound is false (for m=5, n=1, a=(1,0,0,0,0), b=(1) one augmentation is needed and the bound is negative). A formalization in which runs could be empty or never reach a maximum flow would trivialize the goal; the run predicate forbids this, and it is satisfiable (for instance with m=n=1, a=b=(1), l=1 and one augmentation).
A complete development needs max-flow/min-cut for the bipartite network, integrality of flows along a run, the exact value of fp∗, the telescoping identity and floor/logarithm estimates. LP duality or complementary slackness is needed only for Theorem 8. The augmenting-path and max-flow lemmas are reusable for other bipartite flow problems. Contributions welcome: proofs of any milestone, and a formalization of the paper's exact Δˉ path rule showing that it satisfies the invariant.
Selected references
- J. Edmonds, R. M. Karp, Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems, Journal of the ACM 19(2):248–264, 1972. https://doi.org/10.1145/321694.321699
- F. L. Hitchcock, The Distribution of a Product from Several Sources to Numerous Localities, Journal of Mathematics and Physics 20:224–230, 1941. https://doi.org/10.1002/sapm1941201224
- L. R. Ford, D. R. Fulkerson, Flows in Networks, Princeton University Press, 1962. https://doi.org/10.1515/9781400875184
- É. Tardos, A strongly polynomial minimum cost circulation algorithm, Combinatorica 5:247–255, 1985. https://doi.org/10.1007/BF02579369
- J. B. Orlin, A faster strongly polynomial minimum cost flow algorithm, Proc. STOC 1988, 377–387. https://doi.org/10.1145/62212.62249