In a directed network with no negative-cost directed cycle, add a source having zero-cost arcs to all vertices and compute shortest-path distances . The inequalities make dual feasible for uncapacitated minimum-cost flow. Shortest-path tree arcs are tight. An arbitrary spanning tree also fixes tight candidate potentials up to a constant, but it does not guarantee the non-tree inequalities; these must be checked.
Network dual potential 2026-10-06
A vertex potential in the dual of an uncapacitated minimum-cost flow yields the edge inequalities . Its objective is . Adding a common constant leaves all network reduced costs and the objective unchanged when total net supply is zero. Potentials tight on a spanning tree are fixed up to this common constant.
Network reduced cost Created 2026-10-06 Updated 2026-10-14
With the tail-positive incidence convention, a network edge's reduced cost is . For uncapacitated minimum-cost flow, dual feasibility requires and complementary slackness requires . A negative non-tree reduced cost identifies an improving graph cycle pivot in the network simplex algorithm. This sign convention differs from the row-column potentials of a transportation problem.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 34 3 Solution Created 2026-10-03 Updated 2026-10-14
For a directed graph, the uncapacitated minimum-cost flow problem isPositive is external supply and negative is demand; summing the flow balances requires . There are no finite upper arc capacities. Let be the oriented incidence matrix with tail and head . For free dual potentials , the Lagrangian isIts infimum over nonnegative flows is exactly when every network reduced cost is nonnegative; otherwise the infimum is minus infinity. Thus the dual maximizes subject to these inequalities. For a primal feasible flow and dual feasible potentials,This derives weak duality and the complementary slackness condition . A feasible pair satisfying it has equal objectives and certifies optimality.
A spanning tree gives candidate network dual potentials by making all its arcs tight: choose one root potential and propagate along each tree arc, reversing this equation when traversing against the arc. An arbitrary tree does not automatically make the non-tree reduced costs nonnegative; those inequalities must be checked. If a guaranteed feasible construction is needed and there is no negative directed cycle, use dual network potentials from shortest-path distances: add an auxiliary source reaching every vertex, calculate distances , and take . The shortest-path inequality proves dual feasibility, with tightness on the shortest-path tree.
For the printed dashed tree, set all non-tree flows to zero and solve the balances from the leaves. This givesThe remaining arcs have zero flow. The total initial cost is . This is a basic feasible solution, though degenerate because the tree flow on is zero.
Normalize . Tree tightness givesThe non-tree reduced costs areThe negative reduced cost on identifies an improving entering arc for the network simplex algorithm. Adding it to the tree creates a unique undirected cycle. Sending along increases the flows on by and decreases those on by ; all other flows are unchanged. This balanced displacement preserves every node equation. Nonnegativity limits to the minimum of the four decreasing flows, namely . Choose arc to leave among the tied limiting arcs.
After this one pivot the nonzero flows areand every other arc flow is zero. The objective decreases by , giving cost .
For the new tree, tight potentials normalized at vertex 1 areAll tree reduced costs are zero. For the non-tree arcs they are , respectively, so the potentials are dual feasible. Their dual objective ismatching the primal cost. Complementary slackness therefore provesThis is the stopping test of the network simplex method: maintain a feasible tree flow, compute tight potentials, enter a negative-reduced-cost non-tree arc, make a maximal feasible cycle adjustment and exchange a limiting tree arc, until all reduced costs are nonnegative. Here exactly one improving step suffices.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 38 2 Solution Created 2026-10-03 Updated 2026-10-14
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 equationsThe 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 formulationThe 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 isIts 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 isEquivalently, 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 costzero 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 areIn 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 giveThere are two nonbasic arcs. Their network reduced costs areBring 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 areThe 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, isThe path has duration , so it and the timetable furnish a unit-flow certificate for project duration.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 38 3 a Solution Created 2026-10-03 Updated 2026-10-06
Choose the oriented incidence matrix convention with at an edge's tail and at its head. Let be net supply, so . The uncapacitated minimum-cost flow problem on a finite directed graph isor . Negative denotes net demand. Costs may have either sign; the problem can be infeasible or unbounded.
For vertex network dual potentials , the optimization Lagrangian isThe infimum over is finite exactly when every network reduced cost is nonnegative. Thus the Lagrangian dual problem and complementary slackness areA feasible flow and feasible network dual potentials satisfying these equalities have equal costs and are optimal by weak duality.
If the underlying undirected graph is connected, deleting one redundant balance row makes the oriented incidence matrix have rank . A set of independent edge columns is exactly a spanning tree. Set all non-tree flows to zero, solve the tree balances, and check nonnegativity to obtain a basic feasible solution. Basic tree edges may have zero flow, which is degeneracy in linear programming. Requiring on tree edges determines network dual potentials up to a common additive constant. If every non-tree network reduced cost is nonnegative, the tree flow is optimal. This is the basis of the network simplex algorithm. If the graph is disconnected, solve the balances separately in each component; each component must have total net supply zero and uses its own spanning tree.
Project scheduling duality 2026-10-14
On the augmented precedence graph, the linear programming problemhas dual , with a unit source-to-sink flow. Equivalently, the dual is the negative of the optimal uncapacitated minimum-cost flow value with arc costs . The flow selects a longest path, while the time variables provide a matching weak duality bound.
// Target: mathematical-optimization.bigb