Flows between vertex sets #
Let Q be an arrow family on a finite vertex type V with capacities cap, and let A and B
be finite vertex sets. An A–B flow is an arrow assignment between zero and the capacities
that is conserved at every vertex outside A ∪ B, has nonpositive excess at every vertex of A
and nonnegative excess at every vertex of B. Its value is its total excess on B, which is
minus its total excess on A. An A–B cut is a vertex set containing A and avoiding B, an
admissible side in the sense of TauCeti.TerminalCut.IsAdmissible, and its capacity is the total
capacity of the arrows leaving it. Either set may be empty, in which case every A–B flow has
value zero.
For disjoint A and B this file proves the max-flow/min-cut theorem between vertex sets: weak
duality, the augmenting-path optimality criterion, the existence of an A–B flow and an
A–B cut of equal value and capacity, and integrality in an additive subgroup containing the
capacities. Here an augmenting walk runs from a vertex of A to a vertex of B along residual
arrows of positive capacity.
The existence results come from the reduction to single terminals. Add a fresh source with an arrow
to each a ∈ A of capacity the total capacity leaving a, and a fresh sink with an arrow from each
b ∈ B of capacity the total capacity entering b (TauCeti.setFlowCapacity). The A–B flows
then correspond exactly to the ordinary flows between the fresh terminals, with the same values on
the original arrows and the same value (TauCeti.SetFlow.auxFlowEquiv), and normalizing a minimum
cut between the fresh terminals gives a minimum A–B cut of the same capacity
(TauCeti.TerminalCut.IsMinimum.isMinimum_union_sdiff, in
TauCeti.Combinatorics.Network.AuxiliaryTerminals).
Main definitions #
TauCeti.SetFlow cap A B:A–Bflows for the capacitiescap, with valueSetFlow.val.TauCeti.SetFlow.IsMaximum: anA–Bflow of largest value.TauCeti.SetFlow.toAuxFlowandTauCeti.Flow.toSetFlow: the ordinary flow of the auxiliary network corresponding to anA–Bflow, and theA–Bflow corresponding to an ordinary flow of the auxiliary network.TauCeti.SetFlow.auxFlowEquiv: the correspondence betweenA–Bflows and ordinary flows of the auxiliary network.
Main results #
TauCeti.SetFlow.val_eq_arrowSum_sub: the value is the net value across everyA–Bcut.TauCeti.SetFlow.val_le_arrowSum: weak duality.TauCeti.SetFlow.tfae_isMaximum: anA–Bflow is maximum exactly when it has no augmenting walk, and exactly when its value is the capacity of someA–Bcut.TauCeti.TerminalCut.isAdmissible_filter_positiveReachable: without augmenting walks, the vertices positively reachable fromAform anA–Bcut.TauCeti.SetFlow.exists_isMaximum_mem: integrality of maximumA–Bflows.TauCeti.SetFlow.exists_val_eq_arrowSum: the max-flow/min-cut theorem between vertex sets.
References #
- L. R. Ford, D. R. Fulkerson, Flows in Networks, Princeton University Press, 1962.
- A. Schrijver, Combinatorial Optimization: Polyhedra and Efficiency, Springer, 2003, Chapter 10.
An A–B flow for the capacities cap: an arrow assignment between zero and cap that is
conserved at every vertex outside A ∪ B, with nonpositive excess at every vertex of A and
nonnegative excess at every vertex of B.
- toFun : Assignment Q K
The value on each arrow.
The assignment lies between zero and the capacities.
The assignment is conserved at every vertex outside
A ∪ B.Every vertex of
Ais a supply vertex.Every vertex of
Bis a demand vertex.
Instances For
If no vertex of B is positively reachable from a vertex of A for the capacities c, then
the vertices positively reachable from A form an A–B cut.
The value of an A–B flow: its total excess on B.
Instances For
An A–B flow is maximum when it maximizes the value among all A–B flows for the same
capacities.
Instances For
An A–B flow is conserved at every vertex of A ∩ B.
The total excess of an A–B flow on A is minus its value.
An A–B flow with no demand vertices has value zero.
An A–B flow with no supply vertices has value zero.
The value of an A–B flow is the value on arrows leaving S minus the value on arrows
entering S, for every A–B cut S.
Residual cut gap. For every A–B cut S, the capacity of S exceeds the value of an
A–B flow by its total residual capacity on the residual arrows leaving S.
The value of an A–B flow is nonnegative.
Weak duality. The value of an A–B flow is at most the capacity of every A–B cut.
An A–B flow attains the capacity of an A–B cut S exactly when every residual arrow
leaving S has zero residual capacity.
An A–B flow whose value is the capacity of an A–B cut is maximum.
If no vertex of B is positively reachable from a vertex of A for the residual capacities
of an A–B flow, then its value is the capacity of the set of vertices positively reachable
from A, which is an A–B cut.
Augmentation. If a vertex of B is positively reachable from a vertex of A for the
residual capacities of an A–B flow, for disjoint A and B, then augmenting along an
augmenting path by its bottleneck gives an A–B flow of larger value.
A maximum A–B flow for disjoint A and B has no augmenting walk.
Augmenting-path optimality criterion for A–B flows. For an A–B flow f between
disjoint vertex sets, the following are equivalent: f is maximum; there is no augmenting walk
for f from a vertex of A to a vertex of B; and the value of f equals the capacity of some
A–B cut.
A maximum A–B flow between disjoint vertex sets saturates some A–B cut.
The assignment of the auxiliary network corresponding to an A–B flow is conserved at every
original vertex.
The assignment of the auxiliary network corresponding to an A–B flow lies below the
auxiliary capacities setFlowCapacity cap A B.
The ordinary flow from the fresh source to the fresh sink of the auxiliary network
corresponding to an A–B flow. It keeps the values on the original arrows, and carries minus the
excess at a on the arrow from the fresh source to a ∈ A and the excess at b on the arrow from
b ∈ B to the fresh sink.
Instances For
The A–B flow corresponding to an ordinary flow from the fresh source to the fresh sink of
the auxiliary network, for disjoint A and B: its restriction to the original arrows.
Instances For
Reduction to single terminals. For disjoint A and B, the A–B flows correspond to
the ordinary flows from the fresh source to the fresh sink for the auxiliary capacities
setFlowCapacity cap A B, by SetFlow.toAuxFlow and Flow.toSetFlow. An A–B flow keeps its
values on the original arrows, and carries minus its excess at a on the arrow from the fresh
source to a ∈ A and its excess at b on the arrow from b ∈ B to the fresh sink.
Instances For
The ordinary flow of the auxiliary network corresponding to an A–B flow has the same
value.
The A–B flow corresponding to an ordinary flow of the auxiliary network has the same
value.
An A–B flow is maximum exactly when the corresponding flow of the auxiliary network is.
Integrality of maximum A–B flows. For disjoint A and B and nonnegative capacities in
an additive subgroup H, some maximum A–B flow takes values in H.
For disjoint A and B and nonnegative capacities, a maximum A–B flow exists.
Max-flow/min-cut theorem between vertex sets. For disjoint A and B and nonnegative
capacities, some A–B flow has value equal to the capacity of some A–B cut. By weak duality
(TauCeti.SetFlow.val_le_arrowSum) this flow is maximum and this cut is minimum.
Example #
On the vertices 0, 1, 2, 3, take unit capacities on the arrows 0 → 2, 0 → 3 and 1 → 3,
and capacity zero on one arrow for every other ordered pair, loops included. For the supply
vertices A = {0, 1} and the demand vertices B = {2, 3}, the assignment saturating every arrow is
an A–B flow with excesses -2, -1, 1, 2, so of value 3. This is the capacity of the cut A,
so the flow is maximum. The corresponding flow of the auxiliary network also has value 3, and
carries 2 on the arrow from the fresh source to 0.
For the same vertex and arrow types, take unit capacities in both directions between 0 and 1
and zero capacities elsewhere. Saturating these two arrows is a nonzero circulation. With no
supply vertices and demand vertices {2, 3}, it is a set flow of value zero. Its corresponding
auxiliary flow retains the unit value on the original arrow 0 → 1 and also has value zero.