Augmenting path Created 2026-09-29 Updated 2026-10-14
An augmenting path is a source-to-sink graph path of positive capacities in the residual network. Its bottleneck is . Add to original flow on forward residual edges and subtract on backward residual edges. Each internal vertex still satisfies flow conservation, and the bottleneck guarantees every capacity constraint. The resulting feasible flow has strength of a flow . In the unit-capacity residual network example, , and the subtraction on is precisely what allows the value to rise from to .
Cut capacity Created 2026-10-07 Updated 2026-10-18
The cut capacity of , with the complement of a set, isOnly outward directed edges contribute; incoming and internal edges contribute nothing.[ref]
FordFulkerson.java. Algorithms, 4th edition by Robert Sedgewick and others; Sedgewick and Wayne, FordFulkerson.java, check method, lines 196–203: sum capacities only from the source side to its complement
Here is the accounting behind the bound, using nonnegative original edge amounts in a finite flow network. Sum the divergence of a flow over the vertices in :An edge with both endpoints in appears once with a plus sign at its tail and once with a minus sign at its head, so those contributions cancel. An outward edge appears only with a plus sign; an incoming edge appears only with a minus sign. Since , and every other vertex satisfies flow conservation, the left side is the flow value. ThusThe inequality uses two facts separately: each forward flow is at most its flow network edge capacity, and each backward flow is nonnegative. This is the weak duality bound underlying the max-flow min-cut theorem. It is an accounting proof, requiring no choice of augmenting paths.
For in the running example, explicitly add the two divergences of a flow:The internal edge cancels. The edge is a genuine original directed edge entering , so its flow is subtracted; this is different from a backward edge in a residual network. Its flow network edge capacity is neither added to nor subtracted from cut capacity, which remains .
Equality in the bound holds precisely when every outward edge is saturated and every incoming edge carries zero flow, becauseand every term is nonnegative. For the two outward edges are saturated and there are no incoming edges, so the gap is zero. For all outward edges are still saturated, but the incoming flow of gives a gap of . This explains exactly why the second cut of a flow network is not a minimum cut.
Ford-Fulkerson algorithm Created 2026-09-24 Updated 2026-10-14
The Ford-Fulkerson algorithm repeatedly augments a feasible flow along an augmenting path. When no such path remains, the source-reachable vertices in the residual network define a cut of capacity equal to the flow value, proving optimality by the max-flow min-cut theorem.
Maximum flow problem Created 2026-10-05 Updated 2026-10-20
The maximum flow problem maximises the strength of a flow from a source to a sink subject to flow conservation and flow network edge capacities. For the nonnegative arc amounts used in flow network, its objective is net outflow from the source:The equality follows by summing flow conservation over all internal vertices. Incoming source flow must be subtracted: merely circulating traffic through does not deliver more to . The max-flow min-cut theorem identifies the optimum with the least cut capacity of a cut of a flow network. A feasible flow and a cut of a flow network of equal value certify optimality without requiring a particular choice of augmenting paths.
For the five-edge flow network with flow network edge capacities , takeEvery capacity constraint holds with equality. Flow conservation at is , and at it is . The strength of a flow is , also entering . This flow consists of units on the graph path , on , and on . The cut of a flow network with source side has cut capacity , so no feasible flow can do better.
Even a seemingly poor first augmenting path , carrying , does not cause failure in this example. It leaves residual network capacity along and along . These two subsequent augmenting paths yield values , , and , and produce exactly the flow above. Backward residual network edges become essential in the unit-capacity example under residual network, where this same first choice blocks every unused forward route.
Discrete assignment is another reason to study maximum flow. Put unit-capacity edges from to job vertices, from each job to eligible worker vertices, and from workers to . An integral flow selects a matching in a graph: each job and worker participates at most once, and the strength of a flow counts assigned jobs. The integral max-flow theorem therefore turns maximum cardinality assignment into maximum flow. Minimizing assignment costs is the related assignment problem, modeled by minimum-cost flow.[ref]
https://ocw.mit.edu/courses/6-854j-advanced-algorithms-fall-2008/4064d889e5033a9915327a777d12b592_notes_flow.pdf. Goemans, Network flows, assignment formulation
Past exam of the mathematics course of the University of Cambridge 2004 ib Paper 4 10G Solution Created 2026-09-24 Updated 2026-10-14
Take a finite directed flow network with distinct source , sink and finite nonnegative flow network edge capacities. A flow assigns to each edge with and obeys flow conservation at every vertex except . Its value is net outflow from the source, . A maximal flow here means a maximum flow: one with greatest value among feasible flows. A source-to-sink cut of a flow network is a partition with , ; its cut capacity is , counting directed edges leaving .
The max-flow min-cut theorem statesSumming conservation over cancels internal edges and givesThis is the upper bound for every flow and every cut. To prove equality, a maximum exists: the feasible edge vectors form a nonempty closed bounded subset of a finite-dimensional real space, and flow value is continuous.
For a maximum , construct its residual network. Each edge has a forward residual edge of capacity and a backward residual edge of capacity ; retain those of positive capacity. If a residual source-to-sink path existed, augment by the smallest residual capacity on that finite path. Increasing original forward flows and decreasing backward flows preserves all feasibility conditions and increases value, contradicting maximality. Thus no such augmenting path exists.
Let be the vertices reachable from in the residual network. Then . Every original edge leaving is saturated, since otherwise its positive forward residual edge would make its endpoint reachable. Every original edge entering has zero flow, since otherwise its backward residual edge would give the same contradiction. HenceTogether with the universal upper bound this proves equality and identifies a minimum cut. This proof covers real capacities without assuming that an augmenting-path algorithm terminates after finitely many steps. Merely being impossible to increase all edge flows coordinatewise is not the optimization meaning of “maximal” used in the theorem.
Past exam of the mathematics course of the University of Cambridge 2005 ib Paper 4 20D Solution Created 2026-09-24 Updated 2026-10-14
Start with a feasible network flow, meaning capacity bounds and flow conservation at every vertex other than source and sink. Its residual network has, for an arc with capacity and current flow , a forward residual capacity and a reverse residual capacity . A reverse arc allows earlier flow to be cancelled. The Ford-Fulkerson algorithm repeatedly finds a residual source-to-sink augmenting path, takes the smallest residual capacity on it, and augments by , increasing forward flows and decreasing reverse flows as appropriate. Feasibility is preserved and the total flow increases by .
For rational capacities and initial flows, choose one common denominator and scale all quantities by . Every residual capacity and augmentation is then integral; each augmentation increases the integer-valued flow by at least one. The flow value is bounded by the finite sum of capacities out of the source, so termination occurs after finitely many augmentations. When no residual path remains, let be the vertices reachable from the source. Every original arc leaving is saturated and every original arc entering carries zero flow, or its reverse arc would extend reachability. Conservation then makes the flow value equal to the capacity of the cut . Every feasible flow is bounded by that cut capacity. Thus the terminating flow is globally optimal, proving the needed max-flow min-cut theorem conclusion.
For the given directed graph, begin at zero. One valid sequence of augmentations is:
Each amount is the current path bottleneck. The resulting nonzero arc flows areevery other arc has zero flow. Directly summing incoming and outgoing flows verifies conservation, and every displayed flow is at most its printed capacity. A minimum-cut certificate isIts only outgoing arcs are , , and , with capacities . ThereforeThe matching feasible flow and cut prove optimality independently of the augmenting-path choices.
Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 2 17F Solution Created 2026-09-24 Updated 2026-10-14
Work with finite graphs, as in the usual matching theorem. Hall's condition is for every . It is necessary because a matching injects into its neighbours.
For sufficiency, induct on . If a nonempty proper subset has , induction matches to . For , Hall's inequality for gives , so induction matches the complement to unused neighbours. Combining the matchings finishes this case. Otherwise every nonempty proper has . Choose an edge , delete its endpoints, and observe that every subset of the remaining still has at least its own number of neighbours. Induction matches the remainder, and adjoining finishes. The one-vertex case and the empty case are immediate.
For , the defect version isNecessity follows because at most vertices of can be unmatched. For sufficiency add new vertices to , each joined to every vertex of . The displayed inequality makes Hall's condition hold in the enlarged graph. Its full matching uses at most new vertices, giving the required original edges.
To prove the matching-cover equality, let be a maximum matching and its unmatched vertices in . Follow alternating paths from , using nonmatching edges from to and matching edges back. Let be the reachable sets. No reachable is unmatched, since that would give an augmenting path and a larger matching. Matching edges give a bijection . The set covers every edge: an edge from a reachable to an unreachable cannot be a nonmatching edge, and its matching edge, if present, is already reachable. Its size isEvery vertex cover has at least vertices, because the matching edges are disjoint. Therefore maximum matching size equals minimum vertex-cover size, as required.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 35 3 a Solution Created 2026-10-03 Updated 2026-10-14
For a finite directed flow network with source , sink and nonnegative finite flow network edge capacities , the max-flow min-cut theorem statesHere feasible arc flows satisfy and flow conservation at every vertex except . Their strength of a flow is the net outflow at . A cut of a flow network has cut capacity equal to the sum of capacities on arcs directed from to .
For any feasible flow and any such cut of a flow network, summing flow conservation over cancels internal arcs and givesThus every flow value is bounded by every cut capacity.
A maximum flow exists: the feasible arc-flow vectors form a nonempty closed subset of the finite-dimensional compact box , and flow value is continuous. Choose one, . Its residual network has a forward arc of capacity and a reverse arc of capacity for each original arc. If a residual – augmenting path existed, its smallest positive residual capacity would permit increasing forward flows and decreasing reverse flows along the path. This preserves all capacity bounds and internal flow conservation while strictly increasing , a contradiction.
Let be the vertices reachable from through positive residual arcs. Then . Every original arc leaving is saturated, since otherwise its endpoint would also be reachable. Every original arc entering carries zero flow, since a positive flow would create a residual reverse arc leaving . ThereforeTogether with the universal upper bound, this proves both optimality claims and the theorem. This existence argument works for real capacities; it does not assume that arbitrary choices in the Ford-Fulkerson algorithm terminate. For integer capacities, positive augmentations are integral and increase the flow value by at least one, so the algorithm does terminate.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 35 3 b Solution Created 2026-10-03 Updated 2026-10-14
Start with zero flow and apply the Ford-Fulkerson algorithm. The following augmenting paths and bottlenecks use the capacities in the original PDF diagram:For example, the second path is limited by the remaining capacity two on and by capacity two on . After the third augmentation, has residual capacity one; the fourth path supplies it through . Every displayed increment is the smallest residual capacity of its path.
The resulting arc flows areHere denotes . These satisfy every capacity bound and flow conservation. The final residual network has source-reachable set . Its outgoing arcs are , , and , with capacities , all saturated. ConsequentlyThis is a minimum cut, and the equal flow and cut values certify optimality by the max-flow min-cut theorem. The cut immediately before node eight also has capacity six, so the minimum cut is not unique.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 38 4 b Solution Created 2026-10-03 Updated 2026-10-14
Let the bipartite graph have parts . Add a source , a sink , capacity-one edges for and for , and capacity on each original edge directed . Use the max-flow min-cut theorem: maximum flow value equals minimum cut capacity. Also use Integrality of the Ford-Fulkerson algorithm: integral capacities admit an integral maximum flow, found by integral augmenting paths.
An integral flow selects a matching in a graph, because each left and right vertex carries at most one unit. Conversely every matching gives a unit flow along its selected paths. Hence maximum flow value equals maximum matching cardinality.
A minimum cut has capacity at most , whereas crossing even one original edge would cost . For its source side , no edge of the original graph runs from to . Thereforeis a vertex cover, and its cardinality is exactly the cut capacity. Conversely, given any cover , use . No original edge crosses this cut, because both its endpoints would otherwise be outside the cover; its capacity is . Thus minimum cut capacity equals minimum cover size, proving Kőnig's theorem for bipartite matching:For the algorithm, repeatedly find augmenting paths in the residual network, then take to be the vertices reachable from . Each integral augmentation increases flow by at least one; the total value is at most . Each reachability search takes time, so this procedure takes time. The network uses only polynomially many edges and integer capacities, yielding the requested polynomial-time algorithm and an explicit cover.
Past exam of the mathematics course of the University of Cambridge 2014 ib Paper 4 20H Solution Created 2026-09-24 Updated 2026-10-14
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 statesEvery 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.
| Road | Before storm | After 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
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 4 20H b Solution Created 2026-09-24 Updated 2026-10-05
The Ford-Fulkerson algorithm starts with zero flow. For each original edge , the residual network has a forward edge with residual capacity and a reverse edge with residual capacity . Distinguish these labelled residual edges if the original graph has antiparallel edges. While there is a source-to-sink augmenting path with positive residual capacities, increase the flow by the minimum residual capacity along it, adding on forward edges and subtracting on reverse edges. This preserves capacity bounds and flow conservation and increases the strength of a flow by that positive bottleneck.
A cut of a flow network is a partition with , , of capacity . Summing flow conservation gives . The max-flow min-cut theorem statesWhen no augmenting path remains, take to be the vertices reachable from in the residual network. Every original outgoing edge of this cut of a flow network is saturated and every incoming edge has zero flow; otherwise a positive residual edge would leave . Thus , certifying optimality and the theorem. For general finite real capacities, one can also apply this argument to an existing maximum: it cannot admit an augmenting path.
With integer capacities, each augmentation increases the value by at least one, so the Ford-Fulkerson algorithm terminates. Rational capacities can be scaled to integers. Arbitrary path choices with irrational capacities need not terminate; the existence theorem does not justify claiming finite termination in that generality. The given network has integer capacities, so this caveat does not obstruct its computation.
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 4 20H c Solution Created 2026-09-24 Updated 2026-10-14
Reading the arrows directly from the original PDF gives, in particular, and . Starting from zero flow, use the following augmenting paths and bottlenecks, in order:
- : .
- : .
- : .
- : .
- : .
Each path is available in the current residual network. The resulting nonzero edge flows areThe flows on and are zero. Capacity constraints and flow conservation hold at each interior vertex; net source outflow is .
Take . Its outgoing edges are , , , , with total capacity . Thus the matching flow and cut of a flow network certificates giveThese are also exactly the source-reachable vertices in the final residual network. The original drawing below labels each edge by flow/capacity; the highlighted edges realise the minimum cut of a flow network.
Past exam of the mathematics course of the University of Cambridge 2019 ib Paper 4 20H a Solution Created 2026-09-24 Updated 2026-09-29
The max-flow min-cut theorem states that in a finite flow network, the maximum value of a feasible source-to-sink flow equals the minimum capacity of a source-to-sink cut.
First consider any feasible flow and any cut with and . Summing flow conservation over the vertices in cancels all contributions from edges internal to and givesThus every flow value is at most every cut capacity.
A maximum flow exists because the feasible flows form a nonempty compact subset of a finite-dimensional Euclidean space and the flow value is continuous. Let be maximum and form its residual network. If there were an augmenting path from to , increasing by the path's positive bottleneck capacity would contradict maximality. Let be the set of vertices reachable from in the residual network. Then . Every original edge from to its complement is saturated, while every original edge entering carries zero flow; otherwise the corresponding forward or reverse residual edge would make its other endpoint reachable. ConsequentlyThe general upper bound is attained by this flow and cut, proving the theorem.
Past exam of the mathematics course of the University of Cambridge 2019 ib Paper 4 20H c Solution Created 2026-09-24 Updated 2026-09-29
Assume the capacities are integers and begin with the zero flow. Inductively, if every edge flow is an integer, then every forward residual capacity and reverse residual capacity is an integer. The bottleneck on an augmenting path is therefore a positive integer. Augmenting by it changes every affected edge flow by an integer, so all edge flows remain integral.
Each augmentation raises the flow value by at least one. On the other hand, every feasible flow satisfiesand the right side is a finite integer because the network is finite. There can therefore be only finitely many augmentations. When the algorithm stops, no augmenting path remains, and the source-reachable cut in the residual network has capacity equal to the current flow value. The max-flow min-cut theorem proves that the terminating flow is maximum. This proves both termination and the Integrality of the Ford-Fulkerson algorithm.
Residual network Created 2026-09-29 Updated 2026-10-14
For a feasible flow , each original directed edge supplies a forward residual network edge of capacity and a backward one of capacity ; zero-capacity residual edges may be omitted. The forward edge permits an increase, while the backward edge permits cancellation of existing flow. In particular, backward residual capacity is the amount already sent, rather than unused original capacity. If both original orientations exist, keep their residual contributions separate, or add capacities for contributions with the same direction. An augmenting path uses these permitted changes while preserving flow conservation and the capacity constraints.
To see why cancellation matters, give all five directed edges , , , , unit flow network edge capacities. Starting from zero flow, an augmenting path carrying yieldsThe remaining unused original edges are and , which do not form a source-to-sink graph path. However, the backward residual edge has capacity . Consequently the residual network contains the augmenting path , with residual capacities .
Augment by : increase and from to , and decrease from to . The result isNow flow conservation is at and at . The final flow sends one unit along each of and . The cut of a flow network has cut capacity , proving this is a maximum flow. Traversing in the residual network revised the earlier routing decision; it did not send actual traffic along a nonexistent original edge.
In a finite flow network, a maximum flow exists because the feasible flow set contains the zero flow and is a compact set: the capacity constraints bound every coordinate, and they and flow conservation define a closed set. The strength of a flow is a continuous function, so the extreme value theorem gives an attained maximum. An augmenting path in the residual network would permit positive augmentation, contradicting maximality. The source-reachable vertices in the residual network therefore define a cut of a flow network whose outgoing original edges are saturated and incoming original edges carry zero flow. Flow conservation makes the strength of a flow equal to this cut capacity, proving the max-flow min-cut theorem.
Existence and strong duality for finite real flow network edge capacities do not imply finite termination for every choice of augmenting paths in the Ford-Fulkerson algorithm. With irrational capacities, some choices can continue forever. With integer capacities, Integrality of the Ford-Fulkerson algorithm instead forces finite termination; rational capacities reduce to that case by a common denominator. Choosing shortest augmenting paths as in the Edmonds–Karp algorithm avoids dependence on capacity magnitudes.[ref]
https://courses.csail.mit.edu/6.854/21/Notes/n06-flow.html. Karger, MIT 6.854 Notes 6, section 2.1, rational and real capacities
Widest augmenting path 2026-10-14
An augmenting path maximizing the possible increase in flow, namely its smallest residual network edge capacity. If the remaining maximum flow is and the original undirected network has edges, a path has bottleneck at least . Otherwise the vertices reachable through arcs of capacity at least define a cut of capacity strictly less than , contradicting the max-flow min-cut theorem. Only one directed arc per original crossing edge contributes to that cut.



