Definition · The transportation problemGiven m sources with supplies sᵢ, n destinations with demands dⱼ, and a unit cost cᵢⱼ for each pair, the transportation problem is to choose xᵢⱼ ≥ 0 minimising Σ cᵢⱼ xᵢⱼ subject to each row summing to its supply and each column to its demand.
It is balanced when Σ sᵢ = Σ dⱼ. Only a balanced problem has a feasible solution, because the row equations and the column equations both add up to the total shipped.
This is the minimum-cost flow programme with the drawing removed. The sources and destinations are the nodes, the cells are the arcs, no arc has a capacity — and the node equations, written as a table, become “each row sums to its supply, each column to its demand”. A tableau is worth having anyway, because the structure it exposes is what the method in the “Potentials and the Stepping-Stone Cycle” exploits.
D1 D2 D3 D4 supply
Plant A 10 2 20 11 15
Plant B 12 7 9 20 25
Plant C 4 14 16 18 10
demand 5 15 15 15
total supply 15 + 25 + 10 = 50
total demand 5 + 15 + 15 + 15 = 50 balanced, no dummy
m + n - 1 = 3 + 4 - 1 = 6 occupied cells in a basis
When the margins do not agree
Two cases, one fix each. More supply than demand: add a dummy destination whose demand is the difference, with a cost of zero in every cell of its column. More demand than supply: add a dummy source with that supply and a zero row. Either way the problem becomes balanced, every real cost is untouched, and units sent to the dummy are units that never move.
Example · A surplus of tenThree mills supplying 20, 30, 25 and three yards demanding 20, 25, 20: 75 available and 65 wanted. The lab adds a dummy destination carrying 10, both totals become 75, and the three costs in the new column are 0, 0, 0.
The optimum for this instance costs 605, and whichever plan is chosen, exactly 10 units go to the dummy — they have nowhere else to go. That is what makes a uniform dummy price harmless and a non-uniform one dangerous.
Example · A shortfall of fiveTwo sources supplying 4 and 6 against demands of 5, 5, 5: 10 available and 15 wanted. A dummy source of 5 is added, with the row 0, 0, 0, and both sides become 15.
The dummy row now says which destinations go short, and by how much. That is genuinely useful output and it is the reason the dummy is part of the model rather than an apology for it.
Two ways to start, and the count both have to meet
The north-west corner rule fills the top-left cell with as much as its row and column allow, crosses off whichever is exhausted, and repeats. It never looks at a single cost. The least-cost rule picks the cheapest remaining cell instead, so it reads the costs and is greedy. Both produce a basic feasible solution; neither produces an optimum, and neither claims to.
Example · Two starts on the same tableOn the three-plant table above, the north-west rule occupies six cells and ships at a cost of 520. The least-cost rule occupies six cells too and ships at 475, one of which carries zero — the cell joining the second plant to the second depot.
The optimum is 435, so neither start is close and the cheaper start is not automatically the better one to start from. What matters is that both are bases: six cells, spanning, acyclic.
Example · A start that cannot be pricedOn the lab's third table — three depots and three shops where the north-west rule ties — the least-cost rule occupies only four cells where five are needed, and those four fall into two disconnected pieces. The potentials of the lesson that follows then cannot be solved for: three of the six never get a value.
The lab repairs it by placing a zero allocation in the cell joining the first depot to the first shop, which is the cheapest cell that joins two pieces of the forest without closing a cycle. The count is restored to five, the basis becomes a spanning tree, and the method can start. The north-west rule on the same data occupies five cells, two of them carrying zero.
Those zeros are not decoration and they are not absences. A basic cell carrying zero is in the basis, it has a potential equation, and it can be the cell that leaves at the next pivot. A reader who quietly drops them will find the count wrong two steps later and will not know when it went wrong.