Dual variable 2026-10-14
A dual variable is a multiplier associated with a primal constraint in a dual linear program. In a minimization linear program with equality constraints and nonnegative primal variables, the Lagrangian yields the dual objective and inequalities ; the equality-constraint multipliers are unrestricted in sign. For a transportation problem, row and column dual variables give potentials satisfying . Complementary slackness makes occupied routes attain equality.
Feasible point 2026-10-13
A feasible point satisfies every optimization constraint of an optimization problem. For the budget constraint example, the feasible set is exactlyIt is the line segment from to , a compact set and a convex set. The point is feasible, with product ; has a larger product but violates the budget constraint. Feasibility answers whether a decision is allowed; optimality asks whether any allowed decision is better. The extreme value theorem guarantees that this continuous objective function attains its maximum on this nonempty compact set.
Eliminating gives a one-variable objective function:By completing the square, , with equality exactly at . Alternatively its derivative is , which vanishes at ; the endpoint values are both zero. Completing the square proves global optimality directly, whereas the first-order optimality condition only identifies a candidate. It also quantifies the cost of imbalance: moving to with loses exactly units of product. The arithmetic-geometric mean inequality gives another short certificate: , with equality exactly when .
For a transportation problem with capacity inequalities, feasibility requires nonnegative shipments, row totals no greater than factory capacities and column totals equal to shop demands. Feasibility alone does not prove minimal cost: a matching transportation dual certificate with capacity inequalities provides an optimality proof. The feasible set can be empty, and a finite infimum need not be attained even when the set is nonempty.
Mathematical optimization Created 2026-09-24 Updated 2026-10-13
Mathematical optimization turns a preference into a precise question: among the allowed decisions, which gives the best outcome? A model separates the objective function, which measures quality, from the optimization constraints, which determine the feasible set. This language unifies finding a cheap plan for a transportation problem, efficient scheduling, or an accurate model in linear regression. The separation is useful because changing a preference and changing what is possible are different modeling decisions. See Boyd and Vandenberghe, introductory optimization models.
For an objective function , a maximization problem asks for a feasible point satisfying for every ; a minimization problem reverses the inequality. This is a global extremum. A local maximum or local minimum compares only nearby feasible points, so finding one does not settle the global question.
Consider allocating ten units between two complementary inputs:The budget constraint forces a tradeoff: an extra unit of costs a unit of . The best allocation is , with objective function value . Without the budget constraint, gives : there is no global maximum. Constrained optimization can therefore have a finite answer even when the corresponding problem with fewer optimization constraints does not. Its beauty is that geometry, calculus, and an arithmetic-geometric mean inequality can certify the same answer.
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 2001 ib Paper 4 14D Solution Created 2026-09-24 Updated 2026-10-14
Measure quantities in thousands of copies. Use five supply rows: initial inventory, regular production in month 1, overtime in month 1, regular production in month 2, overtime in month 2. Their supplies/capacities are . The three demand columns are the two due dates and a dummy column for unused capacity, with demands , balancing the total supply .
The transportation problem has cost matrixAn infinite entry prohibits delivering a later month's production to an earlier deadline. The extra in the second column of the early rows accounts for holding stock through the first month. For production rows, the dummy column represents capacity not used, not copies actually printed. Initial inventory assigned to the dummy column would instead remain in stock through both months, costing ; this distinguishes physical inventory from optional production capacity. No gratuitous disposal is needed in the optimum.
Let have the stated row and column sums, with the forbidden entries zero, and minimize . A feasible solution isThus regular production is in each month; overtime is zero then ; first-month closing inventory is , and final inventory is zero. Its total production-plus-holding cost isTo prove optimality, use transportation dual potentials for rows and for columns. Every allowed edge satisfies . Multiplying by any feasible shipment and summing gives the lower boundThe proposed shipment attains it, so the schedule is optimal. The dual calculation certifies the minimum without depending on an unshown transportation-simplex iteration.
Past exam of the mathematics course of the University of Cambridge 2003 ib Paper 3 15H Solution Created 2026-09-24 Updated 2026-10-14
A balanced transportation problem chooses nonnegative shipments minimizing , subject to and , where the total supply equals total demand. For multipliers , its Lagrangian isTaking its infimum over produces the linear programming duality problem of maximizing subject to . These are the transportation dual potentials.
The transportation simplex algorithm starts with a feasible transportation spanning tree of basic entries, obtainable by filling the north-west available cell with the smaller remaining supply or demand. Set on basic cells; this determines all potentials up to adding a constant to all and subtracting it from all . If all nonbasic reduced costs are nonnegative, feasibility and the dual bound prove optimality. Otherwise let a negative-cost cell enter. It closes a unique cycle in the basic tree. Alternate additions and subtractions around that cycle and choose the largest amount preserving nonnegativity, namely the minimum shipment on the subtraction cells. A cell that reaches zero leaves the basis. The cost changes by the entering reduced cost times the pivot amount. Zero basic cells and an anti-cycling rule can handle degeneracy; all pivots below are nondegenerate.
The north-west initial shipment matrix isWith , its transportation dual potentials are and . The most negative reduced cost is . The cycle is ; the pivot amount is . HenceNow and . Enter , of reduced cost , on cycle . The amount is , givingThe new potentials are and . Enter , of reduced cost , on cycle . The amount is . ThusTo certify optimality in the original transportation problem, take and . Their entire reduced-cost matrix isThey satisfy dual feasibility, and their value is , equal to the shipment cost. The minimum transportation cost is therefore , with no unproved optimality assertion from the iterations alone.
Past exam of the mathematics course of the University of Cambridge 2005 ib Paper 1 8D Solution Created 2026-09-24 Updated 2026-10-14
Associate free real dual variables and with the row and column equality constraints. The Lagrangian for the transportation problem isIts infimum over is finite exactly when for every pair. The linear programming duality therefore givesThe dual variables have no sign restrictions because the primal constraints are equalities.
A feasible shipment is optimal if and only if there exist feasible transportation dual potentials satisfying complementary slackness:Thus every occupied route must have . To see sufficiency explicitly, the primal minus dual objective isand complementary slackness makes it zero. This is the weak duality certificate. Necessity follows from strong duality for the feasible, bounded linear program. If the total supply is positive, gives feasibility; if , does. The feasible shipments form a closed bounded set, so the primal optimum is attained. This also covers zero supplies and demands. The one redundant equality merely leaves the dual gauge freedom .
Past exam of the mathematics course of the University of Cambridge 2008 ib Paper 2 9H Solution Created 2026-09-24 Updated 2026-10-14
Let be shipped amounts, with column sums equal to shop demand and row sums at most 15. Total demand is 42, so three units of warehouse stock need not be shipped. A feasible transportation problem allocation isIts row sums are and its column sums meet every demand. The cost is .
For a transportation dual certificate with capacity inequalities, choose warehouse potentials and shop potentials . They have and for every cell. Any feasible allocation therefore hasThe second inequality has this direction because and warehouse use is at most 15. The exhibited allocation attains the lower bound, so the minimum cost is .
Past exam of the mathematics course of the University of Cambridge 2009 ib Paper 3 20H Solution Created 2026-09-24 Updated 2026-10-14
Let be shipments, with column sums eight and row sums at most the four capacities. Total demand is , below total capacity , so unused capacity is allowed. This is a transportation problem with capacity inequalities; equivalently add a dummy shop demanding four units with zero shipping cost.
Using the original PDF's cost , take the feasible solutionIts row totals are and all column totals are eight. Four units of capacity remain unused at the second factory. Its shipping cost is .
To prove that the cost is a global minimum, use the transportation dual certificate with capacity inequalities. If row potentials satisfy and , every feasible solution satisfieswhere . The second inequality uses the sign of : multiplying a capacity upper bound by a nonpositive number reverses it. Choose and . The reduced costs areso every entry is nonnegative. The lower bound is , equal to the displayed shipping cost. The minimum shipping cost is .
For the production costs in a transportation problem, add the production cost of each factory to every real shipment from that factory. Unused capacity incurs no production cost, so the dummy-shop costs remain zero. The resulting real-shop cost matrix isA feasible solution isIts row totals are and column totals remain eight, leaving four units unused at the fourth factory. Its combined cost is .
For a matching transportation dual certificate with capacity inequalities, take and . Their reduced costs areall nonnegative. The lower bound is . Thus the minimum combined production and shipping cost is , and the second allocation attains it.
Past exam of the mathematics course of the University of Cambridge 2013 ib Paper 4 20H Solution Created 2026-09-24 Updated 2026-10-07
Write the top row as . The bottom row is then , and nonnegativity becomesThe feasible set is a hexagon in this plane. Its six vertices, hence all basic feasible solutions of this transportation problem, areThere are four independent constraints; each displayed support consists of four cells forming a transportation spanning tree, so each is a nondegenerate basic solution. Conversely, a basic feasible solution is a vertex, so the hexagon enumeration is exhaustive.
For any feasible , the proposed dual inequalities giveIf equality holds on every cell with , this last quantity equals . Hence for every feasible . This is weak duality with complementary slackness.
The Northwest corner method first allocates three units to , then two to , one to and four to :Choose , , . Equality holds on its four occupied cells. The other inequalities are and . Thus implies that minimizes .
The last printed clause changes from minimization to maximization. To answer that wording, use the transportation simplex algorithm for maximization, equivalently minimize the negative costs. There are only two possible entering cells at :
- Entering increases and by , and decreases and by . The maximal feasible step is , reaching and increasing by .
- Entering increases and , and decreases and . Here , reaching and changing by .
Put . On the feasible hexagon,If , this expression is maximized by taking , so is a global maximizer. If , the feasible vertex has objective larger than , so is not a maximizer. Nor can ever be one: comparison with requires , while comparison with the vertex requires . Therefore one pivot to a maximizer is possible exactly when , by entering . Its reduced cost for maximization is ; the other reduced cost is , so the improving pivot is unambiguous.
If “transportation algorithm” is required to retain the preceding minimization objective, no such step can reach a maximizer: every minimizing step is nonincreasing, whereas the feasible point always has . If the final word was intended to be “minimizes”, the corresponding genuinely improving one-pivot condition would instead be ; at , is already optimal and a zero-cost pivot is possible. These distinctions preserve the printed maximization request without silently altering it.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 1 8H Solution Created 2026-09-24 Updated 2026-10-03
A transportation problem minimizes subject to nonnegative shipments, prescribed row supplies, and prescribed column demands.
For an optimality certificate, take row potentials and column potentials . Their sums equal costs in occupied cells and do not exceed any cost:The dual value is , so linear programming duality proves optimality.
Past exam of the mathematics course of the University of Cambridge 2022 ib Paper 3 19H a Solution Created 2026-09-24 Updated 2026-09-25
A transportation problem chooses nonnegative shipments from suppliers to consumers so that row sums equal supplies and column sums equal demands, while minimizing .
The north-west corner rule givesIt has positive cells and its support contains no cycle, so it is a nondegenerate basic feasible solution.
Past exam of the mathematics course of the University of Cambridge 2022 ib Paper 3 19H b Solution Created 2026-09-24 Updated 2026-09-25
The stated plan isIts six positive cells form a spanning tree of the supplier--consumer bipartite graph, so it is basic and feasible. Taking , the basic-cell equations giveThe complete matrix of reduced costs isThe negative entry proves that the plan is not optimal.
Enter cell . The alternating cycle isand the step is . The new plan iswhose cost is , down from . New potentials areand the reduced-cost matrix isEvery reduced cost is nonnegative, so the transportation optimality criterion shows thatThe zero reduced cost in cell also indicates an alternative optimum.
For shipments with factory row sums at most capacities and shop column sums exactly demands , the displayed dual potentials give . The sign ensures . Equality proves optimality. It occurs when every used cell is tight and every row with spare capacity has , the relevant complementary slackness conditions. A dummy demand column with zero costs converts unused capacity into a balanced transportation problem.