Maximum flows with capacities in a linearly ordered field #
Flows on a finite vertex type V with capacities W : V → V → K in a linearly ordered field K
(for example ℝ or ℚ), and the max-flow min-cut theorem in this setting. The integral theory
over ℕ, with algorithms, is in CslibFrontier.Algorithms.Lean.MaxFlow.Basic.
Source mapping. [Sch03], Section 10.1 (pp. 148–149), defines flows on a digraph with
real capacities c : A → ℝ₊, conservation and the value as net outflow at s; Theorem 10.3
(Section 10.2, p. 150) is the max-flow min-cut theorem. This module differs in three ways:
- A flow is a function
f : V × V → Kon all ordered pairs, so absent arcs are pairs of capacity0. Antiparallel arcs, loops, arcs intosand arcs out oftare allowed; a loop contributes to both the outflow and the inflow of its vertex, so it cancels. - Capacities lie in an arbitrary linearly ordered field
Krather than inℝ. This is an extension of the source statement. - Since
Kneed not be complete, a maximum flow is not obtained by compactness. It comes from linear-programming duality overK(Matrix.exists_isGreatest_of_bddAbove), and augmenting paths need not terminate either.
Since capacities need not be integers, augmenting paths need not terminate. Instead, a maximum
flow is obtained from linear-programming duality over K
(Matrix.exists_isGreatest_of_bddAbove). Its optimality is then certified by the set of vertices
reachable from s in the residual graph: if t were reachable, an augmentation along the
reachability relation would increase the value.
Main definitions #
Cslib.Algorithms.Lean.MaxFlow.IsFeasibleRealFlow: capacity and conservation constraints.Cslib.Algorithms.Lean.MaxFlow.realNetOut: net outflow at a vertex; the value at the source.Cslib.Algorithms.Lean.MaxFlow.IsMaxRealFlow: the greatest value of a feasible flow.Cslib.Algorithms.Lean.MaxFlow.Residual: positive-residual-capacity arcs of a flow.
Main results #
Cslib.Algorithms.Lean.MaxFlow.IsFeasibleRealFlow.realNetOut_eq_sub: the value of a feasible flow equals its net flow across anys–tcut.Cslib.Algorithms.Lean.MaxFlow.IsFeasibleRealFlow.realNetOut_le_cutWeight: weak duality.Cslib.Algorithms.Lean.MaxFlow.exists_isMaxRealFlow: a maximum flow exists.Cslib.Algorithms.Lean.MaxFlow.not_resReachable_of_isMaxRealFlow: a maximums–tflow admits no residual path fromstot.Cslib.Algorithms.Lean.MaxFlow.isMaxRealFlow_minRealCutBetween: the max-flow min-cut theorem, the maximum flow value isminRealCutBetween W s t.
References #
A feasible s–t flow for the capacities W: every arc value f (u, v) lies between 0
and W u v, and inflow equals outflow at every vertex other than s and t.
val is the greatest value of a feasible s–t flow for the capacities W.
Flow across a cut #
The value of a feasible flow equals its net flow across any s–t cut X: the flow on
arcs leaving X minus the flow on arcs entering X.
Weak duality: the value of a feasible s–t flow is at most the weight of every s–t
cut.
Existence of a maximum flow #
For non-negative capacities a maximum flow exists. Since the capacities need not be integers,
it is obtained from linear-programming duality over K rather than from augmenting paths.
Max-flow min-cut #
The arc (u, v) has positive residual capacity for f: unused capacity on (u, v) or
cancellable flow on (v, u).
A maximum s–t flow admits no residual path from s to t when s ≠ t.
Max-flow min-cut theorem over a linearly ordered field ([Sch03], Theorem 10.3,
p. 150, extended from ℝ to K; [FF62], Chapter I, Sections 4–8): for non-negative
capacities W and distinct s and t, the greatest value of a feasible s–t flow is the
minimum s–t cut weight. The maximum is attained (exists_isMaxRealFlow).