Suppose water moves from a source through pipes to a destination. Every pipe has a capacity. We want the greatest total amount the network can deliver without exceeding any capacity. This is a maximum-flow problem on a directed graph. At every intermediate vertex, flow entering must equal flow leaving; only the source and destination are exceptions.
Background for this page. You need directed edges and capacities. Flow obeys capacity limits and conservation at intermediate vertices. A residual edge records how an existing flow may change. Related explanations: Graph traversal: BFS, DFS, and topological order · Bipartite matching: augmenting paths and assignments.
Sending flow along one route may appear to use a pipe in the wrong way. A later route might need part of that capacity. The residual graph records what can still be sent and what flow can be undone. For an edge carrying f units with capacity c, there is c − f forward residual capacity and f backward residual capacity. A backward edge does not mean water physically travels backward; it means the algorithm may revise an earlier choice.
The Ford–Fulkerson method finds a source-to-destination path in the residual graph and increases flow by the smallest residual capacity on that path. That smallest value is the path’s bottleneck. It repeats until no augmenting path remains. With integer capacities, each augmentation increases the total by at least one unit, so the method terminates. With arbitrary real capacities, path choice needs more care; Ford–Fulkerson by itself does not give a simple polynomial bound.
For a concrete flow example, give each person and task capacity one. Then an augmenting path can revise an earlier assignment and make room for another pair.
Edmonds–Karp chooses a shortest augmenting path in edge count using BFS. This rule gives an O(VE²) time bound and avoids dependence on the numerical size of integer capacities. Other flow algorithms can be faster, but the residual idea remains central.
A cut divides vertices into a source side and a destination side. Its capacity is the sum of capacities of edges crossing from the source side to the destination side. No flow can exceed any cut’s capacity. The max-flow min-cut theorem says the largest possible flow equals the capacity of the smallest such cut. When an augmenting-path method stops, the vertices still reachable from the source in the residual graph identify a cut with capacity equal to the current flow. That is a certificate that the answer is optimal.
Flow models more than pipes. It can represent traffic, data transfer, or assignments under capacity limits. It also gives a route to bipartite matching: one unit of flow can represent one chosen pairing. The model is only as good as its capacities and conservation rules; real systems may have delays, costs, or other constraints that require a richer formulation.
A cut can prove that flow is maximum
Suppose the source has only two outgoing edges, with capacities three and two. Every feasible flow is at most five, regardless of how many routes lie farther downstream. Those two edges define a cut separating the source from every other vertex. If you construct a feasible flow of five, the upper bound and achievable value match, proving optimality.
An augmenting path must have positive residual capacity along every edge. Increasing flow by its smallest residual capacity preserves all capacity bounds. At an internal vertex, the path adds as much entering flow as leaving flow, preserving conservation. Reverse residual edges implement cancellation of prior flow, which is why the algorithm can revise a locally poor route.
Practice. A route has residual capacities 5, 3, and 7. How much flow can one augmentation add? Why must the algorithm keep backward residual edges?
Answer. It can add at most 3 units, the smallest capacity on the route. Backward edges let later augmentations revise earlier routes rather than treating the first choice as permanent.
Try another case. Can a path with residual capacities 5, 0, and 7 carry an augmentation?
Reasoning. No. Its bottleneck is zero, so it is not an augmenting path. A search should follow only positive residual capacities.