Optimality Test For Transportation Problem: V O Thomas
Optimality Test For Transportation Problem: V O Thomas
V O Thomas
Once the initial basic feasible solution has been computed, the next
step in the TP is to determine whether the solution obtained is
optimum or not. Optimality test can be conducted to any initial basic
feasible solution of a TP provided such allocations has exactly
m + n − 1 non-negative allocations, where m is the number of origins
and n is the number of destinations.
Step 1: Find the initial basic feasible solution of TP using any one of
the three methods.
Step 2: Find out a set of numbers ui and vj for each row and column
satisfying ui + vj = cij for each occupied cell. To start with we assign
a number 0 to any row or column having maximum number of
allocations. If this maximum number of allocation is more than one,
choose any one arbitrarily.
Step 3: For each empty cell, we find the sum ui and vj and write in
the left corner of that cell.
Step 4: Find out for each empty cell the net evaluation value
∆ij = cij − (ui + vj ) and write at the bottom right corner of the cell.
(i) If all ∆ij > 0, the solution is optimum and a unique solution exists.
(ii) If all ∆ij ≥ 0, the solution is optimum, but an alternate solution
exists.
(iii) If at least one ∆ij < 0, the solution is not optimum. In this case
we go to the next step.
Step 5: Select the empty cell having the most negative value of ∆ij .
From this cell we draw a closed path by drawing horizontal and
vertical lines with the corner cells occupied. Assign 0 +0 and 0 −0 signs
alternatively and find the minimum allocation from the cell having
negative sign. This allocation should be added to the allocation
having positive sign and subtracted from the allocation having
negative sign.
Example
1 Solve the following TP.
Destination
Supply
P Q R S
A 21 16 25 13 11
Source
B 17 18 14 23 13
C 32 17 18 41 19
Demand 6 10 12 15 43
Solution:
P P
Since ai = bj the TP is balanced and therefore there exists a
feasible solution. We shall apply VAM.
= 11 × 13 + 6 × 17 + 3 × 14 + 4 × 23 + 10 × 17 + 9 × 18
= Rs 711
u2 + v 1 = c21 ⇒ 0 + v1 = 17 ⇒ v1 = 17
u2 + v 3 = c23 ⇒ 0 + v3 = 14 ⇒ v3 = 14
u2 + v 4 = c24 ⇒ 0 + v4 = 23 ⇒ v4 = 23
u1 + v 4 = c14 ⇒ u1 + 23 = 13 ⇒ u1 = −10
u 3 + v3 = c33 ⇒ u1 + 14 = 18 ⇒ u3 = 4
u3 + v2 = c32 ⇒ 4 + v2 = 17 ⇒ v2 = 13
Now we shall find the sum ui and vj for each empty cell and then find
∆ij = cij − (ui + vj ) and enter at the bottom right corner of that cell.
Since all ∆ij > 0, the solution is optimal and unique. The optimum
solution is given by:
To
Supply
1 2 3
1 2 7 4 5
From2 3 3 1 8
3 5 4 7 7
4 1 6 2 14
Demand 7 9 18 34
P P
Since ai = bj the TP is balanced and therefore there exists a
feasible solution. We shall find the initial feasible solution using VAM.
= 5 × 2 + 2 × 3 + 6 × 1 + 7 × 4 + 2 × 1 + 12 × 2
= 10 + 6 + 6 + 28 + 2 + 24 = 76
u 1 + v1 = c11 ⇒ 0 + v1 = 2 ⇒ v1 = 2
u 4 + v1 = c41 ⇒ u4 + 2 = 1 ⇒ u4 = −1
u4 + v3 = c43 ⇒ −1 + v3 = 2 ⇒ v3 = 3
u2 + v3 = c23 ⇒ u2 + 3 = 1 ⇒ u2 = −2
u2 + v2 = c22 ⇒ −2 + v2 = 3 ⇒ v2 = 5
u3 + v2 = c32 ⇒ u3 + 5 = 4 ⇒ u3 = −1
Now we shall find ∆ij = cij − (ui + vj ) and enter at the bottom left
corner of each empty cell.
Since all ∆ij > 0, the solution is optimal and unique. The optimum
solution is given by:
= 5 × 2 + 2 × 3 + 6 × 1 + 7 × 4 + 2 × 1 + 12 × 2
= Rs 76.
V O Thomas Department of Mathematics, Faculty of Science 17
Optimality Test for transportation problem
1 2 3 4 Supply
1 10 2 20 11 15
2 12 7 9 20 25
3 4 14 16 18 10
Demand 5 15 15 15 50
Solution:
P P
Since ai = bj , the given TP a basic feasible solution.
The solution is
x11 = 5 , x12 = 10 , x22 = 5 , x23 = 15 , x24 = 5 , x34 = 10
The transportation cost is:
= 5 × 10 + 10 × 2 + 5 × 7 + 15 × 9 + 5 × 20 + 10 × 18
= Rs 520.
V O Thomas Department of Mathematics, Faculty of Science 19
Optimality Test for transportation problem
u 1 + v1 = c11 ⇒ 0 + v1 = 10 ⇒ v1 = 10
u1 + v2 = c12 ⇒ 0 + v2 = 2 ⇒ v2 = 2
u2 + v2 = c22 ⇒ u2 + 2 = 7 ⇒ u2 = 5
u2 + v3 = c23 ⇒ 5 + v3 = 9 ⇒ v3 = 4
u2 + v4 = c24 ⇒ 5 + v4 = 20 ⇒ v4 = 15
u3 + v4 = c34 ⇒ 15 + u3 = 18 ⇒ u3 = 3
Now we shall find ∆ij = cij − (ui + vj ) for the unoccupied cell and
enter at the bottom right corner.
The solution obtained by NWCR is not optimal because all ∆ij are
not non-negative.
To find optimum solution, we find the most negative ∆ij . Here it lies
in the cell (3,1). So the new entering variable is x31 . Now we have to
find a leaving variable. Now construct a closed loop that starts and
ends at the entering variable cell (3,1). The loop consists of connected
horizontal and vertical segments only and no diagonals are allowed.
Each corner of the resulting loop, except the entering variable cell,
must coincide with a current basic variable. Exactly one loop exists
for a given entering variable. Next we assign the amount θ to the
entering variable cell (3,1). For the supply and demand limits to
remain satisfied, we must alternate between subtracting and adding
the amount θ at the succesive corners of the loop as shown in figure.
The maximum value of θ is 5. In this case both x11 and x22 reach at
zero level. So we choose x11 or x22 as leaving vector. Let it be x11 .
Now the new table is
u1 + v 2 = c12 ⇒ 0 + v2 = 2 ⇒ v2 = 2
u 2 + v2 = c22 ⇒ u2 + 2 = 7 ⇒ u2 = 5
u2 + v4 = c24 ⇒ 5 + v4 = 20 ⇒ v4 = 15
u3 + v4 = c34 ⇒ u3 + 15 = 18 ⇒ u3 = 3
u3 + v1 = c31 ⇒ 3 + v1 = 4 ⇒ v1 = 1
u2 + v3 = c23 ⇒ 5 + v3 = 9 ⇒ v3 = 4
u1 + v 2 = c12 ⇒ 0 + v 2 = 2 ⇒ v2 = 2
u1 + v 4 = c14 ⇒ 0 + v4 = 11 ⇒ v4 = 11
u2 + v 2 = c22 ⇒ u2 + 2 = 7 ⇒ u2 = 5
u2 + v 3 = c23 ⇒ 5 + v 3 = 9 ⇒ v3 = 4
u3 + v 4 = c34 ⇒ u3 + 11 = 18 ⇒ u3 = 7
u 3 + v1 = c31 ⇒ 7 + v1 = 4 ⇒ v1 = −3
Since all ∆ij > 0, the solution is optimal and unique. The solution is
given by:
0 2 1 6 0 4 2 8
2 1 5 9 2 3 4 5
(i) (ii)
2 4 3 5 1 2 0 6
5 5 10 20 7 6 6 19
Solution
(i).
Transportation cost = 5 × 0 + 1 × 2 + 4 × 1 + 5 × 5 + 5 × 3
= Rs 46
Take u1 = 0 .
u 1 + v1 = 0 ⇒ 0 + v1 = 0 ⇒ v1 = 0
u 1 + v2 = 2 ⇒ 0 + v2 = 2 ⇒ v2 = 2
u 2 + v2 = 1 ⇒ u2 + 2 = 1 ⇒ u2 = −1
u2 + v3 = 5 ⇒ −1 + v3 = 5 ⇒ v3 = 6
u3 + v3 = 3 ⇒ u3 + 6 = 3 ⇒ u3 = −3
∆ij is most negative in the cell (1,3). The closed path starting from
this cell is shown in the above table. We should choose θ such that
1−θ ≥0 , 5−θ ≥0
Take u1 = 0 .
u 1 + v1 = 0 ⇒ 0 + v1 = 0 ⇒ v1 = 0
u 1 + v3 = 2 ⇒ 0 + v3 = 1 ⇒ v3 = 1
u 2 + v3 = 1 ⇒ u2 + 1 = 5 ⇒ u2 = 4
u 2 + v2 = 5 ⇒ 4 + v2 = 1 ⇒ v2 = −3
u 3 + v3 = 3 ⇒ u3 + 1 = 3 ⇒ u3 = 2
∆ij < 0 in the unoccupied cell (2,1). The closed path starting from
this cell (2,1) is shown in the above table. Choose θ such that
5−θ ≥0 , 4−θ ≥0
Take u1 = 0 .
u 1 + v1 = 0 ⇒ 0 + v1 = 0 ⇒ v1 = 0
u 2 + v1 = 2 ⇒ u2 + 0 = 2 ⇒ u2 = 2
u 2 + v2 = 1 ⇒ 2 + v2 = 1 ⇒ u2 = −1
u 1 + v3 = 1 ⇒ 0 + v3 = 1 ⇒ v3 = 1
u 3 + v3 = 3 ⇒ u3 + 1 = 3 ⇒ u3 = 2
Minimum cost = 1 × 0 + 5 × 1 + 4 × 2 + 5 × 1 + 5 × 3
= 0 + 5 + 8 + 5 + 15
= Rs 33
Take u1 = 0 .
u 1 + v1 = 0 ⇒ 0 + v1 = 0 ⇒ v1 = 0
u 1 + v2 = 4 ⇒ 0 + v2 = 4 ⇒ v2 = 4
u 2 + v2 = 3 ⇒ u2 + 4 = 3 ⇒ u2 = −1
u3 + v2 = 2 ⇒ u3 + 4 = 2 ⇒ u3 = −2
u3 + v3 = 0 ⇒ 1 + v3 = 0 ⇒ v3 = −1
Take u1 = 0 .
u 1 + v1 = 0 ⇒ 0 + v1 = 0 ⇒ v1 = 0
u 1 + v2 = 4 ⇒ 0 + v2 = 4 ⇒ v2 = 4
u 2 + v2 = 3 ⇒ u2 + 4 = 3 ⇒ u2 = −1
u3 + v2 = 2 ⇒ u3 + 4 = 2 ⇒ u3 = −2
u3 + v3 = 0 ⇒ −2 + v3 = 0 ⇒ v3 = 2
Minimum cost = (7 + ) × 0 + (1 − ) × 4 + 5 × 3 + × 2 + 6 × 0
= 4 − 4 + 15 + 2
= 19 − 2
= 19 as → 0
V O Thomas Department of Mathematics, Faculty of Science 40
Optimality Test for transportation problem
1 5 3 3 34
3 3 1 2 15
0 2 2 3 12
2 7 2 4 19
21 25 17 17 80
We find u0i s and vj0 s using the occupied cells as follows. Let u1 = 0 .
u 1 + v1 = 1 ⇒ 0 + v1 = 1 ⇒ v1 = 1
u 1 + v3 = 3 ⇒ 0 + v3 = 3 ⇒ v3 = 3
u 4 + v3 = 2 ⇒ u4 + 3 = 3 ⇒ u4 = −1
u4 + v4 = 4 ⇒ −1 + v4 = 4 ⇒ v4 = 5
u2 + v4 = 2 ⇒ u2 + 5 = 2 ⇒ u2 = −3
u2 + v2 = 3 ⇒ −3 + v2 = 3 ⇒ v2 = 6
u3 + v2 = 2 ⇒ u3 + 6 = 2 ⇒ u3 = −4
We have calculated ∆ij for unoccupied cells and put the values in the
corresponding cells
We find u0i s and vj0 s using the occupied cells as follows. Let u1 = 0 .
u 1 + v1 = 1 ⇒ 0 + v1 = 1 ⇒ v1 = 1
u 1 + v3 = 3 ⇒ 0 + v3 = 3 ⇒ v3 = 3
u 1 + v4 = 3 ⇒ 0 + v4 = 3 ⇒ v4 = 3
u 2 + v4 = 2 ⇒ u2 + 3 = 2 ⇒ u2 = −1
u2 + v2 = 3 ⇒ −1 + v2 = 3 ⇒ v2 = 4
u3 + v2 = 2 ⇒ u3 + 4 = 2 ⇒ u3 = −2
u4 + v3 = 2 ⇒ u4 + 3 = 2 ⇒ u4 = −1
We have calculated ∆ij for unoccupied cells and put the values in the
corresponding cells
We find u0i s and vj0 s using the occupied cells as follows. Let u1 = 0 .
u 1 + v1 = 1 ⇒ 0 + v1 = 1 ⇒ v1 = 1
u 1 + v3 = 3 ⇒ 0 + v3 = 3 ⇒ v3 = 3
u 1 + v4 = 3 ⇒ 0 + v4 = 3 ⇒ v4 = 3
u 2 + v3 = 1 ⇒ u2 + 3 = 1 ⇒ u2 = −2
u2 + v2 = 3 ⇒ −2 + v2 = 3 ⇒ v2 = 5
u3 + v2 = 2 ⇒ u3 + 5 = 2 ⇒ u3 = −3
u4 + v3 = 2 ⇒ u4 + 3 = 2 ⇒ u4 = −1
All ∆ij ≥ 0 , optimality has been reached. The optimum solution is:
Minimum cost = 21 × 1 + 9 × 3 + 4 × 3 + 13 × 3 + 2 × 1 + 12 × 2 + 19 × 2
= 21 + 27 + 12 + 39 + 2 + 24 + 38 = 163
Example
A product is produced by four factories F1 , F2 , F3 and F4 . Their unit
production cost are Rs 2, 3, 1 and 5 respectively. Production capacity
of the factories are 50, 70, 30 and 50 units respectively. The product is
supplied to four stores S1 , S2 , S3 and S4 . The requirements of which
are 25, 35, 105 and 20 , respectively. Unit costs of transportation are
given below.
Find the transportation plan such that the total production and
transportation cost is minimum.
S1 S2 S3 S4
F1 2 4 6 11
F2 10 8 7 5
F3 13 3 9 12
F4 4 6 8 3
Solution
We shall form the transportation table which consists of both
production and transportation costs.
S1 S2 S3 S4 Supply
F1 4 6 8 13 50
F2 13 11 10 8 70
F3 14 4 10 13 30
F4 9 11 13 8 50
Demand 25 35 105 20
P P
Here ai = 200 and bj = 185. Hence the given TP is not
balanced. So we have to add a dummy column with zero
transportation cost.We shal find the initial basic feasible solution by
Matrix minima method.
Transportation cost
= 25 × 4 + 5 × 6 + 20 × 8 + 50 × 10 + 20 × 8 + 30 × 4 + 35 × 13 + 15 × 0
= Rs 1525
20 − θ ≥ 0 35 − θ ≥ 0
An optimum solution is
Optimum cost
= 25 × 4 + 5 × 6 + 20 × 8 + 70 × 10 + 30 × 4 + 15 × 13 + 20 × 8 + 15 × 0
= 100+30+160+700+120+195+160+0
= Rs 1465
Degeneracy in TP
Degeneracy occurs when basic variables take zero values. We allocate
a quantity > 0( very small ) instead of zero to the basic variable in
the balanced TP. We shall discuss the method through an example.
Example
Obtain the optimal solution to the TP using NWCR to find the IBFS.
D1 D2 D3 D4 ai
O1 2 5 4 7 4
O2 6 1 2 5 6
O3 4 5 2 4 8
bj 3 7 6 2
Solution
We shall find IBFS by NWCR as follows
Here we can put 0 in cell (3,2) or (2,3), but we put it in cell (2,3)
having least cost. Hence the degenerate BFS is
Transportation cost= 3 × 2 + 1 × 5 + 6 × 1 + 0 × 2 + 6 × 2 + 2 × 4
= 6 + 5 + 6 + 0 + 12 + 8
= 37
Optimality Test
We calculate ui , vj for the occupied cells and ∆ij for unoccupied cells
and write as shown below
1−θ ≥0 , −θ ≥0
Since all ∆ij > 0, the solution is optimum. The optimum solution is
given by:
= 3 × 2 + (1 − ) × 5 + × 4 + (6 + ) × 1 + 6 × 2 + 2 × 4
= 6 + 5 − 5 + 4 + 6 + 6 + 12 + 8
= 37 + 5
Now making → 0 we get
Maximization of TP
We have solved minimization problem for TP using different
techniques. But maximization problem can also be solved using the
techniques we adopted. We shall explain it through the following
example.
Example
Four products are produced in three machines and their profit
margins are given by the table below:
P1 P2 P3 P4 Capacity
M1 6 4 1 5 14
M2 8 9 2 7 18
M3 4 3 6 2 7
Requirements 6 10 15 8
(b) How can you identify an alternative optimum solution? Can you
find a similar situation in the problem?
Solution
We use M ax Z = −M in (−Z). Hence we change the sign of each
element of the profit matrix.
Let us obtain the IBFS by matrix minima method.
All ∆ij > 0. Hence the solution is optimum. The optimum allocation
is
x13 = 8 , x14 = 6 , x21 = 6 , x22 = 10 , x24 = 2 , x33 = 7
M in(−Z) = (−1)(8)+(−5)(6)+(−8)(6)+(−9)(10)1+(−7)(2)+(−6)(7)
= −232
M ax Z = −M in(−Z) = 232 units (max profit).
6−θ ≥0 , 6−θ ≥0
∴θ=6
Max profit
= −{(6)(−6) + (8)(−1) + (0)(−8) + (10)(−9) + (8)(−9) + (7)(−6)}
= 232 units
Assignment
Solve the sollowing TP using VAM to determine the IBFS and the
find an optimum solution using MODI method.
D1 D2 D3 D4 ai D1 D2 D3 D4 ai
O1 1 2 3 4 6 O1 5 8 3 6 30
O2 4 3 2 0 8 O2 4 5 7 4 50
O3 0 2 2 1 10 O3 6 2 4 5 40
bj 4 6 8 6 24 bj 30 20 40 30 120
Solve the following TP for initial basic feasible solution using matrix
minima method and then find an optimum solution .
D1 D2 D3 D4
O1 4 6 2 3 12
O2 8 2 3 4 10
O3 5 7 6 5 8
9 8 6 5
Solve the balanced TP for optimal solution . Find the IBFS using
VAM.
D1 D2 D3 D4 ai D1 D2 D3 D4 ai
O1 15 20 13 21 15 O1 21 13 17 24 11
O2 22 15 19 14 12 O2 19 15 13 17 15
O3 16 12 14 31 13 O3 23 11 22 20 18
O4 24 23 15 30 20 O4 16 18 21 14 11
bj 16 10 10 24 bj 13 17 11 14
D1 D2 D3 D4 ai D1 D2 D3 D4 D5 ai
O1 2 3 11 7 6 O1 3 5 6 9 7 9
O2 1 0 6 1 1 O2 5 2 4 3 6 6
O3 5 8 15 9 10 O3 4 1 3 2 5 10
bj 7 5 3 2 bj 2 5 6 7 5