Explainer

Flow network

Learn feasible flows, residual forward and reverse arcs, augmenting paths, cut bounds, and when Ford–Fulkerson terminates.

On this page

Interactive

Augmenting paths, residual edges, and the minimum cut

Flow network (flow / capacity)

0 / 10 / 10 / 10 / 10 / 1ssourceabtsink
Augmenting pathMinimum cutFlow

Press Augment to find the first augmenting path.

max flow = min cut

Each augmentation pushes one unit along a path in the residual graph. The second path uses the residual edge b → a, cancelling the earlier a → b flow. When no path remains, the reachable set from s defines a minimum cut.

A network carries a constrained quantity

A flow network is a finite directed graph with distinct source ss and sink tt. Each original edge ee has finite, nonnegative capacity cec_e. A feasible flow assigns an amount fef_e to every edge, obeying

0≤fe≤ce,0\le f_e\le c_e,

and conserving flow at every vertex except ss and tt: total inflow equals total outflow. The flow value ∣f∣|f| is the net amount leaving ss (equivalently, the net amount entering tt).

Edges remain distinct even when they share endpoints. This matters for parallel edges and for reverse residual arcs: a reverse residual arc belonging to one original edge is not the same object as an original edge in the opposite direction.

Residual arcs: add flow or cancel it

For an original edge e=(u,v)e=(u,v) carrying fef_e, its forward residual arc u→vu\to v has capacity ce−fec_e-f_e; it shows how much more can be sent on ee. Its reverse residual arc v→uv\to u has capacity fef_e; it shows how much existing flow can be canceled. Only positive-capacity residual arcs can be used.

An augmenting path is an ss-to-tt path in this residual network. Let Δ\Delta be its smallest residual capacity. Along a forward arc, increase the corresponding original flow by Δ\Delta; along a reverse arc, decrease it by Δ\Delta. The bottleneck choice preserves every capacity bound. At each internal path vertex, the change in inflow equals the change in outflow, so conservation also remains valid. The flow value rises by Δ\Delta.

Cancellation is essential, not a bookkeeping trick. Consider unit-capacity edges s→as\to a, a→ba\to b, b→tb\to t, s→bs\to b, and a→ta\to t. First send one unit along s→a→b→ts\to a\to b\to t. A second augmenting path is s→bs\to b, the reverse residual arc of a→ba\to b (from bb to aa), then a→ta\to t. This cancels the earlier a→ba\to b flow and reroutes it, producing a feasible flow of value 2.

Cuts certify an upper bound

An ss–tt cut partitions the vertices into SS and TT, with s∈Ss\in S and t∈Tt\in T. Its capacity is the sum of capacities of original edges from SS to TT:

c(S,T)=∑e=(u,v):u∈S,v∈Tce.c(S,T)=\sum_{e=(u,v):u\in S,v\in T}c_e.

Summing net outflow over SS cancels internal edges and gives

∣f∣=∑S→Tfe−∑T→Sfe≤c(S,T).|f|=\sum_{S\to T}f_e-\sum_{T\to S}f_e\le c(S,T).

Thus every feasible flow is bounded by every cut. In the unit-capacity example, S={s}S=\{s\} has cut capacity 2; the rerouted flow of value 2 meets this bound, certifying optimality. More generally, when no augmenting path remains, the vertices residual-reachable from ss define a cut whose outward original edges are saturated and inward original edges carry zero flow. Its capacity equals the current flow value, so the flow is maximum.

When augmentations terminate

The absence of an augmenting path characterizes maximum flow, but arbitrary path selection need not reach that state after finitely many steps for every capacity type. Starting from zero with integer capacities, Ford–Fulkerson keeps all flows integral; every augmentation increases the integer flow value by at least one, and that value is bounded by the finite total capacity leaving ss. It therefore terminates. Rational capacities can be scaled to integers and have the same guarantee. With arbitrary real capacities, some path choices can produce infinitely many augmentations without reaching a maximum in finite time.

Takeaway: residual forward arcs add flow, reverse arcs allow rerouting, and cuts provide a certificate that no larger flow is possible.