A flow network is a directed graph with distinct source and sink vertices and a nonnegative flow network edge capacity on each directed edge . In the finite setting here, every flow network edge capacity is a finite real number. A feasible flow assigns a nonnegative amount to each original directed edge, satisfies the capacity constraints, and obeys flow conservation at every other vertex:These are nonnegative arc amounts. The antisymmetric convention in flow instead records net amounts , taking a missing arc amount as zero. The two conventions express the same flow conservation; keeping them distinct makes backward residual network edges easier to interpret.
Think of vertices as routers, directed edges as communication links, flow network edge capacities as available bandwidth, and flow as a steady transmission rate. An intermediate router can distribute incoming traffic among outgoing links, but flow conservation prevents it from creating traffic. The maximum flow problem asks how much total traffic can pass from to , allowing several graph paths to share the work. The same flow network language models transportation and abstract resource allocation.[ref]
https://ocw.mit.edu/courses/6-854j-advanced-algorithms-fall-2008/4064d889e5033a9915327a777d12b592_notes_flow.pdf. Goemans, Network flows, introduction and maximum flow formulation
Our running flow network has vertices and exactly five directed edges, with flow network edge capacitiesThe cross edge lets traffic entering use spare capacity on . With this edge removed, the two separate graph paths can carry only ; including it will let the maximum flow reach . Thus a link's usefulness depends on the rest of the flow network, rather than just its own flow network edge capacity.
A prescribed minimum amount on each directed edge can be removed by substituting . The new capacity constraints are . For a circulation with vertex demands using net inflow , the adjusted demand is . Solving the adjusted problem and adding back gives a one-to-one correspondence of feasible solutions. In particular, removing a lower bound on increases 's residual demand and decreases 's by that amount.
A network circulation is a flow with zero net supply at every vertex. A feasible residual network circulation changes one feasible flow into another with the same prescribed supplies. It decomposes into directed cycles, giving the negative-cycle optimality test for minimum-cost flow.
A flow on a directed graph satisfying capacity constraints and a specified net inflow at each vertex. Positive denotes consumption and negative supply. Summing all balances cancels each edge once as inflow and once as outflow, so is necessary. With balanced demands and no lower bounds, add a source edge of flow network edge capacity into every supply vertex and an edge of flow network edge capacity from each demand vertex to a new sink. A maximum flow saturating all auxiliary edges exists exactly when the demands are feasible.
An internal vertex capacity bounds the total flow through that vertex, equivalently its total inflow or outflow by flow conservation. Replace the vertex by an input and output vertex, direct incoming edges to the input and outgoing edges from the output, and connect input to output with an edge of the vertex capacity. This converts the constraint into an ordinary flow network edge capacity.
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
For a league in which every remaining game gives exactly one win, first give the target team all its remaining wins, obtaining . Make a node for each unordered pair of other teams, with source capacity equal to their remaining games. Route each game-node flow to one of its two teams, and cap the team's total additional wins at for a strict target victory. A negative cap immediately rules out success. Otherwise an integral maximum flow saturating every game-source arc specifies the winners of all games and proves feasibility. Each actual game is counted once; duplicating ordered pairs changes the problem.
In a flow network for treatment facilities, the amount treated at a facility is represented by a directed arc from it to the sink, with that arc's capacity equal to its treatment limit. Untreated fluid may pass through the facility independently of how much is treated there. Thus the treatment limit is not a bound on total incoming flow. Flow conservation at a facility equates incoming flow with outgoing untreated flow plus its sink-arc flow.
To find the smallest link failure set separating a client from every server, add a common sink with sufficiently large-capacity server arcs and give original links unit capacities in both directions. The max-flow min-cut theorem identifies the minimum failure count . Unit-capacity vertex splitting also charges intermediary node failures. The network tolerates fewer than failures and fails for some set of failures. This concerns connection to at least one server, not separate connectivity to each server.
This maximum flow algorithm repeatedly augments along a shortest residual path found by breadth-first search. Residual distances from the source never decrease. If the same arc becomes saturated again after being restored by a reverse augmentation, the distance to its tail has increased by at least two. Thus each arc is critical only times, yielding augmentations. Each search costs , so the total time is . Termination with no residual source-sink path supplies a max-flow min-cut theorem certificate.
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.
Replace a vertex by and an arc between them carrying its vertex capacity. Incoming arcs enter and outgoing arcs leave . A path must cross that internal arc to use the vertex. This converts node-capacitated maximum flow to an ordinary flow network. For undirected mixed-failure cuts, normalize the source side so inside implies inside; then each original link contributes at most one crossing orientation.
A directed edge capacity is the upper bound on the feasible nonnegative flow through that edge. In a residual network, its forward residual capacity is and its backward residual capacity is . Increasing every edge capacity need not increase the maximum flow by that same amount, because a cut of a flow network can contain several edges.
If a directed edge has capacity , a feasible flow satisfies . In an antisymmetric-flow convention, this is encoded together with the residual capacity of the reverse orientation.
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.
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.
On , give an adjacent edge capacity equal to the larger endpoint distance from the diagonal. The set has outgoing edges: two at each interior diagonal vertex and one at each endpoint. Every such edge has capacity one. Thus any flow from above to below the diagonal is at most ; a feasible path decomposition attaining this value certifies optimality by weak duality.
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.
In a finite directed graph with distinct source and sink vertices , a flow records an amount on each original directed edge. For a feasible flow in a flow network, these amounts satisfy the capacity constraints and flow conservation at every vertex other than .[ref]
FlowEdge.java. Algorithms, 4th edition by Robert Sedgewick and others; Sedgewick and Wayne, FlowEdge.java, class documentation and capacity/flow constructor: nonnegative amount on an original directed edge, bounded by capacity
The antisymmetric convention records signed net amounts instead:taking missing edge amounts as zero. The paired signs describe one net transfer, rather than two independent transfers.[ref]
Flows (author-hosted chapter preview). Graph Theory by Reinhard Diestel; Diestel, Flows, §6.2, conditions F1 and F2′, printed p. 158: antisymmetry and conservation at nonterminal vertices
For example, if separate original directed edges and carry and , their net amount is . This signed record loses the separate amounts: , would give the same net amount. When checking capacity constraints on actual edges, keep the original amounts or specify the signed bounds carefully; when summing flow conservation, either record gives the same divergence of a flow.
For the running flow network, choose the original edge amountsEvery capacity constraint holds. At , incoming flow equals outgoing flow ; at , incoming flow equals outgoing flow . This feasible flow has flow value , computed at or .
The total of all five edge amounts is , but the flow value is . A unit passing through several edges appears several times in that total. Concretely, route units along each of the directed paths and , and along . Their delivered amounts sum to , while their edge usages sum to . The cut of a flow network certifies that this delivery rate is already a maximum flow.
Flow conservation is useful because it makes a local ledger predict a global delivery rate: intermediate vertices only redistribute the resource. An additional network circulation can change the individual edge amounts without changing the flow value. Counting net delivery rather than total edge usage prevents such recirculation from masquerading as increased output.
A unit flow from to is an antisymmetric flow with net outward strength of a flow one at , net inward strength one at , and zero divergence of a flow elsewhere. For a unit flow to infinity, only the finite source has nonzero divergence.
The divergence of a flow at a vertex is net outward flow. For original nonnegative edge amounts and their signed net record, respectively,Positive divergence of a flow means net supply, negative divergence of a flow means net demand, and zero is flow conservation. This is the same sign convention as flow balance.
In the running example, the divergences of a flow at are . Adding the four divergences of a flow gives zero: every edge contributes positively at one endpoint and negatively at the other. In a finite flow network, this cancellation explains why net supply at equals net demand at .
Flow conservation requires equal total inflow and outflow at every vertex other than the source and sink:Equivalently, the divergence of a flow is zero there.[ref]
FordFulkerson.java. Algorithms, 4th edition by Robert Sedgewick and others; Sedgewick and Wayne, FordFulkerson.java, excess and isFeasible methods, lines 138–175: incoming minus outgoing amount and zero excess at nonterminal vertices
This is a steady accounting condition: an intermediate vertex neither creates the routed resource nor accumulates it. Splitting is allowed; equality between individual incoming and outgoing edges is not required. For the running flow, the equation at is , or , and at it is , or .
Capacity constraints alone do not ensure flow conservation. For instance, changing only from to keeps every edge amount within its flow network edge capacity, but leaves an excess inflow of at and an excess outflow of at . It is therefore not a feasible flow. Changing all affected edge amounts together to restores both equations and gives flow value .
The strength of a flow, also called its flow value, is net outflow from , equivalently net inflow to :The notation denotes this signed value, rather than an absolute value.[ref]
Flows (author-hosted chapter preview). Graph Theory by Reinhard Diestel; Diestel, Flows, §6.2, printed p. 159: total value after Proposition 6.2.1 and footnote 4 on possible negative values
The equality follows by summing the divergence of a flow over all vertices: the internal vertices contribute zero by flow conservation, while every edge cancels between its two endpoints. Hence . For the running flow, .
Net outflow matters even when the source has incoming edges. As a separate example, give , and flow network edge capacities and flow amounts . At , flow conservation reads . The source sends units along outgoing edges but receives back, so the flow value is , exactly the amount arriving at . The two-edge network circulation through raises total edge usage without increasing net delivery.
An infinite locally finite connected graph is a transient graph exactly when it supports a unit flow from a vertex to infinity with finite energy of a flow.
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
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
If every directed edge capacity increases by , a cut of a flow network with outgoing edges gains . By the max-flow min-cut theorem, the new maximum flow value isFor a finite flow network, this is a nondecreasing concave piecewise-linear function, and its active cut can change as varies. Two unit-capacity edge-disjoint two-edge source-to-sink paths gain , refuting an invariably exact increase. If there is a directed source-to-sink path, every cut has at least one outgoing edge and the increase is at least ; without a path it can be zero.
A flow network with integer capacities has a maximum flow whose value on every edge is an integer. The augmenting-path algorithm proves this because every augmentation preserves integrality.
In a finite bipartite graph, the maximum size of a matching equals the minimum size of a vertex cover. It follows by representing matching as an integral flow and vertex covers as finite-capacity cuts.
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.
For arc capacities , the feasible flow has value four. The displayed residual path has bottleneck one and traverses opposite to the original arc . Augmentation cancels one unit there and gives of value five. The sink cut has capacity five, proving optimality. Reverse residual arcs are what permit rerouting instead of only adding flow along unused forward arcs.
For an undirected capacitated network, write the net edge flow as , and the directed residual capacity as . On every source–sink cut, residual capacity is the original cut capacity minus the current net flow value . Taking the minimum over cuts and applying the max-flow min-cut theorem to each network gives the displayed remaining-flow identity.
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 .
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.
Starting from zero flow, a widest augmenting path increases the current flow by at least , where is its remaining optimality gap. Therefore . Integer capacities keep this gap integer, so a gap below one is zero. The method takes augmentations for , or uniformly ; zero maximum flow requires no augmentation.
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.
Starting from the zero flow with integer capacities, every residual capacity and every augmenting bottleneck is an integer. Each augmentation therefore preserves integer edge flows and raises the flow value by at least one. Since the value is bounded by the total capacity leaving the source, the algorithm terminates after finitely many augmentations with an integral maximum flow.
If one edge leaving the source has capacity , every cut capacity is affine in with coefficient zero or one. In the 2024 Cambridge Part IB example, cuts of capacities and are both sharp, giving
Articles by others on the same topic
There are currently no matching articles.



