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.
Cut of a flow network Created 2026-09-29 Updated 2026-10-18
A source-to-sink cut of a flow network is a partition of a set of the vertex set of a flow network, with and . Its cut capacity sums the flow network edge capacities of directed edges leaving .[ref]
Flows (author-hosted chapter preview). Graph Theory by Reinhard Diestel; Diestel, Flows, §6.2, printed p. 158: source-side partition and cut capacity
The side may contain any selection of the other vertices; its induced subgraph need not be a connected graph. For the five-edge flow network with flow network edge capacities , gives the partition of a set . Only and leave this side, so its cut capacity is . Choosing instead puts across the boundary in the incoming direction: its flow network edge capacity is excluded.
The left panel pairs a feasible flow of flow value with a cut of a flow network of cut capacity , proving that each is optimal. The right panel uses the same feasible flow but a different cut of a flow network: the outward flow is and the backward flow is , giving net flow . That cut capacity is , so it supplies a valid but less sharp bound. The dashed boundary marks a partition of a set, rather than an additional edge or a proposed route.
Max-flow min-cut theorem Created 2026-09-24 Updated 2026-10-14
For a finite flow network with finite nonnegative real flow network edge capacities, the greatest strength of a flow of a feasible flow equals the least cut capacity of a source-to-sink cut of a flow network:For a maximum flow, the vertices reachable from the source in the residual network define a minimum cut whose outgoing original edges are saturated and whose incoming original edges carry zero flow.[ref]
https://courses.csail.mit.edu/6.854/21/Notes/n06-flow.html. Karger, MIT 6.854 Notes 6, maximum-flow optimality conditions
Why is a cut of a flow network an upper bound? Sum flow conservation on its source side . Internal edge contributions cancel, leavingOnly directed edges leaving contribute to cut capacity. Directed edges entering are subtracted in net flow, so adding their capacities to the upper bound would lose the intended bottleneck. This inequality is weak duality; the theorem says the bound is attained, an instance of strong duality. Its beauty is that a routing plan and a separating boundary independently witness each other's optimality.
In the running flow network, the two internal vertices give four possible source sides. For , the cut capacity is . For it is . For it is ; the incoming edge contributes nothing to that cut capacity. Finally, gives . Thus the minimum cut has cut capacity , matching the explicitly computed maximum flow.
Maximum flow of value five and two minimum-cut certificates
. Labels show flow/capacity on each directed edge. The shaded source sides give cuts of capacities three plus two and two plus one plus two, both equal to the flow value. Details.Ford and Fulkerson's 1956 paper opens with a railway-capacity question attributed there to T. Harris and proves a minimal-cut theorem as Theorem 1. Its original formulation uses graph paths carrying nonnegative amounts; the residual reachability certificate for maximum flow below gives the finite directed flow network proof used here.[ref]
https://doi.org/10.4153/CJM-1956-045-5. Ford and Fulkerson, Maximal Flow Through a Network, Canadian Journal of Mathematics 8 (1956), pp. 399–404
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
Minimum cut Created 2026-10-07 Updated 2026-10-18
A minimum cut is a cut of a flow network of least cut capacity for the prescribed source and sink . The max-flow min-cut theorem equates that least cut capacity with the greatest flow value.[ref]
Flows (author-hosted chapter preview). Graph Theory by Reinhard Diestel; Diestel, Flows, §6.2, Theorem 6.2.2, printed p. 159
To certify a particular minimum cut, exhibit a feasible flow whose flow value equals its cut capacity. Every feasible flow is bounded above by every cut capacity, so this single equality proves both optimalities.[ref]
FordFulkerson.java. Algorithms, 4th edition by Robert Sedgewick and others; Sedgewick and Wayne, FordFulkerson.java, check method, lines 180–209: feasibility, source/sink membership and equality of values
In the running example, the four possible source sides , , and have cut capacities , respectively. The feasible flow of flow value therefore certifies three different minimum cuts. A minimum cut need not be unique; the optimum cut capacity is the same for all of them. Merely saturating many edges does not give this certificate: flow conservation and the particular cut of a flow network must also be checked.
Past exam of the computer science course of the University of Oxford 2019 Algorithms 1 a Solution 2026-10-25
Use nonnegative amounts on the original directed edges of the flow network. A feasible flow is a function satisfying the capacity constraints and flow conservation at every internal vertex:Its flow value is net outflow at the source,Summing flow conservation shows that this is also net inflow at the sink. Subtracting incoming flow matters when the source has incoming edges.
An – cut of a flow network is a partition of a set with and . Its cut capacity is the total outward flow network edge capacity,Incoming edges do not contribute to this sum. Equivalently, one may use the antisymmetric net-flow convention, but the nonnegative arc convention above will also be used in the subsequent reductions.
The vertex separator version of Menger's theorem says that, for distinct nonadjacent vertices of a finite graph, the maximum number of internally vertex-disjoint paths from to equals the minimum size of an – vertex separator.
Use the following version of the max-flow min-cut theorem: in a finite directed flow network with nonnegative integer flow network edge capacities, the maximum flow value equals the minimum cut capacity, and a maximum flow can be chosen to have integer values on every directed edge. The last clause is the integral max-flow theorem.
Here is the reduction, including the correspondence with vertex separators. Put . Perform vertex splitting on each vertex , replacing it by with a directed edge of flow network edge capacity one. Keep as the source and as the sink. For each original undirected edge , put directed edges from the output of to the input of and from the output of to the input of , each of flow network edge capacity ; an unsplit endpoint uses or itself.
A family of internally vertex-disjoint paths gives a feasible integral flow of value , by sending one unit down each graph path. Conversely, decompose an integral flow into unit source-to-sink graph paths and directed cycles, discarding the directed cycles. This decomposition can be obtained by following positive-flow directed edges and subtracting one unit along a source-to-sink graph path or a directed cycle, repeating until the flow value is exhausted. A capacity-one split edge can belong to at most one unit graph path. The projected graph paths in are therefore internally vertex-disjoint paths. Thus the largest number of such graph paths equals the maximum flow value.
Deleting a vertex separator corresponds to removing its split edges, of total flow network edge capacity . This destroys every source-to-sink graph path; taking the source-reachable vertices after removal gives a cut of a flow network of cut capacity at most . Thus the minimum cut capacity is no greater than the minimum vertex separator size.
For the reverse inequality, deleting all internal vertices separates , because they are nonadjacent. Hence a minimum cut has cut capacity at most and cannot contain a directed edge of flow network edge capacity . Its outgoing edges are therefore split edges. Let be the original vertices associated with them. Any – graph path avoiding would lift to a source-to-sink graph path crossing this cut of a flow network without using an outgoing edge, an impossibility. Hence is a vertex separator, with size exactly the cut capacity. The two minima agree, and the max-flow min-cut theorem proves Menger's theorem.
Past exam of the mathematics course of the University of Cambridge 2002 ib Paper 4 5H Solution Created 2026-09-24 Updated 2026-10-14
Consider a finite directed flow network with source , sink , and nonnegative finite flow network edge capacities . A feasible flow assigns to each arc and satisfies flow conservation at every vertex except . Its value is net outflow from , equivalently net inflow to . A maximal flow here means a flow of greatest value, also called a maximum flow. A source–sink cut of a flow network is a partition with , ; its cut capacity is , summing directed arcs from to its complement.
The max-flow min-cut theorem statesFor any feasible flow and cut, summing flow conservation over vertices in cancels internal arcs and gives . This proves the upper bound by every cut.
For the reverse bound, a maximum exists: the feasible set is a nonempty closed subset of the bounded product , hence compact, and is continuous. Choose a maximizing flow . Its residual network has a forward arc for unused capacity and a reverse arc for cancellable flow , retaining original-arc identities if necessary. If a residual path joined to , the minimum of its positive residual capacities would be positive. Increasing forward flows and cancelling reverse flows by this amount would preserve all constraints while increasing , a contradiction.
Let consist of vertices reachable from through positive residual arcs. Then . An original arc from to must be saturated, since otherwise its forward residual arc would make its endpoint reachable. An original arc from to must carry zero flow, since a positive reverse residual arc would again extend reachability. ThusThe upper bound and this equality prove the theorem and exhibit a residual reachability certificate for maximum flow. The argument works for real capacities and does not assume that an arbitrary augmenting-path algorithm terminates in finitely many steps.
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 2004 iii Paper 33 2 Solution Created 2026-10-03 Updated 2026-10-14
Given a feasible network flow , an original directed edge has forward residual capacity and a reverse residual arc of capacity . A source–sink graph path in this residual network permits an augmentation by the minimum residual capacity along it: increase forward flows and decrease the corresponding reversed flows. Capacities and flow conservation are preserved, and the flow value increases by that amount.
If no residual source–sink graph path exists, let be the vertices reachable from the source. The sink is outside . Every original arc from to its complement is saturated, and every original arc back into has zero flow, since a positive reverse residual arc would make its tail reachable. Conservation therefore givesThe flow equals this cut capacity, so the max-flow min-cut theorem proves it is maximum.
Termination needs a capacity or path-selection assumption. For integer capacities, starting from zero, every residual capacity and augmentation is integral; each augmentation increases the value by at least one, and the value is bounded by the total source-outgoing capacity. The algorithm therefore terminates. Rational capacities can be scaled to integers. With arbitrary real capacities, unrestricted graph path choices do not guarantee finite termination. A valid uniformly terminating implementation is the Edmonds–Karp algorithm, choosing a shortest residual graph path each time.
Here is why that choice works independently of numerical capacity sizes. Residual distances from the source cannot decrease after augmenting along a shortest graph path. Every newly created residual arc is the reverse of a graph path arc; if it could cause the first distance decrease, its previous distance relation would contradict that decrease. When an arc is saturated on a shortest graph path, . Before the same direction can be saturated again, it must have been restored by a reverse augmentation on a shortest graph path, at which time . Each arc is consequently critical only times. There are arcs and each augmentation saturates at least one, giving augmentations, each found by breadth-first search in time. Thus the shortest-path Ford–Fulkerson implementation terminates and finds a maximum flow in arithmetic operations.
For sports elimination by maximum flow, first give the target team all its remaining wins. This cannot hurt its chance to finish strictly ahead: changing a result to favour it also removes a rival's win. Let be its resulting win count. If any rival already has at least wins, strict victory is impossible. Otherwise give each unordered pair of rivals one game node. Its incoming capacity is , and its two outgoing arcs go to the participating team nodes. Their capacities may be replaced by the finite numbersince no arc can need more than the total number of remaining rival games. Team has sink capacity .
An integral flow of value saturates all game-node incoming arcs. Its two outgoing amounts allocate exactly wins to the two teams; the team-sink caps keep each rival strictly below . Conversely any successful completion of the league specifies such a flow. Integral capacities and augmentation give an integral maximum flow, soafter the initial negative-capacity rejection. Each actual game is counted once: making independent nodes for both ordered pairs would double-count it.
The network has nodes and arcs. If each input integer has at most bits, its derived capacities have bits. The shortest-path algorithm above uses arithmetic operations, each on integers of polynomial bit length. Therefore the decision problem belongs to P, even with part of the input. If is fixed, even the basic integral-augmentation bound is polynomial in . If varies, that particular bound is only pseudopolynomial; it is the shortest-path implementation that establishes polynomial bit complexity.
Past exam of the mathematics course of the University of Cambridge 2006 ib Paper 2 9C Solution Created 2026-09-24 Updated 2026-10-14
A cut of a flow network of a directed flow network is a partition with the source in and the sink outside it. Its cut capacity is . Summing flow conservation over all vertices of cancels every internal edge and gives the flow value as outgoing flow minus incoming flow across the cut. Incoming flow is nonnegative and outgoing flow is bounded by capacity, soThis is weak duality for the maximum-flow problem; no converse theorem is needed for the upper bound.
For this grid, use . It contains but not . An adjacent edge can leave only by reaching the diagonal. Each of the three interior diagonal vertices has two incoming crossing edges and each endpoint has one, making eight edges. Every crossing edge has capacity one. Thus the diagonal cut in a nearest-neighbour lattice flow has capacity eight.
Here is a feasible flow of value eight. Send one unit on each of the following directed paths, and zero on every edge not used. In this list abbreviates the vertex :Every path conserves flow at its intermediate vertices. To check the capacities without hiding a feasibility assumption, group used edges by capacity: the capacity-one edges are traversed at most once; the capacity-two edges at most twice; the capacity-three edges at most three times; the capacity-four edges at most twice. Shared source edges , , carry units, and the corresponding three sink edges carry . The diagram displays every positive edge flow beside its capacity. Thus all constraints hold and the matching cut proves
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 2013 ib Paper 2 9H Solution Created 2026-09-24 Updated 2026-10-07
An cut of a flow network partitions a flow network into , with source and sink . Its cut capacity is the sum of capacities of arcs directed from to ; a minimum cut minimizes this sum.
Use the suggested nodes. Give capacity , each capacity , and each capacity . By the max-flow min-cut theorem, a flow of value exists once every cut capacity is at least .
Consider a cut of a flow network containing no crossing arc of capacity , and let be the intersections on the sink side. Every street incident to must also be on that side, or its arc to an endpoint in would cross the cut of a flow network. Hence at least source-to-street arcs cross, as do the intersection-to-sink arcs from the other intersections. Therefore its cut capacity is at leastA cut of a flow network crossing a capacity- arc has still larger capacity. The cut of a flow network just before the sink has capacity , proving the maximum flow value is exactly .
The integral max-flow theorem supplies an integral maximum flow. Every intersection sends units to the sink; each street can supply at most one unit, assigned to one endpoint. Orient each assigned street away from its assigned endpoint. Orient unassigned streets arbitrarily. Then each vertex has at least outgoing streets. An Ford-Fulkerson algorithm with integer capacities constructs this flow and therefore the street directions. Notice that the condition also is necessary: outgoing streets from vertices in are distinct edges incident to , so . This is an outdegree orientation criterion.
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



