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.
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.
Write the top row as . The bottom row is then , and nonnegativity becomes
The feasible set is a hexagon in this plane. Its six vertices, hence all basic feasible solutions of this transportation problem, are
There 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 give
If 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.
Row and column potentials satisfying the displayed inequalities give a lower bound on the cost of every feasible shipment matrix: , since row sums are supplies and column sums are demands . The reduced costs are . A feasible matrix using only zero-reduced-cost cells attains the lower bound, proving optimality by weak duality. The transportation simplex algorithm sets these potentials by equality on a transportation spanning tree, and enters a negative-reduced-cost cell if one exists.