0% found this document useful (0 votes)
22 views104 pages

The Transportation Algorithm

Uploaded by

zhiyu sun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views104 pages

The Transportation Algorithm

Uploaded by

zhiyu sun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MATH 308 D100, Spring 2022

24. The transportation algorithm


(based on notes from Dr. J. Hales and Dr. L. Stacho)

Luis Goddyn

SFU Burnaby

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 1 / 17
Transportation Algorithm

The goal is to convert a feasible basic transportation tableau, such as is produced by VAM, into
an optimal basic transportation tableau. The transportation algorithm of the textbook is a
network simplex algorithm since it mimics Phase 2 of the simplex algorithm.
How can we tell if a transportation tableau is optimal?
M3
M1 M2 M3 25
W1
W1 30 20 15 10 25 40 15
W2 15 30 30 25 30 M2
15 15
M1
W3
W3 30 15 20 15 15 30 30

45 30 25 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 2 / 17
Transportation Algorithm

The goal is to convert a feasible basic transportation tableau, such as is produced by VAM, into
an optimal basic transportation tableau. The transportation algorithm of the textbook is a
network simplex algorithm since it mimics Phase 2 of the simplex algorithm.
How can we tell if a transportation tableau is optimal?
M3
M1 M2 M3 25
15 25 W1
W1 30 20 10 40 15
W2 15 30 30 25 30 M2
15 15
M1
15 15 W3 30
W3 30 20 15 30
45 30 25 W2
The dual slack variables, sij , of the simplex tableau tell us that this one is optimal.
x11 x23 x22 x33 −1
M3
−1 1 1 1 15 = −x32
W1
0 1 1 0 30 = −x21
1 −1 −1 0 15 = −x31 $5 $0
M2 M1
1 −1 0 −1 15 = −x12 W3
$30
$25
0 1 0 1 25 = −x13
W2
0 −30 −25 −50 1750 = f
= s11 = s23 = s22 = s33

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 2 / 17
Transportation Algorithm

The goal is to convert a feasible basic transportation tableau, such as is produced by VAM, into
an optimal basic transportation tableau. The transportation algorithm of the textbook is a
network simplex algorithm since it mimics Phase 2 of the simplex algorithm.
How can we tell if a transportation tableau is optimal?
M3
M1 M2 M3 25
15 25 W1
W1 30 20 10 40 15
W2 15 30 30 25 30 M2
15 15
M1
15 15 W3 30
W3 30 20 15 30
45 30 25 W2
The dual slack variables, sij , of the simplex tableau tell us that this one is optimal.
x11 x23 x22 x33 −1
M3
−1 1 1 1 15 = −x32
W1
0 1 1 0 30 = −x21
1 −1 −1 0 15 = −x31 $5 $0
M2 M1
1 −1 0 −1 15 = −x12 W3
$30
$25
0 1 0 1 25 = −x13
W2
0 −30 −25 −50 1750 = f
= s11 = s23 = s22 = s33
We need to compute sij for every non-basic edge, and check whether sij ≥ 0.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 2 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3

W1

$20 $30
M2 $30 M1
W3
$15
$25
W2
To compute s22 :

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3

W1

$20 $30
M2 $30 M1
W3
$15
$25
W2
To compute s22 :
Naive method: Find the cycle using edge (W2 , M2 ) and some tree edges. Then take an
alternating sum of their costs.
s22 = 30 − 20 + 30 − 15 = $25.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3

W1

$20 $30
M2 $30 M1
W3
$15
$25
W2
To compute s22 :
Naive method: Find the cycle using edge (W2 , M2 ) and some tree edges. Then take an
alternating sum of their costs.
s22 = 30 − 20 + 30 − 15 = $25.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
$20 $30
$20 $5 $0 $30
M2 $30 M1
W3
$30 $15
$25
W2
To compute s22 :
Naive method: Find the cycle using edge (W2 , M2 ) and some tree edges. Then take an
alternating sum of their costs.
s22 = 30 − 20 + 30 − 15 = $25.
Repeat this for every nonbasic edge.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
$20 $30
$20 $30
M2 $30 M1
W3
$15

W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
$20 $30 $0
$20 $30
M2 $30 M1
W3
$15

W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
$20 $30 $0
$20 $30
M2 $30 M1
W3
$15

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
$20 $30 $0
$20 $30
M2 $30 M1
$30 W 3
$15

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W1

5
$1
−$10 $20 $30 $0
$20 $30
M2 $30 M1
$30 W 3
$15

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.

M3
0
$1

$25
W
$30 1

5
$1
−$10 $20 $30 $0
$20 $30
M2 $30 M1
$30 W 3
$15

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.
−$20
M3
0
$1

$25
W
$30 1

5
$1
−$10 $20 $30 $0
$20 $30
M2 $30 M1
$30 W 3
$15

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.
−$20
M3
0
$1

$25
W
$30 1

5
$1
−$10 $20 $30 $0
$20 $30
M2 $30 M1
$30 W 3
$15
$25

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).
c) For every non basic edge (i, j), set
sij = cij − ai − bj .

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Computing dual slack values (reduced costs)
Think of sij as a price differential or reduced cost: it is the extra cost of rerouting an item
through edge ij instead of through the basic edges in the tree.
−$20
M3
0
$1

$25
W
$30 1

5
$1
−$10 $20 $30 $0
$20 $5 $0 $30
M2 $30 M1
$30 W 3 $30 $15
$25

$15 W2
To compute s22 :
Better method: Compute node prices a1 , a2 , a3 , b1 , b3 , b3 for every node:
a) Pick any node, and give it any price. (The textbook suggests setting b1 = $0, but
often a higher price works better.)
b) Find all the other node prices iteratively by using tree edges and the equation
cij = ai + bj , for every basic edge (i, j).
c) For every non basic edge (i, j), set
sij = cij − ai − bj .

Advantage: Fewer calculations for each nonbasic edge.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 3 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 W1

5
$1
$20 $30 $0
30 20 10 $20 $30
M2 $30 M1
15 30 25 W3
$15
30 20 15
W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 W1

5
$1
$20 $30 $0
30 20 10 $20 $30
M2 $30 M1
15 15 30 25 W3
$15
30 20 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 W1

5
$1
$20 $30 $0
30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 W1

5
$1
−$10 $20 $30 $0
30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 30 0 0
M2 $30 M1
15 0 30 25 $30 W 3
30 0 0 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 30 0 0
M2 $30 M1
15 0 25 25 $30 W 3
$25
30 0 0 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 30 0 0
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 15
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 30 0 0 $5
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 5
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 0 0 0 $5 $0
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 5
$15 W2

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
−$20
Find node prices, using bj = 0 and cij = ai + bj : M3
0
$1

$25
0 -10 -20 W
$30 1

5
$1
−$10 $20 $30 $0
30 30 20 10 $20 $30
M2 $30 M1
15 15 30 25 $30 W 3
$15
30 30 20 15
$15 W2

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 0 0 0 $5 $0
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 5
$15 W2

This f acisult yoptimal


o f sc i en ce
since no sij is negative, so STOP.
MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
The initial node and initial price is arbitrary, since cij − (ai − t) − (bj + t) = cij − ai − bj .

0 -10 -20 15
30 30 20 10 30 20 10
15 15 30 25 15 30 25
30 30 20 15 30 20 15

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 0 0 0 $5 $0
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 5
$15 W2

This f acisult yoptimal


o f sc i en ce
since no sij is negative, so STOP.
MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
The initial node and initial price is arbitrary, since cij − (ai − t) − (bj + t) = cij − ai − bj .

0 -10 -20 15 5 −5
30 30 20 10 15 30 20 10
15 15 30 25 0 15 30 25
30 30 20 15 15 30 20 15

Find reduced prices, using sij = cij − ai − bj : −$20


M3

$25
W
0 -10 -20 $30 1
5
−$10 $1 $30 $0
30 0 0 0 $5 $0
M2 $30 M1
15 0 25 30 $30 W 3 $30
$25
30 0 0 5
$15 W2

This f acisult yoptimal


o f sc i en ce
since no sij is negative, so STOP.
MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
The initial node and initial price is arbitrary, since cij − (ai − t) − (bj + t) = cij − ai − bj .

0 -10 -20 15 5 −5
30 30 20 10 15 30 20 10
15 15 30 25 0 15 30 25
30 30 20 15 15 30 20 15

Find reduced prices, using sij = cij − ai − bj :

0 -10 -20 15 5 -5
30 0 0 0 15 0 0 0
15 0 25 30 0 0 25 30
30 0 0 5 15 0 0 5

This f acisult yoptimal


o f sc i en ce
since no sij is negative, so STOP.
MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm
Using the feasible transportation tableau given by VAM: M3
0
$1

$25
M1 M2 M3 W1

5
$1
$20 $30
W1 30 20 15 10 25 40 $20 $30
M2 M1
W2 15 30 30 25 30 $30
W3
$15
W3 30 15 20 15 15 30
W2
45 30 25
The initial node and initial price is arbitrary, since cij − (ai − t) − (bj + t) = cij − ai − bj .

0 -10 -20 0 + 15 −10 + 15 −20 + 15


30 30 20 10 30 − 15 30 20 10
15 15 30 25 15 − 15 15 30 25
30 30 20 15 30 − 15 30 20 15

Find reduced prices, using sij = cij − ai − bj :

0 -10 -20 15 5 -5
30 0 0 0 15 0 0 0
15 0 25 30 0 0 25 30
30 0 0 5 15 0 0 5

This f acisult yoptimal


o f sc i en ce
since no sij is negative, so STOP.
MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 4 / 17
Transportation Algorithm

Recall ai , bj are just dual variables for the original LP:

m X
X n
(P) min C = cij xij
i=1 j=1
n
X
s. t. xij = si , (i = 1, 2, . . . , m)
j=1
m
X
xij = dj , (j = 1, 2, . . . , n)
i=1
xij > 0, for all i, j

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 5 / 17
Transportation Algorithm

Recall ai , bj are just dual variables for the original LP:

m X
X n
(P) min C = cij xij
i=1 j=1
n
X
s. t. xij = si , (i = 1, 2, . . . , m) (ai )
j=1
m
X
xij = dj , (j = 1, 2, . . . , n) (bj )
i=1
xij > 0, for all i, j

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 5 / 17
Transportation Algorithm

Recall ai , bj are just dual variables for the original LP:

X n
m X m
X n
X
(P) min C = cij xij (D) max P= si ai + dj bj
i=1 j=1 i=1 j=1
n
X s. t. ai + bj ≤ cij for all i, j (xij )
s. t. xij = si , (i = 1, 2, . . . , m) (ai )
ai , bj unrestricted
j=1
m
X
xij = dj , (j = 1, 2, . . . , n) (bj )
i=1
xij > 0, for all i, j

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 5 / 17
The Transportation Algorithm

Definition (Cycle in a Tableau)


A cycle C in a balanced transportation tableau T is a collection of cells of T such that each row
and each column of T contains exactly zero or two cells of C .

Only horizontal and vertical movement is allowed to connect the cells. . .

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 6 / 17
The Transportation Algorithm

The Transportation Algorithm TA


0. Given an initial balanced transportation tableau.
1. Apply VAM to obtain a basic feasible solution and a corresponding basis.
2. Let b1 = 0 (or any number). Determine a1 , a2 , . . . , am and b2 , b3 , . . . , bn such that
ai + bj = cij for all basis cells.
3. For each i, j, replace cell costs cij by reduced costs sij = cij − ai − bj ; the textbook calls sij
the “new cell costs cij ”.)
4. If sij > 0 for all i, j, then replace all cells with their original costs cij ; the current basic
feasible solution is optimal. Otherwise, continue.
5. Choose sij < 0. To break ties use Bland’a anti-cycling rule, choose sij < 0 with smallest i
and with respect to this with the smallest j (the Northwest-most negative cell). Label the
“getter” cell with (+ ). Find the unique cycle C determined by the getter cell and some of
the basis cells. Label cells of C starting from  alternately “getter”(+) and “giver”(−).
Choose the “giver”(−) cell associated with the smallest flow of goods; break ties arbitrarily.
6. Adjust the flows xij : Add the squared cell of Step 5. to the basis, i.e., circle it in a new
tableau. Remove the chosen “giver” from the basis, i.e., do not circle it in a new tableau.
Add the amount of goods of this “giver” to amount of goods of all “getters” in C and
subtract from the amount of goods of all “givers” in C . Go to Step 2.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 7 / 17
Apply TA to the following (balanced) transportation problem

2 1 2 40

9 4 7 60

1 2 9 10

40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.

20 20
2 1 2 40 2 1 2 40
VAM
9 4 7 60 −−→ 9
10
4
50
7 60
10
1 2 9 10 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0
20 20
2 1 2 40 2 1 2 40
VAM
9 4 7 60 −−→ 9
10
4
50
7 60
10
1 2 9 10 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0
20 20
2 1 2 40 2 2 1 2 40
VAM
9 4 7 60 −−→ 9
10
4
50
7 60
10
1 2 9 10 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0
20 20
2 1 2 40 2 2 1 2 40
VAM
9 4 7 60 −−→ 9 9
10
4
50
7 60
10
1 2 9 10 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0
20 20
2 1 2 40 2 2 1 2 40
VAM
9 4 7 60 −−→ 9 9
10
4
50
7 60
10
1 2 9 10 1 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0 −5
20 20
2 1 2 40 2 2 1 2 40
VAM
9 4 7 60 −−→ 9 9
10
4
50
7 60
10
1 2 9 10 1 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0.

0 −5 0
20 20
2 1 2 40 2 2 1 2 40
VAM
9 4 7 60 −−→ 9 9
10
4
50
7 60
10
1 2 9 10 1 1 2 9 10

40 50 20 110 40 50 20 110

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9

10 10
1 2 9 10 1 1 2 9 10 1

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0

10 10
1 2 9 10 1 1 2 9 10 1 0

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0

10 10
1 2 9 10 1 1 2 9 10 1 0

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20 20
2 0 4 0
→ 9 0
10
0
50
-2
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20 20
2 0 4 0
→ 9 0
10
0
50
-2 +
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20 20
2 0 4 0
→ 9 0
10
0
50
-2 +
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20+ 20−
2 0 4 0
→ 9 0
10−
0
50
-2 +
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20+ 20−
2 0 4 0
→ 9 0
10−
0
50
-2 +
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0
20+10 20−10
2 0 4 0
→ 9 0
10−10
0
50
-2 +10
10
1 0 6 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0
20+10 20−10 30 10
2 0 4 0 2 1 2
→ 9 0
10−10
0
50
-2 +10 → 9 4
50
7
10

10
1 0 6 8 1
10
2 9

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0
20+10 20−10 30 10
2 0 4 0 2 2 1 2
→ 9 0
10−10
0
50
-2 +10 → 9 4
50
7
10

10
1 0 6 8 1 1
10
2 9

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0 0
20+10 20−10 30 10
2 0 4 0 2 2 1 2
→ 9 0
10−10
0
50
-2 +10 → 9 4
50
7
10

10
1 0 6 8 1 1
10
2 9

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0 0
20+10 20−10 30 10
2 0 4 0 2 2 1 2
→ 9 0
10−10
0
50
-2 +10 → 7 9 4
50
7
10

10
1 0 6 8 1 1
10
2 9

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0 −3 0
20+10 20−10 30 10
2 0 4 0 2 2 1 2
→ 9 0
10−10
0
50
-2 +10 → 7 9 4
50
7
10

10
1 0 6 8 1 1
10
2 9

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.

0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0 −3 0 0 −3 0

20+10 20−10 30 10 30 10
2 0 4 0 2 2 1 2 2 0 2 0

→ 9 50 10
-2 +10 → 7 → 7
10−10 50 50 10 2 0 0
0 0 9 4 7
10 10
1 0 6 8 1 1
10
2 9 1 0 4 8

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Apply TA to the following (balanced) transportation problem
1. Find a BFS by applying VAM. Costs are cij . Supply/Demands are blue.
2. Compute node values, start with, say, bj = 0. Compute reduced costs sij = cij − ai − bj .
3. Not yet optimal. Select a “getter” cell s23 < 0 to enter basis, and mark it with +.

4. Find the cycle of basic cells containing the getter cell.


5. Mark cells in the cycle alternating as givers (−) and getters (+).
6. The giver with the smallest flow will leave the basis. Adjust the flows.
7. Update node prices and reduced costs. Some of them will change by ±2.
8. All no negative reduced costs. Flow is optimal.
0 −5 0 0 −5 0

20 20 20 20
2 1 2 40 2 2 1 2 40 2 0 4 0
VAM 10 50
9 4 7 60 −−→ 9 9
10
4
50
7 60 → 9 0 0 −2

10 10
1 2 9 10 1 1 2 9 10 1 0 6 8

40 50 20 110 40 50 20 110 Reduced costs sij


0 −5 0 0 −3 0 0 −3 0

20+10 20−10 30 10 30 10
2 0 4 0 2 2 1 2 2 0 2 0

→ 9 50 10
-2 +10 → 7 → 7
10−10 50 50 10 2 0 0
0 0 9 4 7
10 10
1 0 6 8 1 1
10
2 9 1 0 4 8
Optimal Solution
f ac ult y o f sc i en ce MATH 895-4 Fall 2010
d ep ar t m e n t o f m a t hem a t ics Course Schedule 8 / 17
Solve the following BTP

5 12 8 50 26
11 4 10 8 20
14 50 1 9 30
15 20 26 15

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 9 / 17
15 0 11
5 12 8 50 26
20
11 4 10 8 20
26 4
14 50 1 9 30

15 20 26 15

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 10 / 17
5 12 8 50 26

11 4 10 8 20

14 50 1 9 30

15 20 26 15

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 11 / 17
Variations of the Transportation Problem
Negative cost edges

Maximization

Forbidden routes

Unbalanced Transportation

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Variations of the Transportation Problem
Negative cost edges
Add a big constant M, such as M = − mini,j cij , to all the edge costs, so that no cost is
negative. Then solve the new problem. The cost of every solution x = (xij ) is increased by the
same constant
m X
X n m X
X n Xm X n X
C 0 (x) = (cij + M)xij = xij cij + M xij = C (x) + M si .
i=1 j=1 i=1 j=1 i=1 j=1 1≤i≤m

So both problems have the same sets of optimal solutions.

Maximization

Forbidden routes

Unbalanced Transportation

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Variations of the Transportation Problem
Negative cost edges
Add a big constant M, such as M = − mini,j cij , to all the edge costs, so that no cost is
negative. Then solve the new problem. The cost of every solution x = (xij ) is increased by the
same constant
m X
X n m X
X n Xm X n X
C 0 (x) = (cij + M)xij = xij cij + M xij = C (x) + M si .
i=1 j=1 i=1 j=1 i=1 j=1 1≤i≤m

So both problems have the same sets of optimal solutions.

Maximization
Convert to a minimization problem by replacing each cost cij0 = −cij .

Forbidden routes

Unbalanced Transportation

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Variations of the Transportation Problem
Negative cost edges
Add a big constant M, such as M = − mini,j cij , to all the edge costs, so that no cost is
negative. Then solve the new problem. The cost of every solution x = (xij ) is increased by the
same constant
m X
X n m X
X n Xm X n X
C 0 (x) = (cij + M)xij = xij cij + M xij = C (x) + M si .
i=1 j=1 i=1 j=1 i=1 j=1 1≤i≤m

So both problems have the same sets of optimal solutions.

Maximization
Convert to a minimization problem by replacing each cost cij0 = −cij .

Forbidden routes
If the route from Wi to Mj is forbidden, then give that edge a prohibitively high cost cij = ∞ .

Unbalanced Transportation

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Variations of the Transportation Problem
Negative cost edges
Add a big constant M, such as M = − mini,j cij , to all the edge costs, so that no cost is
negative. Then solve the new problem. The cost of every solution x = (xij ) is increased by the
same constant
m X
X n m X
X n Xm X n X
C 0 (x) = (cij + M)xij = xij cij + M xij = C (x) + M si .
i=1 j=1 i=1 j=1 i=1 j=1 1≤i≤m

So both problems have the same sets of optimal solutions.

Maximization
Convert to a minimization problem by replacing each cost cij0 = −cij .

Forbidden routes
If the route from Wi to Mj is forbidden, then give that edge a prohibitively high cost cij = ∞ .

Unbalanced Transportation X X
Case I: If total demand exceeds total supply, si > dj , then add a “dummy”
1≤i≤m 1≤j≤n
warehouse Wm+1 with supply X X
sm+1 = dj − si .
1≤j≤n 1≤i≤m
Assign cost zero to each new edge, cm+1,j = 0 for j = 1, 2, . . . , n. The new problem is balanced.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Variations of the Transportation Problem
Negative cost edges
Add a big constant M, such as M = − mini,j cij , to all the edge costs, so that no cost is
negative. Then solve the new problem. The cost of every solution x = (xij ) is increased by the
same constant
m X
X n m X
X n Xm X n X
C 0 (x) = (cij + M)xij = xij cij + M xij = C (x) + M si .
i=1 j=1 i=1 j=1 i=1 j=1 1≤i≤m

So both problems have the same sets of optimal solutions.

Maximization
Convert to a minimization problem by replacing each cost cij0 = −cij .

Forbidden routes
If the route from Wi to Mj is forbidden, then give that edge a prohibitively high cost cij = ∞ .

Unbalanced Transportation X X
Case II: If total supply exceeds total demand, si > dj , then add a “dummy”
1≤i≤m 1≤j≤n
market Mn+1 with demand X X
dn+1 = si − dj .
1≤i≤m 1≤j≤n
Assign cost zero to each new edge, ci,n+1 = 0 for i = 1, 2, . . . , m. The new problem is balanced.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 12 / 17
Case I: demand exceeds supply

m
X n
X
si < dj
i=1 j=1

Solution: We introduce a fictitious warehouse Wm+1 which supplies the excess demand.
• Set cm+1,j = 0 for all j = 1, 2, . . . , n.
• In reality we may use different costs—loss in sale, alternative supply, . . .
• Interpretation—demand of some markets is not fully satisfied.

2 1 2 40
9 4 7 60
1 2 9 10
50 60 30

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 13 / 17
Case II: supply exceeds demand

m
X n
X
si > dj
i=1 j=1

Solution: We introduce a fictitious market Mn+1 which demands the excess supply.
• Set ci,n+1 = 0 for all i = 1, 2, . . . , m.
• In reality we may use different costs—spoilage costs, storage costs, . . .

2 1 2 50
9 4 7 70
1 2 9 20
40 50 20

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 14 / 17
Transportation Algorithm - Visualization where Costs are Geometric
Distances
Geometric visualization of node prices and reduced costs:
Suppose nodes are points on the plane, and cost cij equals distance between Wi and Mj . Draw
disk of radius ai (bj ) around each node Wi (Mj ). Then the reduced price si = cij − ai − bj is just
the distance between the two disks!
1. Two disks are tangent if sij = 0.
Complementary Slackness: If edge ij is basic, then the disks are tangent.

Wi Mj

Shaded disks have negative radius

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 15 / 17
Transportation Algorithm - Visualization where Costs are Geometric
Distances
Geometric visualization of node prices and reduced costs:
Suppose nodes are points on the plane, and cost cij equals distance between Wi and Mj . Draw
disk of radius ai (bj ) around each node Wi (Mj ). Then the reduced price si = cij − ai − bj is just
the distance between the two disks!
2. Two disks are disjoint if sij > 0.
Complementary Slackness: If two disks do not touch, then xij = 0.

Wi Mj

Shaded disks have negative radius

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 15 / 17
Transportation Algorithm - Visualization where Costs are Geometric
Distances
Geometric visualization of node prices and reduced costs:
Suppose nodes are points on the plane, and cost cij equals distance between Wi and Mj . Draw
disk of radius ai (bj ) around each node Wi (Mj ). Then the reduced price si = cij − ai − bj is just
the distance between the two disks!
3. Two disks overlap if sij < 0.
If a red and green disk overlap, the node prices a1 , a2 , am , b1 , b2 , . . . , bn are not dually
feasible. We should try to pivot the edge into the basis.

Wi Mj

Shaded disks have negative radius

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 15 / 17
Transportation Algorithm - Geometric distances
.
Suppose Warehouses and Markets are points on the plane, and that the cost of shipping equals
the geometric distance in the plane.

Supply Demand
30
W 42
2
17
23 20 0 M
M 2
1
15
40 20
0 0 2

11 23

31 W1
15
10 35

Flow
0 37
5
W
15 3
M 42
3 7
Cost ( = distance )

f ac ult y o f sc i en ce MATH 895-4 Fall 2010 .


d ep ar t m e n t o f m a t hem a t ics Course Schedule 16 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
M1 M2 M3
W1 11 23 15 31 15
Supply Demand
30 W2 23 20 42 40 10 30
W 42
2
17 W3 37 35 2 42 5 7
23 20 0 M
M 2
1
15 20 17 15
40 20
0 0 2

11 23

31 W1
15
10 35

Flow
0 37
5
W
15 3
M 42
3 7
Cost ( = distance )

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , a i , bj
.
5
11 23 15 31
30 23 20 42 40 10
W 42
2
17 37 35 2 42 5
23 20 M
M 2
1
15
40 20
2 To improve the diagram (e.g. negative values)
11 23
we start with b1 = 5 instead of b1 = 0 to com-
31 W1 pute the node prices.
15
10 35

37
5
W
15 3
M 42
3 7

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5
a = 18
2 11 23 15 31
18 23 20 42 40 10
W 42
2
37 35 2 42 5
23 M
M 2
1
40
To improve the diagram (e.g. negative values)
11 23
we start with b1 = 5 instead of b1 = 0 to com-
31 W1 pute the node prices.
35

37
W
3
M 42
3

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 22
11 23 15 31
18 23 20 42 40 10
W 42
2
37 35 2 42 5
23 M
M 2
1
40

11 23

31 W1

35

37
W
3
M 42
3

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 22
11 23 15 31
18 23 20 42 40 10
W 42
2
20 37 35 2 42 5
23 M
M 2
1
40

11 23

31 W1

35

37
W
3
M 42
3

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 15 22
11 23 15 31
18 23 20 42 40 10
W 42
2
20 37 35 2 42 5
23 M
M 2
1
40

11 23

31 W1

35

37
W
3
M 42
3

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W 42
2
20 37 35 2 42 5
23 M
M 2
1
40

11 23

31 W1

35

37
W
3
M 42
3

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W 42 S22
2
20 37 35 2 42 5
23 M
M 2
1
40

23
sij , xij , ai , bj
S11< 0 11
S 31
31 W1
5 15 22
S13 35
8 -2 0 15 1
37
18 0 20 9 0 10
W
3
M
3
42
20 12 0 2 0 5

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
.
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W 42 S22
2
20 37 35 2 42 5
23 M
M 2
1
40

23
sij , xij , ai , bj
S11< 0 11
S 31
31 W1
5 15 22
S13 35
8 -2 + 0 15 1
37
18 0 20 9 0 10
W
3
M
3
42
20 12 0 2 0 5

Goal: Pivot edge (1, 1) into the basis (tree).


.
Mark getter cell (1, 1) with a box.
Which edge will leave the basis?
Flows xij must be adjusted before an edge can
leave.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
20 M
M 2
1
15

2
sij , xij , ai , bj
W1
5 15 22
15
10 8 -2 + 0 15 1
18 0 20 9 0 10
5
W
3
M
3 20 12 0 2 0 5

Find the cycle using the tree and “getter” (1, 1).
.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
20 M
M 2
1
15

2
sij , xij , ai , bj
W1
5 15 22
15
10 8 -2 + 0 15 1
18 0 20 9 0 10
5
W
3
M
3 20 12 0 2 0 5

Primal Adjustment:
.
We will augment flow along the cycle.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
20 M
M 2
1
15

2
sij , xij , ai , bj
W1
5 15 22
15
10 8 -2 + 0 15− 1
18 0 20− 9 0 10+
5
W
3
M
3 20 12 0 2+ 0 5−

Primal Adjustment:
.
We will augment flow along the cycle.
Mark with +/− the effect of flow augmentation.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
20 M
M 2
1
15

2
sij , xij , ai , bj
W1
5 15 22
15
10 8 -2 + 0 15− 1
18 0 20− 9 0 10+
5
W
3
M
3 20 12 0 2+ 0 5−

Primal Adjustment:
.
We will augment flow along the cycle.
Mark with +/− the effect of flow augmentation.
Augment value: min{20, 5, 15} = 5.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
15 M
M 2
1
10

7
5
sij , xij , ai , bj
W1
5 15 22
15 8 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
0
W
3
M
3 20 12 0 2+5 0 5−5

Primal Adjustment:
.
We will augment flow along the cycle.
Mark with +/− the effect of flow augmentation.
Augment value: min{20, 5, 15} = 5.
Adjust flows along cycle xij 7→ xij ± 5.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
15 M
M 2
1
10

7
5
sij , xij , ai , bj
W1
5 15 22
15 8 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20 12 0 2+5 0

Primal Adjustment:
.
We will augment flow along the cycle.
Mark with +/− the effect of flow augmentation.
Augment value: min{20, 5, 15} = 5.
Adjust flows along cycle xij 7→ xij ± 5.
Primal update is complete.
Edge (3, 3) can leave the tree.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8 11 23 15 31
18 23 20 42 40 10
W
2
20 37 35 2 42 5
M
M 2
1

sij , xij , ai , bj
S11< 0

W1
5 15 22
8 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20 12 0 2+5 0

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
Adjust all the disk radii 5 15 22
on this side.
8 11 5 23 10 31
18 23 15 42 40 15
W
2
20 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 15 22
8 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20 12 0 2+5 0

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.
Shrink/grow all disks on one side of the cut:

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2
20 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 15 22
8-2 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20 12 0 2+5 0

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.
Shrink/grow all disks on one side of the cut:
Decrease node price a1 to make (1, 1) tangent.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15+2 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2
20 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 15+2 22
8-2 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20 12 0 2+5 0

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.
Shrink/grow all disks on one side of the cut:
Decrease node price a1 to make (1, 1) tangent.
Increase b2 .

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15+2 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2
20-2 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 15+2 22
8-2 -2 +5 0 15−5 1
18 0 20−5 9 0 10+5
W
3
M
3 20-2 12 0 2+5 0

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.
Shrink/grow all disks on one side of the cut:
Decrease node price a1 to make (1, 1) tangent.
Increase b2 .
Decrease a3 .

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15+2 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2
20-2 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 17 22
6 -2+2 5 0 10 1+2

18 0 15 9-2 0 15
W
3
M
3 18 12+2 0 7 0+2

Dual update:
.
Node price adjustments are needed before (1, 1)
can enter the tree.
Shrink/grow all disks on one side of the cut:
Decrease node price a1 to make (1, 1) tangent.
Increase b2 .
Decrease a3 .
Adjust reduced costs sij .

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15+2 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2
20-2 37 35 7 42
M
M 2
1

sij , xij , ai , bj
W1
5 17 22
6 0 5 0 10 3
18 0 15 7 0 15
W
3
M
3 18 14 0 7 2

Dual update:
Node price adjustments are needed before (1, 1)
.
can enter the tree.
Shrink/grow all disks on one side of the cut:
Decrease node price a1 to make (1, 1) tangent.
Increase b2 .
Decrease a3 .
Adjust reduced costs sij .
Dual update is complete.
f ac ult y o f sc i en ce MATH 895-4 Fall 2010 Edge (1, 1) enters the tree. 17 / 17
d ep ar t m e n t o f m a t hem a t ics Course Schedule
Transportation Algorithm - Geometric distances
cij , xij , ai , bj
5 15+2 22
8-2 11 5 23 10 31
18 23 15 42 40 15
W
2 7 20-2 37 35 7 42
15 M
M 2
1
10

7
5
sij , xij , ai , bj
14
W1
5 17 22
3

5 6 0 5 0 10 3
18 0 15 7 0 15
2
W
3
M
3 18 14 0 7 2

Next iteration:
Every sij is non-negative.
.
Solution is optimal.
Output (xij ), (ai ), (bj ) and STOP.

f ac ult y o f sc i en ce MATH 895-4 Fall 2010


d ep ar t m e n t o f m a t hem a t ics Course Schedule 17 / 17

You might also like