A company runs three warehouses and must supply five shops. Each warehouse holds a fixed stock, each shop needs a fixed amount, and shipping a crate along each warehouse→shop route costs a known sum. In how many crates, along which routes, should the goods move so that every shop is served, no warehouse over-ships, and the total freight bill is as small as possible? That is the transportation problem — one of the oldest and most useful models in operations research, born in the 1940s from the very literal question of moving supplies to where they are needed.
A transportation problem has
The first family of constraints says each source ships out exactly its supply; the second says each sink receives exactly its demand. Nothing else. This spare structure is what makes the problem so beautifully solvable.
Every source connects to every sink, and the number on each arc is its unit cost. A solution chooses how much flows along each arc so the columns balance the demands and the rows balance the supplies.
Rather than draw the network, practitioners lay the data out as a grid — the
transportation tableau — with supplies down the right margin, demands along the
bottom, and unit costs tucked into each cell. Here are two sources and three sinks, all in balance
(
| Shop D₁ | Shop D₂ | Shop D₃ | Supply | |
|---|---|---|---|---|
| Warehouse S₁ | 8 | 6 | 10 | 20 |
| Warehouse S₂ | 9 | 4 | 7 | 30 |
| Demand | 10 | 25 | 15 | 50 |
Each cell will eventually hold a shipment
Two quick rules give a feasible starting shipment plan to improve from:
On the tableau above, the least-cost rule grabs cell S₂D₂ first (cost 4), shipping 25; then S₂D₃ (cost 7)
for the remaining 5 of S₂; then fills S₁ into D₁ and D₃. A non-degenerate basic solution always uses
exactly
A starting plan is rarely optimal, so we test it. For every unused route we ask: if I forced one
crate down it, would the total cost fall? Rerouting one crate ripples through the tableau along a closed
loop of occupied cells (add here, subtract there, add, subtract), and adding up the costs around that
loop gives the net saving. This bookkeeping is the stepping-stone method; the algebraic
shortcut that computes all those loop costs at once, using row and column "potentials"
The transportation problem is a linear program — yet its optimal solution is automatically a
whole number whenever the supplies and demands are whole numbers, with no need to demand integrality.
The reason is the special shape of its constraint matrix: it is totally unimodular
(every square sub-determinant is
The tidy equalities