What is the formal definition of a Flow Network, what are the Capacity and Conservation constraints, and how does the Residual Graph enable flow cancellation?
A Flow Network is a directed graph G = (V, E) utilized to model the transportation of material, data, or energy through a capacitated network. Formally, a flow network is characterized by three mathematical components:
1. A directed graph G = (V, E) with vertex set V and directed edge set E.
2. A non-negative Capacity Function c: V × V → ℝ⁺ ∪ {0}, where c(u, v) ≥ 0 represents the maximum throughput capacity of edge (u, v). If (u, v) ∉ E, then c(u, v) = 0.
3. Two distinguished terminal vertices: a Source vertex s ∈ V (where net flow originates) and a Sink vertex t ∈ V (where net flow terminates), with s ≠ t.
A valid Flow in G is a real-valued function f: V × V → ℝ that strictly satisfies two fundamental physical axioms for all vertices u, v ∈ V:
- Capacity Constraint: For every edge (u, v) ∈ E, the flow cannot exceed available capacity and cannot be negative: 0 ≤ f(u, v) ≤ c(u, v).
- Flow Conservation (Kirchhoff's First Law): For every intermediate vertex u ∈ V \ {s, t}, total incoming flow must strictly equal total outgoing flow:
∑_{v ∈ V} f(v, u) = ∑_{w ∈ V} f(u, w)
Intermediate vertices cannot generate, destroy, or accumulate flow; all fluid entering a junction must exit it.
The Net Value of the flow, denoted |f|, is defined as the total net flow exiting the source vertex (which, by conservation, identically equals total net flow entering the sink):
|f| = ∑_{v ∈ V} f(s, v) - ∑_{v ∈ V} f(v, s)
The Maximum Flow Problem is the optimization objective of finding a flow f* that maximizes |f| subject to the capacity and conservation constraints.
The profound conceptual breakthrough of Lester Ford and Delbert Fulkerson (1956) was the introduction of the Residual Graph G_f = (V, E_f). Given a network G and a flow f, the residual graph represents the additional capacity available to route more flow. For any pair of vertices u, v ∈ V, the Residual Capacity c_f(u, v) is defined as:
c_f(u, v) = c(u, v) - f(u, v) [if (u, v) ∈ E: forward residual capacity]
c_f(u, v) = f(v, u) [if (v, u) ∈ E: backward residual capacity]
The presence of Backward Edges (with residual capacity c_f(u, v) = f(v, u)) is the foundational cornerstone of all augmenting path algorithms. When an augmenting path sends Δ units of flow along a backward edge (u, v) in G_f, it decreases f(v, u) by Δ in the original network! This provides an exact mathematical mechanism to 'cancel' or 'redirect' a sub-optimal flow routing decision made in an earlier iteration. Without backward residual edges, greedy flow routing would become trapped in local sub-optimal dead ends.