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, is
Only outward directed edges contribute; incoming and internal edges contribute nothing.[ref]
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. Thus
The 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, because
and 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.
Divergence of a flow Created 2026-09-24 Updated 2026-10-18
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 Created 2026-09-24 Updated 2026-10-18
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]
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]
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 amounts
Every capacity constraint holds. At , incoming flow equals outgoing flow ; at , incoming flow equals outgoing flow . This feasible flow has flow value , computed at or .
Figure 1.
An original-edge flow ledger verifies capacity constraints, flow conservation and flow value five
. Details.
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.
Flow balance Created 2026-10-06 Updated 2026-10-14
A flow balance prescribes net outgoing minus incoming flow at a vertex. Positive is supply and negative is demand; zero is ordinary flow conservation. Summing all balances requires total supply to equal total demand. In a directed graph, these equations are represented by the oriented incidence matrix.
Flow conservation Created 2026-09-29 Updated 2026-10-18
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]
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 .
Flow network Created 2026-09-24 Updated 2026-10-14
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]
Our running flow network has vertices and exactly five directed edges, with flow network edge capacities
The 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.
Fundamental cycle 2026-10-14
Adding a non-tree edge to a spanning tree creates exactly one graph cycle, its fundamental cycle. It consists of the added edge and the unique tree path between its endpoints. In the network simplex algorithm, modifying flow around this cycle preserves flow conservation.
Kirchhoff node law Created 2026-10-06 Updated 2026-10-14
The Kirchhoff node law says the sum of outward currents at a graph vertex is zero unless that graph vertex is a source or sink. In an electrical network, it is flow conservation; a unit flow has divergences and at its terminals.
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]
Why is a cut of a flow network an upper bound? Sum flow conservation on its source side . Internal edge contributions cancel, leaving
Only 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.
Figure 1.
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]
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 , take
Every 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]
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]
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]
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.
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 states
For 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. Thus
The 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.
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 states
Summing conservation over cancels internal edges and gives
This 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. Hence
Together 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.
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 gives
The 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 number
since 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, so
after 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.
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, so
This 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
Figure 1.
Feasible eight-unit grid flow with edge labels showing flow over capacity and the diagonal cut of capacity eight
. Details.
In a minimum-cost flow problem, every directed arc has a per-unit cost and lower and upper capacities . Each vertex has a prescribed net supply , with . We seek flows minimizing subject to the flow conservation equations
The uncapacitated minimum-cost flow case has and, here, .
For project scheduling, augment the precedence graph with a source , of duration , and a sink . Join to every task with no predecessor, and every task with no successor to . Extend the precedence matrix to these dummy arcs. This augmentation is needed because the printed matrix by itself contains no start or finish vertex. Assuming the precedence graph is a Directed acyclic graph, every task lies on a source-to-sink path. Unlimited parallel work then gives the linear programming formulation
The time variables are unrestricted; a common translation changes nothing, so we may fix . These inequalities say that each successor starts after its predecessor finishes. In a topological order, their coordinatewise earliest solution is , the recursion of the critical path method.
To derive project scheduling duality, associate a nonnegative multiplier with . The Lagrangian is
Its infimum over the free time variables is finite precisely when the coefficients of all vanish. This gives one unit of net outflow at , one unit of net inflow at , and zero net flow at other vertices. Hence the dual is
Equivalently, minimize with . The project duration is the negative of the optimal minimum-cost flow value. The sign is essential: the dual of the minimization problem maximizes total duration, selecting a longest precedence path.
The network simplex algorithm is a general method for minimum-cost flow. After shifting lower bounds to zero, first find a feasible flow, using artificial arcs and a phase-one objective if needed. A network simplex tree basis fixes each non-tree arc at a bound and determines the tree flows by flow conservation. Choose network dual potentials making the network reduced cost
zero on the tree. An arc at its lower bound is improving if ; an arc at its upper bound is improving in reverse if . Adding that residual arc creates one fundamental cycle. Increase flow around this cycle until an arc reaches a bound, then exchange the entering and leaving tree arcs, or flip the entering arc to its other bound. The flow conservation equations remain satisfied. Use an anti-cycling rule for degenerate pivots. If a negative-cost residual cycle has no finite limiting capacity, the objective is unbounded below; if phase one cannot remove artificial flow, the problem is infeasible. Otherwise, termination with no negative residual network reduced costs certifies optimality, since potentials cancel around cycles and every residual network circulation has nonnegative cost.
For this project the augmented arcs are
In the specified initial spanning tree, the unique unit-flow path is . The flow on its arcs is one and that on all other tree arcs is zero. Its total cost is , so this is a degenerate but feasible network simplex tree basis. Normalizing , the tree equations give
There are two nonbasic arcs. Their network reduced costs are
Bring into the tree. The resulting cycle increases the flows on and decreases those on . The three decreasing arcs initially carry one unit, so the maximal step is one. Resolve the leaving-arc tie by removing . The resulting unit flow follows and has cost .
For the new tree, normalized potentials are
The only nonbasic arcs now have and , both nonnegative. All tree network reduced costs vanish, proving optimality after this single pivot. The earliest feasible schedule, obtained by the critical path method, is
The path has duration , so it and the timetable furnish a unit-flow certificate for project duration.
For a finite directed flow network with nonnegative finite edge capacities, a source and a distinct sink , the max-flow min-cut theorem states that the largest feasible flow value equals the smallest capacity of a cut separating from . A feasible flow has on each directed edge and flow conservation at all other vertices. Its value is the net outflow at .
For any cut containing but not , sum conservation over vertices of . Internal edges cancel, giving
Thus every flow value is bounded by every cut capacity.
A maximum flow exists: the feasible set is nonempty, closed and bounded in a finite-dimensional edge-coordinate space, hence compact, and the flow value is continuous. For such a flow, form its residual network: each original edge has forward residual capacity and backward residual capacity . Keep these as edge-labelled arcs if the original network already has edges in both directions. If a directed positive-residual path joined to , increasing the flow along its forward arcs and decreasing it along its backward arcs by the path's positive bottleneck capacity would preserve feasibility and increase the value. That contradicts maximality.
Let be the vertices reachable from by positive residual arcs. Then . Every original edge from to is saturated, otherwise its forward residual arc would extend reachability. Every original edge from to has zero flow, otherwise its backward residual arc would extend reachability. Therefore
Together with the bound for every flow and cut, this proves
The compactness step makes the proof valid for arbitrary real capacities; it does not assume that a particular augmenting-path algorithm terminates after finitely many augmentations.
Use the ideal steady incompressible-flow model, neglecting height change across the smooth nozzle. Flow conservation gives inlet and outlet speeds and . Set atmospheric pressure to zero. The Bernoulli equation between inlet and outlet gives
Choose a control volume containing the fluid in the nozzle, with the positive axis pointing toward the outlet. The integral momentum equation gives
Thus the fluid's force on the nozzle is , in the outlet direction. Substitute the pressure and velocities:
The fireman's holding force is equal and opposite. Therefore the required force points upstream and has magnitude
This is the holding force on a contracting nozzle; retaining the inlet pressure force is essential to its sign and value.
Label the towns from left to right, and the treatment plants as upper-left, upper-right, lower-left and lower-right. Model each treatment capacity as a sink arc to the sea. Incoming untreated sewage can be forwarded, so the numbers inside the plant circles constrain treatment, not total throughput.
The sum of treatment capacities is , so no feasible flow network can handle more than 62. Here is a feasible routing attaining that upper bound. Send town inflows
Every town-to-plant flow respects its directed pipe capacity. Send an additional five units from to through their bidirectional pipe, whose capacity is twelve, and two from to through their bidirectional pipe, whose capacity is fourteen. Use neither horizontal plant-to-plant pipe.
Now receives and treats all of it. Plant receives , forwards five and treats fourteen. Plant receives and treats all of it. Plant receives , forwards two and treats twelve. Thus flow conservation holds at every plant and all treatment capacities are saturated. The routing proves the upper bound is achievable:
This is one optimal assignment, not a uniqueness assertion. The total bound comes from the cut consisting of all treatment-to-sea arcs; the explicit routing supplies a matching maximum flow certificate.