A New Approach to the Maximum-Flow Problem 1: The Generic Push-Relabel Algorithm and Its Operation BoundResearch Paper
Motivation
The maximum-flow problem asks how much of a commodity can be sent from a source to a sink through a network whose edges have capacities. It is a basic model in operations research (transportation, scheduling, bipartite matching) and a standard subroutine in combinatorial optimization.
Classical algorithms, from Ford and Fulkerson (1956) through Edmonds–Karp and Dinic (1970–1972) and Karzanov (1974), increase a feasible flow along augmenting paths or blocking flows. Goldberg and Tarjan, A New Approach to the Maximum-Flow Problem (J. ACM 35(4), 1988, doi:10.1145/48014.61051), replaced this global view by a local one: the push-relabel method maintains a preflow, which may violate conservation at intermediate vertices, and moves excess along edges toward vertices with smaller distance labels. The generic method, with the basic operations applied in any order, is the starting point of the FIFO, highest-label and dynamic-tree implementations analysed later in the same paper, and push-relabel codes remain among the fastest practical maximum-flow solvers.
This mission formalizes §2–§3 of the paper: the generic algorithm is correct, and it stops after a number of basic operations bounded by an explicit polynomial in the numbers of vertices and edges, whatever order of operations is chosen.
Setting
A flow network has a finite vertex set with , a source and a sink , and a capacity for every ordered pair of vertices, positive exactly on the edges ; , and there are no loops, .
Flows are real functions on all vertex pairs. A function satisfies the capacity constraint if and antisymmetry if for all pairs. The excess of is . A flow also has for ; a preflow only for . The value of a flow is , and a maximum flow is a flow of maximum value.
The residual capacity is ; pairs with are the edges of the residual graph . A valid labeling is with , and on every residual edge. A vertex is active if , and .
The two basic operations (Fig. 1 of the paper) are:
- Push, applicable when is active, and : send , i.e. , . It is saturating if afterwards and nonsaturating otherwise.
- Relabel, applicable when is active and for every residual edge : set ( if there is none).
The generic algorithm (Fig. 2) starts from the preflow that saturates every edge leaving and is zero elsewhere, with the simple labeling , otherwise, and applies applicable basic operations in any order while one exists. An execution with basic operations is a sequence of states from the initial state, each obtained from the previous one by one applicable operation.
Formalization targets
Goal: Theorems 3.11 and 3.4
Assume the paper's standing assumption . For every execution with basic operations,
and if no basic operation applies in the final state, then is a maximum flow. The paper states the bound as and proves it as "immediate from Lemmas 3.8, 3.9, and 3.10"; the goal states the sum of those three printed bounds. Since every execution is this short, no order of operations runs forever.
Milestones
In the order the proof uses them: Lemma 2.1 (at an active vertex a push or a relabel applies); Lemma 3.1 (the labeling stays valid); Theorem 3.2 (Ford–Fulkerson: a flow is maximum iff is unreachable from in ); Lemma 3.3 (under a valid labeling is unreachable from ); Lemma 3.5 (from any vertex with positive excess, is reachable); Lemma 3.6 (labels never decrease; a relabeling increases the label); Lemma 3.7 ( throughout); Theorem 3.4 (termination with finite labels gives a maximum flow); Lemma 3.8 ( relabelings per vertex, in total); Lemma 3.9 ( saturating pushes); Lemma 3.10 ( nonsaturating pushes, under ). A further, non-milestone item states the unnumbered invariant that every is a preflow.
Significance
The generic bound shows that push-relabel terminates in a polynomial number of steps without any rule for choosing the next operation; the specific orderings of §4–§5 of the paper (first-in first-out, ; dynamic trees, ) refine only the count of nonsaturating pushes, and reuse Lemmas 3.1–3.9 unchanged. The correctness argument, a valid labeling excludes augmenting paths, is the template for the push-relabel minimum-cost flow and assignment algorithms that followed.
These results are proved in the paper and are textbook material. Their machine-checked counterparts are, as far as is known here, not on the Prove2Me platform: the platform's network-flow statements (from Introduction to Linear Optimization, e.g. LinearOptimization.max_flow_min_cut) use a different model, with arc-indexed nonnegative flows and extended-real capacities, and contain nothing about preflows, labels or operation counts. This mission produces a formal account of the antisymmetric-flow model, of Ford–Fulkerson in that model, and of the amortized counting arguments, with the constants the paper prints.
Difficulty
The correctness half is short once the invariants are in place; the difficulty is in the counting. The label bound (Lemma 3.7) is a statement about the whole execution, and it depends on a structural fact about preflows (Lemma 3.5) whose truth rests on antisymmetry and on the nonnegativity of excesses. The obvious first idea for the push counts, bounding pushes per edge or per vertex locally, fails for nonsaturating pushes: flow pushed across a pair can be pushed back later, and nothing local limits how often this happens, so Lemma 3.10 holds only as an amortized statement over the entire execution and depends on both earlier counts. Saturating pushes on a pair can also recur, in both directions, and Lemma 3.9 has to control the interaction between the two directions.
Formally, all of this is reasoning about arbitrary interleavings of operations, with labels in and real-valued flows.
Formalization scope
- Vertices form a finite type with decidable equality; is its cardinality, , so and the natural-number subtractions and are exact. Capacities are a real function on all pairs, nonnegative, zero on the diagonal; is its support and its cardinality.
- Flows and preflows are antisymmetric real functions on all pairs (not nonnegative arc flows); the excess is computed from , never stored. A maximum flow is a flow whose value is at least that of every flow.
- Labels live in
ℕ∞, with ; the relabel value is an infimum, which is on the empty set. - An execution is a sequence of states
σ : ℕ → State Vwith a length , starting at the Fig. 2 state with the simple labeling (the paper's own assumption for its proofs), each step an applicable push or relabel. "Terminates" means that no basic operation applies, the loop guard of Fig. 2. The three counts are cardinalities of the sets of step indices of each kind. - Explicit constants: per-vertex relabelings, total relabelings, saturating pushes, nonsaturating pushes, label bound , and the total . The standing assumption appears only on Lemma 3.10 and the goal.
- A trivializing formalization is ruled out: the step relation fixes the pushed amount and the new label exactly as in Fig. 1, termination is the loop guard rather than "the result is a flow", and a sorry-free check exhibits a concrete network with a two-step execution (relabel , then push ), so the run hypotheses are satisfiable.
Welcome contributions: proofs of the invariants (preflow, valid labeling, label monotonicity), of Ford–Fulkerson for antisymmetric flows (reusable beyond this mission), and of the counting lemmas. The FIFO bound of §4 is the subject of a companion mission.
Selected references
- A. V. Goldberg, R. E. Tarjan, A New Approach to the Maximum-Flow Problem, Journal of the ACM 35(4):921–940, 1988. doi:10.1145/48014.61051
- L. R. Ford, D. R. Fulkerson, Flows in Networks, Princeton University Press, 1962.
- J. Edmonds, R. M. Karp, Theoretical improvements in algorithmic efficiency for network flow problems, Journal of the ACM 19(2):248–264, 1972. doi:10.1145/321694.321699
- R. K. Ahuja, T. L. Magnanti, J. B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice Hall, 1993.