The maximum flow problem with internal vertex capacities reduces to the usual edge-capacitated problem by splitting each constrained vertex into input and output copies. The connecting edge carries its entire through-flow. Feasible flows correspond under this construction, preserving the source-to-sink value; the Ford-Fulkerson algorithm and max-flow min-cut theorem therefore apply to the transformed network.
On a directed flow network with capacities , choose flows satisfying inflow equals outflow at every vertex except source and sink , and maximize the net source outflow . For a cut of a flow network containing but not , its capacity is . The max-flow min-cut theorem states
Every feasible flow is bounded above by every cut capacity; equality for a feasible flow and a cut proves optimality.
The Ford-Fulkerson algorithm starts with a feasible flow, for instance zero. A forward edge has residual capacity and its reverse edge has residual capacity . Find a source-to-sink augmenting path in this residual network, and increase the flow along it by the minimum residual capacity on the path, reducing original-edge flows when reverse edges are used. Repeat until no such path exists. The vertices reachable from the source then define a saturated minimum cut of a flow network. With integer capacities and zero initial flow, all residual capacities and augmentations are integers. Each augmentation increases by at least one, while is bounded by the finite sum of source capacities, so termination takes finitely many steps.
For the original roads, a feasible maximizing flow is given below; every table entry is flow/capacity in vehicles per minute.
RoadBefore stormAfter storm
All road capacities are respected, and direct summation verifies flow conservation at each roundabout. The original flow value is . The cut separating from every other vertex consists of its two incoming roads and has capacity . Therefore the original maximum is 90 vehicles per minute.
To impose a vertex capacity, split into and . Send its incoming roads to and its outgoing roads from , and add a directed internal edge of capacity . Every unit passing through the roundabout must traverse this internal edge. This gives the standard maximum flow with vertex capacities construction.
Starting from zero, apply the Ford-Fulkerson algorithm with the following augmenting paths in order. First use : its residual capacities are , so augment by . Next use : the residual capacities are , so augment by . Finally use : the residual capacities at this stage are , so augment by . No reverse edge is needed in this valid run. The resulting original-road flows are precisely the after-storm column above, and the internal edge carries .
For termination and optimality, take the source-side set . Its outgoing edges are , and , of capacities . They are all saturated, and no positive-flow original edge enters this set. Consequently no residual path leaves the set, and its cut capacity equals the constructed flow value. The new maximum is therefore
Figure 1.
Optimal road flows before the storm and after splitting the flooded roundabout
.