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 matrix
An 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 is
Thus 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 is
To 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 bound
The proposed shipment attains it, so the schedule is optimal. The dual calculation certifies the minimum without depending on an unshown transportation-simplex iteration.
A balanced transportation problem chooses nonnegative shipments minimizing , subject to and , where the total supply equals total demand. For multipliers , its Lagrangian is
Taking 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 is
With , its transportation dual potentials are and . The most negative reduced cost is . The cycle is ; the pivot amount is . Hence
Now and . Enter , of reduced cost , on cycle . The amount is , giving
The new potentials are and . Enter , of reduced cost , on cycle . The amount is . Thus
To certify optimality in the original transportation problem, take and . Their entire reduced-cost matrix is
They 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.
Associate free real dual variables and with the row and column equality constraints. The Lagrangian for the transportation problem is
Its infimum over is finite exactly when for every pair. The linear programming duality therefore gives
The 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 is
and 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 .
Use the transportation simplex algorithm, with transportation dual potentials and reduced costs . On a basic cell choose . The initial shipment matrix, read from the circled entries in the PDF, is
Its six positive cells form a transportation spanning tree. Setting gives
Enter cell , whose reduced cost is . The cycle pivot has signs
The maximum feasible increment is , so cell leaves the basis. The result is
For the new transportation spanning tree,
Enter cell with reduced cost . Its cycle pivot is
Now , and cell leaves. We obtain
Its row sums are and its column sums , as required. The final transportation dual potentials are
All reduced costs are nonnegative, proving optimality. More explicitly, for any feasible shipment matrix ,
Our shipments use only zero-reduced-cost cells and attain this lower bound. This supplies an independent weak duality certificate for the transportation optimum.