Flows in Networks VIII: Flow Functions Realizable by TreesTextbook
Motivation
In a communication or transportation network, a planner often needs not one maximal flow value but all of them: the largest amount that can be sent between every pair of locations. For an undirected network with nodes there are such values. In 1961, R. E. Gomory and T. C. Hu (Multi-terminal network flows, J. SIAM 9 (1961)) answered two questions about them. Which tables of numbers can occur as the all-pairs maximal flow values of some network? And how many maximal flow computations are needed to find them all? Mayeda (1960) and Chien (1960) studied the same questions at about the same time.
Ford and Fulkerson's Flows in Networks (RAND Report R-375-PR, 1962; Princeton University Press, 1962) gives the theory in its fourth chapter, "Multi-Terminal Maximal Flows", following Gomory and Hu. This mission formalizes the first half of that chapter: the cycle criterion for maximal spanning subtrees (§1), the characterization of flow functions and their realization by trees (§2), and the condensation lemma behind the Gomory–Hu procedure (§3).
Setting
An undirected network has a finite set of nodes and a set of undirected arcs. An arc joins two distinct nodes, and at most one arc joins any two nodes. Each arc carries a nonnegative real capacity .
A flow of value from to assigns to each ordered pair a number , the flow from to . It vanishes unless is an arc. On each arc it satisfies , and , so flow moves in only one direction. The net flow out of a node, , is at , at , and at every other node. The maximal flow value from to is the largest value of a flow from to . The book calls the function giving this value for every pair of distinct nodes the flow function of . It is symmetric, and is left undefined.
A symmetric function on pairs of distinct nodes is realizable if some undirected network on has flow function . It is realizable by a tree if the arcs of such a network form a tree on , that is, a connected graph without cycles.
For a set of nodes with complement , the cut capacity is the total capacity of the arcs joining to . is a minimal cut separating and if , , and no other such node set has a smaller cut capacity. The condensed network shrinks all of to a single node. Arcs between nodes of (the ordinary nodes) are kept. The arcs from an ordinary node to become one arc whose capacity is their sum.
Given a connected graph with real arc lengths , a spanning subtree is a tree obtained from by deleting arcs. Arcs of are in-tree and the rest are out-of-tree. is maximal if no spanning subtree of has a larger total length.
Formalization targets
Goal: Chapter IV, Theorem 2.1 (p. 8)
For a nonempty finite node set and a symmetric on pairs of distinct nodes, is realizable if and only if, for all pairwise distinct ,
Moreover, if is realizable, it is realizable by a tree.
Milestones
- Theorem 1.1 (p. 5). A spanning subtree is maximal if and only if, for each out-of-tree arc with in-tree chain ,
- Lemma 2.1 (p. 6). Every flow function satisfies (2.1).
- Lemma 2.2 (p. 8). Every symmetric satisfying (2.1) is the flow function of some undirected network.
- Lemma 3.1 (p. 11). Let be an minimal cut, and let be two distinct nodes of . The maximal flow value in the network condensed at equals the maximal flow value in the original network.
Significance
Theorem 2.1 says that the all-pairs maximal flow values of an undirected network take a very restricted form. Every network is flow-equivalent to a tree on the same nodes. At most distinct values occur. Every value is a minimum of values along a path. The Gomory–Hu tree, with its maximal flow computations instead of , rests on this structure, and Lemma 3.1 is what makes that procedure correct: each later flow problem can be solved on a smaller, condensed network without changing the answer. Gomory–Hu trees are used in network reliability, in the separation of odd-cut inequalities for matching polytopes (Padberg and Rao, 1982), and in graph clustering. Theorem 1.1 is the cycle-optimality criterion for maximum-weight spanning trees. It underlies the correctness of Kruskal's algorithm, which the book derives from it.
These are classical results, proved in the 1950s and 1960s. On Prove2Me, Padberg and Rao's odd-cut results take an odd cut-tree as a hypothesis and do not construct one. Minimum-spanning-tree exchange properties exist in other encodings (rooted parent functions, a list-scan Kruskal). No formal statement of the realizability theorem, of the triangle condition on flow functions, or of the condensation lemma is known on the platform. The work is to formalize the known proofs. They connect undirected maximal flows with the max-flow min-cut theorem, spanning-tree exchange arguments and cut submodularity, and every one of these is reusable on its own.
Difficulty
The obvious first step for Lemma 2.1 compares flows directly, and it does not work. The inequality is a statement about maxima, and a flow of value from to cannot be assembled by concatenating an – flow and a – flow, because the two flows compete for the same arc capacities. Every statement here is about attained maxima of flow values, and nothing in the mission's statements supplies the max-flow min-cut theorem for undirected networks with the one-direction constraint . A solver must bring that in. For Lemma 3.1, the two networks have different node types, so flows have to be transported between them in both directions, and the naive way of pushing a flow forward into the condensed network can lose value. For Theorem 1.1, necessity is a single exchange, but sufficiency is not: the book itself remarks that it is "not obvious".
Formalization scope
Nodes are a Fintype with decidable equality. Arcs are a Mathlib SimpleGraph, so they are undirected and loop-free with at most one arc per pair. Capacities are a symmetric real function, nonnegative on arcs. Flows are real functions on ordered pairs that satisfy the book's constraints (10.1) of Chapter I. The maximal flow value is an attained maximum (IsGreatest), never a bare supremum. A flow function is constrained only off the diagonal, matching the book's " undefined", so (2.1) is quantified over pairwise distinct nodes. The book's alternative convention is not used. Extending by on the diagonal would break (2.1) at . The goal and Lemma 2.2 assume off the diagonal. The book leaves this implicit (flow values are nonnegative), and without it the "if" direction fails for . The goal assumes nonempty, because a tree is connected. "Realizable by a tree" means the network's graph is a tree on all of . Some tree arcs may have capacity . The condensed network has node type Option X, where none is the condensed node. Spanning subtrees are subgraphs with T.IsTree. Lengths are a function on unordered pairs, and "the chain of in-tree arcs" is any path in , which is unique.
A trivializing formalization is excluded. The flow function is defined by actual flows, never by path minima in a tree or by cut capacities. Realizability is the existence of a network whose flows have those maximal values, never a restatement of (2.1).
Not included: Lemma 3.2 and Theorem 4.1. Both concern objects that the book defines by a construction ("the final tree " of the Gomory–Hu procedure, and the network of §4), and stating them faithfully would require formalizing those constructions. Contributions welcome: an undirected max-flow min-cut theorem in this encoding, the tree-network flow computation, and a formal Gomory–Hu construction for a later mission.
Selected references
- L. R. Ford, Jr. and D. R. Fulkerson, Flows in Networks, RAND Corporation Report R-375-PR, 1962; Princeton University Press, 1962. https://doi.org/10.1515/9781400875184
- R. E. Gomory and T. C. Hu, Multi-terminal network flows, Journal of the Society for Industrial and Applied Mathematics 9 (1961), 551–570. https://doi.org/10.1137/0109047
- J. B. Kruskal, On the shortest spanning subtree of a graph and the traveling salesman problem, Proceedings of the American Mathematical Society 7 (1956), 48–50. https://doi.org/10.1090/S0002-9939-1956-0078686-7
- R. C. Prim, Shortest connection networks and some generalizations, Bell System Technical Journal 36 (1957), 1389–1401. https://doi.org/10.1002/j.1538-7305.1957.tb01515.x
- M. W. Padberg and M. R. Rao, Odd minimum cut-sets and b-matchings, Mathematics of Operations Research 7 (1982), 67–80. https://doi.org/10.1287/moor.7.1.67