Suppose we have suppliers having supplies
and buyers having demands
(WLOG assume their sums are the same).
The transportation cost from
Hence, this is a Linear Program:
” Minimise
Calculate the Lagrangian:
Now, as
Also, by Complimentary Slackness,
whenever
The transportation algorithm
Firstly, find any feasible
(with not too many nonzero
This will give
Solve them (taking
If now
because we have a feasible Dual Problem and Complimentary Slackness
(Dual Problem in Linear Programs).
Otherwise, find the largest
Change
so that
Find the largest such
(i.e. one of the
Note that we have made the Lagrangian smaller by
But for a feasible
the Lagrangian only depends on
so we can shuffle the
Now we have a new set of
check if they are feasible,
if not, repeat the algorithm,
making the Lagrangian (and hence the cost) smaller every time.