0% found this document useful (0 votes)
27 views166 pages

Chap 2 Transportation Problem

Uploaded by

s1062230092
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)
27 views166 pages

Chap 2 Transportation Problem

Uploaded by

s1062230092
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
You are on page 1/ 166

Mathematical foundation for Computer Science -

Operation Research

Transportation problem

By . Rupali Jadhav,TIMSCDR, Mumbai


CHAPTER 2
TRANSPORTATION PROBLEM

INTRODUCTION TO TRANSPORTATION
PROBLEM
 The Transportation problem is to transport various quantities of a single

homogeneous commodity that are initially stored at various origins, to different

destinations in such a way that the total transportation cost is a minimum.

 It can also be defined as to ship goods from various origins to various destinations

in such a manner that the transportation cost is a minimum.

 The availability as well as the requirements is finite.


Basic Definitions
 Feasible Solution : A set of non-negative individual allocations (xij ≥ 0) which

simultaneously removes deficiencies is called as feasible solution.

 Basic Feasible Solution : A feasible solution to ‘m’ origin, ‘n’ destination problem is said

to be basic if the number of positive allocations are

m+n-1.If the number of allocations are less than m+n-1 then it is called as Degenerate

Basic Feasible Solution. Otherwise it is called as Non-Degenerate Basic Feasible

Solution.

 Optimum Solution : A feasible solution is said to be optimal if it minimizes the total

transportation cost.
Methods for Initial Basic Feasible
Solution
 Methods to obtain the initial basic feasible solution are

1. North-West Corner Rule

2. Least Cost Method (Matrix Minima Method)

3. Vogel’s Approximation Method (Unit Cost Penalty Method)


North-West Corner Method

1. Check the problem is balanced or not .

 Balance problem : Problem is balanced when sum of cost of demand & capacity

is equal.

 Unbalance problem : If sum of cost of demand & capacity is not equal.

Make unbalanced problem to balance by adding dummy row or column

with values to cell as zero and cost is differing value.

2. Start with north – west cell i.e. upper left corner . Compare demand &

capacity amount . Assign amount to cell which ever is low


3. Subtract cost from corresponding demand or capacity

4. Delete row or column which fulfilling demand or capacity condition

5. Repeat step 2 to 4 until all demand gets fulfill


Find initial feasible solution using N- W
method
W1 W2 W3 W4 Capacity

F1 19 30 50 10 7

F2 70 30 40 60 9

F3 40 80 70 20 18

Demand 5 8 7 14
initial feasible solution using N- W
method
W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9 3
X 6 3 X
F3 40 80 70 20 18 14
X X 4 14
Demand 5 8 6 7 4 14 34
34
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5
F2 70 30 40 60 9
X
F3 40 80 70 20 18
X
Demand 5 8 7 14
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9
X
F3 40 80 70 20 18
X
Demand 5 8 7 14
6
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9 3
X 6
F3 40 80 70 20 18
X X
Demand 5 8 7 14
6
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9 3
X 6 3 X
F3 40 80 70 20 18
X X
Demand 5 8 7 14
B 4
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9 3
X 6 3 X
F3 40 80 70 20 18 14
X X 4
Demand 5 8 7 14
B 4
Find initial feasible solution using N- W
method

W1 W2 W3 W4 Capacity

F1 19 30 50 10 7 2
5 2 X X
F2 70 30 40 60 9 3
X 6 3 X
F3 40 80 70 20 18 14
X X 4 14
Demand 5 8 7 14
B 4
 Transportation cost =
=19 x 5 + 2 x 30 + 6 x30 + 3 x40 +4 x 70 + 14 x
20
=95+ 60 + 180+120+280+280
= 1015 Rs.
Example 2
W1 W2 W3 W4 Capacity

F1 2 3 11 7 6

F2 1 0 6 1 1

F3 5 8 15 9 10

Demand 7 5 3 2 17
17
Example 2 solution
W1 W2 W3 W4 Capacity

F1 2 3 11 7 6
6 X X X
F2 1 0 6 1 1
1 X X X
F3 5 8 15 9 10 5 2
X 5 3 2
Demand 7 5 3 2 17
1 17

TC=12+1+40+45+18= 116
Example 3
W1 W2 W3 W4 Capacity

A 6 4 1 5 14

B 8 9 2 7 16

C 4 3 6 2 5

Demand 6 10 15 4 35
35
Example 3
W1 W2 W3 W4 Capacity

A 6 4 1 5 14
6 8 X X 8
B 8 9 2 7 16 14
X 2 14 X
C 4 3 6 2 5 4
X X 1 4
Demand 6 10 2 15 1 4 35
35

TC= 36+32+18+28+6+8=128
Example 4

I II III IV Capacity

A 13 11 15 20 2000

B 17 14 12 13 6000

C 18 18 15 12 7000

Demand 3000 3000 4000 5000 15000


15000
S0LUTION
I II III IV Capacity

A 13 11 15 20 2000
2000 X X X
B 17 14 12
6000 13
1000 3000 2000 X 5000
2000
C 18 18 15 12 7000
X X 2000 5000 5000
Demand 3000 3000 4000 5000 15000
1000 2000 15000

TC= 26000+17000+42000+24000+30000+60000=199000
Example 5
I II III IV V VI Capacity

A 9 12 9 8 4 3 5

B 7 3 6 8 9 4 8

C 4 5 6 8 10 14 6

D 7 3 5 7 10 9 7

E 2 3 8 10 2 4 3

Demand 3 4 5 7 6 4 29
29
Example 6

W1 W2 W3 Capacity

A 40 70 90 300

B 12 80 30 400

C 60 90 45 300

Demand 300 300 300 1000


900

PROBLEM IS NOT BALANCED ADD DUMMY COLUMN WITH DEMOND 100


Solution
As ∑ capacity ≠ ∑ demand
. Add dummy column with 100 demand and zero cell value
W1 W2 W3 W4 Capacity

A 40 70 90 0 300

B 12 80 30 0 400

C 60 90 45 0 300

Demand 300 300 300 100 1000


1000

PROBLEM IS NOT BALANCED ADD DUMMY COLUMN WITH DEMOND 100


Solution
W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 x x x
B 12 80 30 0 400
x 300 100 x 100
C 60 90 45 0 300
x x 200 100 100
Demand 300 300 300 100 1000
200 1000

TC= 12000+24000+3000+9000+0=48000
solution

W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 X X X
B 12 80 30 0 400
X
C 60 90 45 0 300
X
Demand 300 300 300 100
W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 X X X
B 12 80 30 0 400
X 300 100
C 60 90 45 0 300
X X
Demand 300 300 300 100
W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 X X X
B 12 80 30 0 400
X 300 100 X 100
C 60 90 45 0 300
X X
Demand 300 300 300 100
200
W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 X X X
B 12 80 30 0 400
X 300 100 X 100
C 60 90 45 0 300
X X 200 100
Demand 300 300 300 100
200
W1 W2 W3 W4 Capacity

A 40 70 90 0 300
300 X X X
B 12 80 30 0 400
X 300 100 X 100
C 60 90 45 0 300
X X 200 100 100
Demand 300 300 300 100
200
 Transportation cost =
=40 x 300 + 80 x 300 + 30 x 100 +45 x 200 + 0 x 100
= 12000+24000+3000+9000+0
=48000
Example 7

W1 W2 W3 Capacity

A 50 30 220 1

B 90 45 170 4

C 250 200 50 4

Demand 4 2 1 9
7
Example 7

W1 W2 W3 W4 Capacity

A 50 30 220 0 1

B 90 45 170 0 4

C 250 200 50 0 4

Demand 4 2 1 2 9
9
Solution As ∑ capacity ≠ ∑ demand
. Add dummy column with 2 demand and zero cell value

W1 W2 W3 W4 Capacity

A 50 30 220 0 1
1 x x X
B 90 45 170 0 4
3 1 x x 1
C 250 200 50 0 4
x 1 1 2 3 2
Demand 4 2 1 2
3 1
TC= 50+270+45+200+50+0= 615
Example 8

W1 W2 W3 W4 Capacity

A 6 3 5 4 22

B 5 9 2 7 15

C 5 7 8 6 8

45
Demand 7 12 17 9 45
Matrix minima method ( least cost
method)
1. Select cell having least cost in table

2. Allocate maximum possible unit to it

3. Subtract number from corresponding demand or supply

4. Delete row or column fulfilling demand or supply condition or both

5. Repeat steps 1 to 4 for the resulting reduced table until all the

requirements are satisfied.

 Whenever the minimum cost is not unique, make an arbitrary choice

among the minima.


Example on least cost method
A B C D Supply

I 19 30 50 10 7

II 70 30 40 60 9

III 40 8 70 20 18

Demand 5 8 7 14
Solution: least cost method
A B C D Supply

I 19 30 50 10 7

II 70 30 40 60 9

III 40 8 70 20 18

Demand 5 8 7 14 34
Balance
problem
Example on least cost method
A B C D Supply

I 19 30 50 10 7
x x x 7
II 70 30 40 60 9 2
2 x 7 x
III 40 8 70 20 18 10 3
3 8 x 7
Demand 5 8 7 14 34
Balance
2 7
problem
A B C D Supply

I 19 30 50 10 7
X
II 70 30 40 60 9
X
III 40 8 70 20 18 10
8
Demand 5 8 7 14 34
34
A B C D Supply

I 19 30 50 10 7
X
II 70 30 40 60 9
X
III 40 8 70 20 18 10
8
Demand 5 8 7 14
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 9
X
III 40 8 70 20 18 10
8
Demand 5 8 7 14 34
7 34
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 9
X
III 40 8 70 20 18 10
8
Demand 5 8 7 14 34
7 34
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 9
X X
III 40 8 70 20 18 10 3
8 7
Demand 5 8 7 14 34
7 34
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 9
X X
III 40 8 70 20 18 10 3
8 7
Demand 5 8 7 14
7
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 92
X 7 X
III 40 8 70 20 18 10 3
8 X 7
Demand 5 8 7 14 34
7 34
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 92
X 7 X
III 40 8 70 20 18 10 3
8 X 7
Demand 5 8 7 14
7
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 92
X 7 X
III 40 8 70 20 18 10 3
3 8 X 7
Deman 5 8 7 14
d 2 7
A B C D Supply

I 19 30 50 10 7
X X X 7
II 70 30 40 60 92
2 X 7 X
III 40 8 70 20 18 10 3
3 8 X 7
Deman 5 8 7 14
d 2 7
 Transportation cost =
= 10 x 7 + 70 x 2 + 7 x 40 +3 x 40 + 8 x 8 + 20 x 7
= 814
Example 2
A B C D Supply

I 2 3 11 7 6

II 1 0 6 1 1

III 5 8 15 9 10

Demand 7 5 3 2
Example 2
A B C D Supply

I 2 3 11 7 6

II 1 0 6 1 1

III 5 8 15 9 10

Demand 17
7 5 3 2 17
Solution: problem is balanced
A B C D Supply

I 2 3 11 7 6
6 x x x
II 1 0 6 1 1
x 1 x x
III 5 8 15 9 10 9 5
1 4 3 2 3
Demand 17
71 5 4 3 2 17
TC= 12+0+5+32+45+18=112
Example 3
A B C D Supply

I 1 2 3 4 6

II 4 3 2 0 8

III 0 2 2 1 10

Demand 24
4 6 8 6 24
Solution: problem is balanced
A B C D Supply

I 1 2 3 4 6
x 6 x x
II 4 3 2 0 8 2
x x 2 6
III 0 2 2 1 10 6
4 x 6 x
Demand 4 6 8 6 6 24
24
TC= 12+4+0+0+12= 28
Example 4
A B C D Supply

I 1 5 3 3 34

II 3 3 1 2 15

III 0 2 2 3 12

IV 2 7 2 4 15

Demand 21 25 17 17 76
80
Solution 4
A B C D Supply

I 1 5 3 3 34
II 3 3 1 2 15
III 0 2 2 3 12
IV 2 7 2 4 15
V 0 0 0 0 4
Demand 21 25 17 17 80
Solution : as problem is unbalanced so
add dummy row with supply 4 .
A B C D Supply

I 1 5 3 3 34 29 12
5 12 X 17
II 3 3 1 2 15
X X 15 X
III 0 2 2 3 12
12 X X X
IV 2 7 2 4 15 13
X 13 2 X
V 0 0 0 0 4
4 X X X
Demand 21 9 5 25 13 17 2 17 80
80

TC= 5+60+51+15+0+91+4+0= 226


Example 4

Find initial feasible


solution for following A B C D Supply

transportation
I 1 5 3 3 34
problem by least cost
II 3 3 1 2 15
method and N-W
method State which III 0 2 2 3 12

method is better. Demand 21 25 17 17


∑ SUPPLY≠ ∑ DEMAND
so it is unbalanced
A B C D Suppl A B C D Supp
y ly

I 1 5 3 3 34 I 1 5 3 3 34
II 3 3 1 2 15 II 3 3 1 2 15
III 0 2 2 3 12 III 0 2 2 3 12
Deman 61 IV 0 0 0 0 19
d 21 25 17 17 80
Dema 80
nd 21 25 17 17 80
Least cost
method NW method

A B C D Supply A B C D Supply

I 1 53 34 323
x 15 2 17 15 I 1 5 3 3 34
II 3 3 1 2 15 21 13 x x 13
II 3 3 1 2 15
x x 15 x
x 12 3 x 3
III 0 2 2 3 12 III 0 2 2 3 12
12 X x x x x 12 x
IV 0 0 0 0 19 10 IV 0 0 0 0 19
9 10 x x x x 2 17 17
Demand 80 Demand 80
21 25 17 17 80
21 25 17 17 80
12 14
9 15 2
2

TC using LCM: TC using NW M:


75+6+51+15+0+0+0=147 21+65+36+3+24+0+0=149
Transportation cost by least cost method is 147 and N-
W method is 149 . Therefore least cost method is
better as it has less transportation cost against north
west method .
Vogel’s approximation method (VAM)

 Step 1:

 For each row of the table, identify the smallest and the next to smallest

cost. Determine the difference between them for each row. These are

called penalties. Put them aside against the respective rows. Similarly

compute penalties for each column.


 Step 2

 Identify the row or column with the largest penalty.

If a tie occurs in row then proceed from top to bottom.

If a tie occurs in column then proceed from left to right.

 Select cell with least cost in the selected row or column

 Allocate maximum possible unit to it .

 Subtract units from corresponding demand or supply

 So either demand is satisfied or capacity is exhausted or both .


 Step 3
 Again compute the row and column penalties for the reduced table and

then go to step 1.

Repeat the procedure until all the requirements are satisfied.


Solve using VAM

A B C D Supply

I 19 30 50 10 7

II 70 30 40 60 9

III 40 8 70 20 18

Demand 5 8 7 14 34
As the problem is balanced
A B C D Supply

I 19 30 50 10 7
II 70 30 40 60 9
III 40 8 70 20 18
Demand 5 8 7 14 34

Determine the difference for each


row
A B C D Supply

I 19 30 50 10 7
9
II 70 30 40 60 9
10
III 40 8 70 20 18 12
Demand 5 8 7 14 34

Determine the difference for each


COLUMN
A B C D Supply

I 19 30 50 10 7
9
II 70 30 40 60 9
10
III 40 8 70 20 18 12
Demand 5 8 7 14 34

21 22 10 10
A B C D Supply

I 19 30 50 10 7 9
X
II 70 30 40 60 9
X
10
III 40 8 70 20 18 10
8 12
Demand 5 8 7 14 34

21 22 10 10
A B C D Supply

I 19 30 50 10 7 9 9
X
II 70 30 40 60 9
X
10 20
III 40 8 70 20 18 10
8 12 20
Demand 5 8 7 14 34

21 22 10 10
A B C D Supply

I 19 30 50 10 7 9 9
X
II 70 30 40 60 9
X
10 20
III 40 8 70 20 18 10
8 12 20
Demand 5 8 7 14 34

21 22 10 10
21 - 10 10
A B C D Supply

I 19 30 50 10 7 2 9 9
5 X
II 70 30 40 60 9
X X
10 20
III 40 8 70 20 18 10
X 8 12 20
Demand 5 8 7 14 34

21 22 10 10
21 - 10 10
A B C D Supply

I 19 30 50 10 7 2 9 9 40
5 X
II 70 30 40 60 9
X X
10 20 20
III 40 8 70 20 18 10
X 8 12 20 50
Demand 5 8 7 14 34

21 22 10 10
21 - 10 10
A B C D Supply

I 19 30 50 10 7 2 9 9 40
5 X
II 70 30 40 60 9
X X
10 20 20
III 40 8 70 20 18 10
X 8 12 20 50
Demand 5 8 7 14 34

21 22 10 10
21 - 10 10
- - 10 10
A B C D Supply

I 19 30 50 10 7 2 9 9 40
5 X
II 70 30 40 60 9
X X
10 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34

21 22 10 10
21 - 10 10
- - 10 10
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X
II 70 30 40 60 9
X X
10 20 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34

21 22 10 10
21 10 10
10 10
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X
II 70 30 40 60 9
X X
10 20 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34

21 22 10 10
21 10 10
10 10
10 50
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X X 2
II 70 30 40 60 9
X X
10 20 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34
2
21 22 10 10
21 10 10
10 10
10 50
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X X 2
II 70 30 40 60 9
X X
10 20 20 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34
2
21 22 10 10
21 10 10
10 10
10 50
40 60
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X X 2
II 70 30 40 60 9 7
X X 2
10 20 20 20 20
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34
2

21 22 10 10
21 10 10
10 10
10 50
40 60
A B C D Supply

I 19 30 50 10 7 2 9 9 40 40
5 X X 2
II 70 30 40 60 9 7
X X 7 2
10 20 20 20 20 40
III 40 8 70 20 18 10
X 8 X 10 12 20 50
Demand 5 8 7 14 4 34
2
21 22 10 10
21 10 10
10 10
10 50
40 60
40
 Transportation cost =
5 x 19 +2 x 10 + 7 x 40 + 2 x 60 + 8 x 8 + 10 x 20
= 95 + 20 +280 +120 + 64 +200
= 779
EXAMPLE 2
D1 D2 D3 Supply

O1 13 15 16 17

O2 7 11 2 12

O3 19 20 9 16

Demand 14 8 23 45
Solution
D1 D2 D3 Suppl
y

O1 13 15 16 17
O2 7 11 2 12
O3 19 20 9 16
Demand 14 8 23

TC= 117+120+35+14+144=430
Solution
D1 D2 D3 Suppl
y

O1 13 15 16 17 2 2 2 2 13
9 8 x 9
O2 7 11 2 12 5 5 4
5 X 7 5
O3 19 20 9 16 10 - -
x x 16
Demand
14 8 23
9 7
6 4 7 TC= 117+120+35+14+144=430

6 4 14
6 4 -
13 15
13
Example 3
I II III Supply

A 50 30 200 1

B 90 45 170 3

C 250 200 50 4

Demand 4 2 2 8
Solution
I II III Supply

A 50 30 200 1
B 90 45 170 3
C 250 200 50 4
Demand 4 2 2
Solution
I II III Supp
ly
A 50 30 200 1 20 20 50 50
1 x x
B 90 45 170 3 45 45 90
3 x x
C 250 200 50 4 150 50
x 2 2 2
Deman 4 2 2 8
d 1
40 15 120
40 15 TC= 50+270+400+100=820
40
50
Example 4
I II III IV Supply

A 11 13 17 14 250

B 16 18 14 10 300

C 21 24 13 10 100

Demand 650
200 225 275 250 950
Its unbalanced make it bal by adding dummy row with value 300
I II III IV Supply

A
11 13 17 14 250

B
16 18 14 10 300

C
21 24 13 10 100

D 0 0 0 0 300

Demand
200 225 275 250
Its unbalanced make it bal by adding dummy row with value 300
I II III IV Supply

A 250
11 13 17 14 2 3 3 3 17 - -
50
200 X 50 X
B 300 50
16 18 14 10 4 4 4 4 14 14 -
X X 50 250
C 100
21 24 13 10 3 3 3 3 13 13 13
X X 100 X
D 0 0 0 0 300 0 0 -- -- -- -- -
75
X 225 75 X
Demand 200 225 275 250
200 TC = 2200+850+700+2500+1300+0= 7550
150
100
11 13 13 10
11 - 13 10
5 -- 1 0
-- -- 1 0
-- -- 1 --
- - 1 -

- - 13 -
Example 5
I II III IV Supply

A 2 3 11 7 6

B 1 0 6 1 1

C 5 8 15 9 10

Demand 17
5 5 3 2
15
Its unbalanced make it bal by adding dummy row with value 300
I II III IV V Supply
A 2 3 11 7 0 6
B 1 0 6 1 0 1
C 5 8 15 9 0 10
Demand

5 5 3 2 2
Its unbalanced make it bal by adding dummy row with value 300
I II III IV V Supply
2 2 2 5 - - -
A 2 3 11 7 0 6 1
1 5 X X X
0 -- - - - - -
B 1 0 6 1 0 1
X X X 1 X
5 5 5 4 4 4 5
C 5 8 15 9 0 10 8 5
4 X 3 1 2 4
Demand 5 5 3 2 2
4 1
1 3 5 6 0

3 5 4 2 0
TC= 2+15+1+20+45+9+0= 92
3 - 4 2 0
3 - 4 2 -
5 - 15 9 -
5 - - 9 -
5 - - - -
Maximization problem

 If the problem is for maximization then subtract every element

from maximum element so that problem is converted into

minimization problem . Then Solve the problem for

minimization.
Example 1
 Solve transportation problem for maximum profit?

A B C D Supply

X 12 18 6 25 200

Y 8 7 10 18 500

Z 14 3 11 20 300

Demand 180 320 100 400


solution: maximum element is 25 subtract every element from 25

A B C D Supply A B C D Supply

X 12 18 6 25 200 X 13 7 19 0 200

Y 8 7 10 18 500 Y 17 18 15 7 500

Z 14 3 11 20 300 Z 11 22 14 5 300

Demand Demand 180 320 100 400 1000


180 320 100 400

Step 1: convert problem into minimization


Step2 : check problem is balanced
A B C D Supply

X 13 7 19 0 200
Y 17 18 15 7 500
Z 11 22 14 5 300

Deman 180 320 100 400


d
Take original values
TC=
A B C D Supply

X 13 7 19 0 200 0 - - -
x 200 x x
Y 17 18 15 7 500 7 7 2 3 18 18
x 100 x 400 100
Z 11 22 14 5 300 5 5 3 8 22
180 20 100 x 120
20
Deman 180 320 100 400
d 120
100 Take original values
2 11 1 5 TC= 18*200 + 7 * 100 + 18*400+14*180+3*20+11*100
= 3600+700+7200+2520+60+1100=15180
6 4 1 2
6 4 1 -
4 1
4
18
example 2

A B C D Supply

X 13 7 19 0 200

Y 17 18 15 7 500

Z 11 22 14 5 300

Demand 180 320 100 400


Mathematical foundation for Computer Science -
Operation Research

Optimization method :
Modified distributed method ( U-V method)

By . Rupali Jadhav,TIMSCDR, Mumbai


Modified distributed method ( U-V
method)
1. Start with basic feasible solution consisting of m+n-1 allocation in independent

position.

(where m = no of rows and n=number of columns)

2. Determine number Ui (i=1,2 … m) & Vj (j=1,2,…n) corresponding to rows &

columns such that Cij = Ui + Vj for all occupied cell

3. Calculate cell evaluation dij for empty cell dij = Cij –(Ui+ Vj)
Modified distributed method ( U-V method)

4. Examine negative entries and find most negative cell ( i.e. smallest value) for e.g.
-10 & -15 select -15 for further modification

5. Draw closed path assign alternate + & - sign starting from empty cell

6. Find amount of quantity to be shift .

take all negative values along closed path & select maximum value

7. Repeat thru step 2 until all dij are positive


Modified distributed method ( U-V method)

 Optimal solution:

if dij = Cij –(Ui+ Vj) for all cell is positive

 Alternate optimal solution:

if dij = Cij –(Ui+ Vj) >=0

 Solution under test is not optimal ,if any dij is negative then
further improvement is required by repeating above
procedure
EXAMPLE
Find initial solution using VAM method then find optimum solution

D1 D2 D3 Supply

O1 2 7 4 5

O2 3 3 7 8

O3 5 4 1 7

o4 1 6 2 14

Demand 7 9 18
Solution: IFS using Least cost method

D1 D2 D3 Supply

O1 2 7 4 5
5 x x
O2 3 3 7 8 Transportation cost = 71
x 8 x
O3 5 4 1 7 No of stone cells= 6
x x 7 m+n-1= 4+3-1= 6
o4 1 6 2 14
2 1 11 No of stone cell= m+n-1
Demand 7 9 18
No degeneracy
Empty cell Dij= Cij –(Ui + Vj)
12 7-(u1+v2) 7-(0+7)=0
13 4-(u1+v3) 4-(0+3)=1
21 3-(u2+v1) 3-(-4+2)=5
23 7-(u2+v3) 7-(-4+3)=8
31 5-(u3+v1) 5-(-2+2)=5
32 4-(u3+v2) 4-(-2+7)=-1
D1 D2 D3 Supply

O1 2 7 4 5
5 x x
Modify cell O3D2
O2 3 3 7 8 Draw closed path
x 8 x for it so that all
O3 5 4 1 7 corner of closed
x x 7 path are on
occupied cell
o4 1 6 2 14
2 1 11
Demand 7 9 18
D1 D2 D3 Supply

O1 2 7 4 5
5 x x
Assign alternate +
O2 3 3 7 8 & - sign starting
x 8 x from water cell
O3 5 4 1 7
x X 7
o4 1 6 2 14
2 1 11
Demand 7 9 18
D1 D2 D3 Supply

O1 2 7 4 5
5 x x Take MAX VALUE
FROM negative
O2 3 3 7 8 value ON closed
x 8 x path i.e. -1 & -7
O3 5 4 1 7
x x + 7 - Cost to be shift is 1
o4 1 6 2 14
2 1 - 11 +
Demand 7 9 18
D1 D2 D3 Supply

O1 2 7 4 5
5 x x D1 D2 D3 Supply
O2 3 3 7 8
x 8 x O1 2 7 4 5
O3 5 4 1 7
x+
5 x x

o4
x
1 6
-
7
2 14
O2 3 3 7 8
x 8 x
2 1 11 +
Demand 7 9
- 18 O3 5 4 1 7
x 1 6
o4 1 6 2 14
2 x 12
Demand 7 9 18
D1 D2 D3 Supply

O1 2 7 4 5 No of stone cells= 6
5 x x
O2 3 3 7 8 m+n-1= 4+3-1= 6
x 8 x No of stone cell= m+n-1
O3 5 4 1 7
x 1 6 No degeneracy
o4 1 6 2 14
2 x 12
Demand 7 9 18
D1 D2 D3 Supply

O1 2 7 4 5
5 x x
O2 3 3 7 8
x 8 x
O3 5 4 1 7
x 1 6
o4 1 6 2 14
2 x 12
Demand 7 9 18
Occupied cell Cij = Ui + Vj Ui Vj

O1D1 2=U1+V1 U1=0 V1=2


O2D2 3=U2+V2 U2=-3
O3D2 4=U3+V2 V2=6
O3D3 1=U3+V3 U3=-2
O4D1 1=U4+V1 U4=-1
O4D3 2=U4+V3 V3=3
D1 D2 D3 Supply

O1 2 7 4 5 Ui Vj
5 x x U1=0 V1=2
O2 3 3 7 8
U2=-3 V2=6
x 8 x
O3 5 4 1 7 U3=-2 V3=3
x 1 6 U4=-1
o4 1 6 2 14
2 x 12
Demand 7 9 18

Empty cell Dij= Cij –(Ui + Vj) NET COST


CHANGE (NCC)
O1D2 7-(u1+v2) 7-(0+6)=1
O1D3 4-(u1+v3) 4-(0+3)=1

All dij are positive O2D1 3-(u2+v1) 3-(-3+2)=4


so we get optimal solution O2D3 7-(u2+v3) 7-(-3+3)=7
O3D1 5-(u3+v1) 5-(-2+2)=5
O4D2 6-(u4+v2) 6-(-1+6)=1
TC= 5x 2 + 8 x 3 + 1 x 4 + 6 x 1 + 2 x 1 + 12 x 2
= 10 + 24 + 4 +6 + 2 +24
=70

Optimal solution is ,
X11 = 5 , X22 = 8 , X32= 1
X33 =6 , X41 = 2 ,X43 =12
Example 2
 Find optimum solution of transportation problem from following
initial basic feasible solution . Use MODI method

I II III IV SUPPLY

1 2 3 11 7 6
1 5 X X
2 1 0 6 1 1
X X X 1
3 5 8 15 9 10
6 X 3 1
Demand 7 5 3 2
Solution

I II III IV SUPPLY

1 2 3 11 7 6
1 5 X X
2 1 0 6 1 1 TC= 2 X 1 + 5 X 3 +1 X 1 +6 X 5 +3 X 15+ 1 X 9
X X X 1 = 102
3 5 8 15 9 10
No of occupied cell= 6
6 X 3 1 m+n-1= 3+4-1=6
Demand 7 5 3 2 No of stone cell=m+n-1=6
So no degeneracy
I II III IV SUPPLY

1 2 3 11 7 6
1 5 X X
2 1 0 6 1 1
X X X 1
3 5 8 15 9 10
6 X 3 1
Demand 7 5 3 2

Occupied cell Cij = Ui + Vj Ui Vj

11 2=u1+v1 U1=0 V1=2


12 3=u1+v2 V2=3
24 1=u2+v4 U2=-5
31 5=u3+v1 U3=3
33 15=u3+v3 V3=12
34 9=u3+v4 V4=6
I II III IV SUPPLY

1 2 3 11 7 6 U1=0 V1=2
1 5 X X U2=-5 V2=3
2 1 0 6 1 1
U3=3 V3=12
X X X 1
V4=6
3 5 8 15 9 10
6 X 3 1
Demand 7 5 3 2

Empty cell Dij= Cij –(Ui + Vj) NCC


As NCC is negative for cell 1III
and 2III . So move to next 13 11-(u1+v3) 11-(0+12)=-1
iteration . Select most negative 14 7-(u1+v4) 7-(0+6)=1
cell. Here it is tie so we select 21 1-(u2+v1) 1-(-5+2)=4
any cell. We Selected 1III cell
22 0-(u2+v2) 0-(-5+3)=2
23 6-(u2+v3) 6-(-5+12)=-1
32 8-(u3+v2) 8-(3+3)=2
I II III IV SUPPLY

1 2 3 11 7 6
1 5 X X Modify cell 13
2 1 0 6 1 1 Draw closed path
X X X 1 for it so that all
3 5 8 15 9 10 corner of closed
6 X 3 1 path are on
Demand 7 5 3 2 occupied cell
I II III IV SUPPLY

1 2 11 3 7 6
1- 5 X + X Assign alternate +
2 1 0 6 1 1 & - sign starting
X X X 1 from water cell
3 5 8 15 9 10
6+ X 3- 1
Demand 7 5 3 2
I II III IV SUPPLY

1 - 2 3 11 7 6
1 5 X+ X Take MAX VALUE
2 1 0 6 1 1 FROM negative
X X X 1 value ON closed
3 5 8 15 9 10 path i.e. -1 & -3
6+ X 3 - 1
Demand Cost to be shift is 1
7 5 3 2
I II III IV SUPPLY

1 2 3
11 7 6
X 5 1 x
2 1 0 6 1 1
x x x 1
3 5 8 15 9 10
7 x 2 1
Demand 7 5 3 2
Second Iteration

I II III IV SUPPLY

1 2 3 11 7 6 No of occupied cell= 6
X 5 1 x m+n-1= 3+4-1=6
No of stone cell=m+n-1=6
2 1 0 6 1 1
So no degeneracy
x x x 1
3 5 8 15 9 10
7 x 2 1
Demand 7 5 3 2
I II III IV SUPPLY

1 2 3 11 7 6
X 5 1 x
2 1 0 6 1 1
x x x 1
3 5 8 15 9 10
7 x 2 1
Demand 7 5 3 2

Occupied cell Cij = Ui + Vj Ui Vj

12 3=u1+v2 U1=0 V2=3


13 11=u1+v3 V3=11
24 1=u2+v4 U2=-4

31 5=u3+v1 V1=1
33 15=u3+v3 U3=4
34 9=u3+v4 V4=5
I II III IV SUPPLY

1 2 3 11 7 6
U1=0 V2=3
X 5 1 x
U2=-4 V3=11
2 1 0 6 1 1
U3=4 V1=1
x x x 1
3 5 8 15 9 10 V4=5
7 x 2 1
Demand 7 5 3 2

Empty cell Dij= Cij –(Ui + Vj) NCC


11 =2-(u1+v1) =2-(0+1)=1
14 =7-u1+v4) =7-(0+5)=2
21 =1-(u2+v1) =1-(-4+1)=4
22 =0-(u2+v2) =0-(-4+3)=1
23 =6-(u2+v3) =6-(-4+11)=-1 
32 =8-(u3+v2) =8-(4+3)=1
third Iteration

I II III IV SUPPLY
Select cell 23 . Draw
closed path it so that
1 2 3 11 7 6 all corner of closed
X 5 1 x path are on occupied
cell
2 1 0 6 1 1
x x x 1
3 5 8 15 9 10
7 x 2 1
Demand 7 5 3 2
I II III IV SUPPLY

1 2 3 11 7 6
X 5 1 x Assign alternate +
2 1 0 6 1 1 & - sign starting
x x x 1 from water cell
3 5 8 15 9 10
7 x 2 1
Demand 7 5 3 2
I II III IV SUPPLY

1 2 3 11 7 6
X 5 1 x Take MAX VALUE
2 1 0 + 6 - 1 1 FROM negative
x x x 1 value ON closed
3 5 8 15 9 10 path i.e. -1 & -2
7 x 2 - 1 +
Demand Cost to be shift is 1
7 5 3 2
I II III IV SUPPLY

1 2 3 11 7 6
No of occupied cell= 6
X 5 1 x
m+n-1= 3+4-1=6
2 1 0 6 1 1 No of stone cell=m+n-1=6
x x 1 X So no degeneracy
3 5 8 15 9 10
7 x 1 2
Demand 7 5 3 2
I II III IV SUPPLY

1 2 3 11 7 6
X 5 1 x
2 1 0 6 1 1
x x 1 X
3 5 8 15 9 10
7 x 1 2
Demand 7 5 3 2

Occupied cell Cij = Ui + Vj Ui Vj


12 3=u1+v2 U1=0 V2=3
13 11=u1+v3 V3=11
23 6=u2+v3 U2=-5
31 5=u3+v1 V1=1
33 15=u3+v3 U3=4
34 9=u3+v4 V4=5
I II III IV SUPPLY

Ui Vj
1 2 3 11 7 6
U1=0 V2=3
X 5 1 x
V3=11
2 1 0 6 1 1
U2=-5
x x 1 X V1=1
3 5 8 15 9 10 U3=4
7 x 1 2 V4=5
Demand 7 5 3 2

Empty cell Dij= Cij –(Ui + Vj) NCC


11 =2-(u1+v1) =2-(0+1)=1
14 =7-(u1+v4) =7-(0+5)=2
All dij are
positive so 21 =1-(u2+v1) =1-(-5+1)=5
we get 22 =0-(u2+v2) =0+(-5+3)=2
optimal
solution 24 =1-(u2+v4) =1-(-5+5)=1
32 =8-(u3+v2) =8-(4+3)=1
I II III IV SUPPLY

1 2 3 11 7 6
X 5 1 x
2 1 0 6 1 1
x x 1 X
3 5 8 15 9 10
7 x 1 2
Demand 7 5 3 2

 T C = 3 x 5 + 11 x 1 + 1 x 6 + 7 x 5 + 1 x 15 + 2 x 9
= 15 + 11 + 6 + 35 +15 +18
= 100
Alternate optimal solution-Transportation
problem

 Alternate optimal solution:

if dij = Cij –(Ui+ Vj) >=0

Finding optimal solution : Draw closed path for cell


having dij =0 , assign alternate + & - sign , solve
using U V method
Example
 Find optimum solution of following transportation problem . Use least cost
method to find initial feasible solution

D1 D2 D3 D4 Supply

O1 1 2 1 4 30

O2 3 3 2 1 50

O3 4 2 5 9 20

Demand 20 40 30 10 100
 Initial solution using least cost method

D1 D2 D3 D4 Supply

O1 1 2 1 4 30 T C =180
20 x 10 X
O2 3 3 2 1 50 No of stone cell= 6
X 20 20 10
m+n-1=3+4-6
O3 4 2 5 9 20
X 20 x x No degeneracy
Demand 20 40 30 10 100
 Initial solution using least cost method

D1 D2 D3 D4 Supply

O1 1 2 1 4 30 demo
X x 10 X
O2 3 3 2 1 50
X 20 20 10
O3 4 2 5 9 20
X 20 x x
Demand 20 40 30 10 100
D1 D2 D3 D4 Supply Computation for
Occupied cell
O1 1 2 1 4 30
20 x 10 X
O2 3 3 2 1 50
X 20 20 10
O3 4 2 5 9 20
X 20 x x
Demand 20 40 30 10 100

Occupied cell Cij = Ui + Vj Ui Vj


O1D1 1=U1+V1 U1=0 V1=1
O1D3 1=U1+V3 V3=1
O2D2 3=U2+V2 V2=2
O2D3 2=U2+V3 U2=1
O2D4 1=U2+V4 V4=0
O3D2 2=U3+V2 U3=0
D1 D2 D3 D4 Supply
Computation for empty cell

O1 1 2 1 4 30 U1=0 V1=1
20 x 10 X
V3=1
O2 3 3 2 1 50
X 20 20 10 V2=2
O3 4 2 5 9 20 U2=1
X 20 x x V4=0
Demand 20 40 30 10 100 U3=0

Empty cell Dij= Cij –(Ui + Vj) NCC


O1D2 =2-(u1+v2) =2-(0+2)=0 
All dij = Cij –(Ui+ Vj) >=0 ,
so solution is alternate O1D4 =4-(u1+v4) =4-(0+0)=4
optimal solution. O2D1 =3-(u2+v1) =3-(1+1)=1
As O1D2 having Dij=0 , so O3D1 =4-(u3+v1) =4-(0+1)=3
we have alternate optimum
solution O3D3 =5-(u3+v3) =5-(0+1)=4
O3D4 =9-(u3+v4) =9-(0+0)=9
T C = 1 x 20 + 1 x 10 + 3 x 20 + 2 x 20 +10 x 1+2 x 20
=180
SOLUTION IS:
O1D1= 20 O1D3=10 , O2D2= 20 ,

O2D3=20 , O2D4=10 , O3D2=20

 Problem having alternate optimal solution for O1D2 , dij is 0


 Draw closed path for O1D2 assign alternate + & - sign
Second iteration to find optimum solution

D1 D2 D3 D4 Supply

O1 1 2 1 4 30 Take MAX VALUE


20 x +10 -X FROM negative
value ON closed
O2 3 3 2+ 1 50
X 20
-
20 10
path i.e. -10 & -20

O3 4 2 5 9 20 Cost to be shift is
X 20 x x 10
Demand 20 40 30 10 100
D1 D2 D3 D4 Supply

O1 1 2 1 4 30 No of stone cell= 6

20 10 X X m+n-1=3+4-1=6
O2 3 3 2 1 50
X 10 30 10 No degeneracy
O3 4 2 5 9 20
X 20 x x
Demand 20 40 30 10 100
D1 D2 D3 D4 Supply
Computation for
Occupied cell
O1 1 2 1 4 30
20 10 X X
O2 3 3 2 1 50
X 10 30 10
O3 4 2 5 9 20
X 20 x x
Demand 20 40 30 10 100

Occupied cell Cij = Ui + Vj Ui Vj


O1D1 1=U1+V1 U1=0 V1=1
O1D2 2=U1+V2 V2=2
O2D2 3=U2+V2 U2=1
O2D3 2=U2+V3 V3=1
O2D4 1=U2+V4 V4=0
O3D2 2=U3+V2 U3=0
D1 D2 D3 D4 Supply
Computation for
empty cell
O1 1 2 1 4 30
U1=0 V1=1
20 10 X X
O2 3 3 2 1 50 V2=2
X 10 30 10 U2=1
O3 4 2 5 9 20 V3=1
X 20 x x V4=0
Demand 20 40 30 10 100
U3=0

Empty cell Dij= Cij –(Ui + Vj) Net cost Change


O1D3 =1-(u1+v3) =1-(0+1)=0
Since Dij>=0
O1D4 =4-(u1+v4) =4-(0+0)=4
, so we got
optimum O2D1 =3-(u2+v1) =3-(1+1)=1
solution O3D1 =4-(u3+v1) =4-(0+1)=3
O3D3 =5-(u3+v3) =5-(0+1)=4
O3D4 =9-(u3+v4) =9-(0+0)=9
D1 D2 D3 D4 Suppl
y

O1 1 2 1 4 30
20 10 X X
O2 3 3 2 1 50
X 10 30 10
O3 4 2 5 9 20
X 20 x x
Deman 20 40 30 10 100
d
T C =20x 1 + 10 x 2 + 10 x 3 + 30 x 2 +10 x 1 + 20 x 2
=180

SOLUTION IS:
O1D1= 20 O1D2=10 , O2D2= 10 ,

O2D3=30 , O2D4=10 , O3D2=20


Degeneracy In Transportation Problem

 When number of occupied cells less than m+n-1


then the problem is degenerated

 To remove degeneracy we add ε to one of the


empty cell so m+n-1 = number of occupied cell
Example on Degeneracy

A B C Supply

1 50 30 220 1

2 90 45 170 3

3 250 200 50 4
Demand 4 2 2
Solution: Initial basic feasible solution
using least cost method
A B C Supply

TC= 1 x 30 + 2 x 90 + 1 x 45 + 2 x
250 +2 x 50
1 50 30 220 1 = 30 + 180 + 45 + 500 + 100
x 1 x = 855
2 90 45 170 3 2
2 1 x
3 250 200 50 4 2
2 x 2
Demand 4 2 2 1 2 8
8
Solution

A B C Supply

problem is balanced
1 50 30 220 1

2 90 45 170 3
Find initial solution using
least cost method
3 250 200 50 4

Demand 4 2 2 8
A B C Supply

1 50 30 220 1
X 1 X OCUPIED CELL=5
m+n-1 = 3+3-1=5
2 90 45 170 3 There is no degeneracy
2 1 X

3 250 200 50 4
2 X 2

Demand 4 2 2
A B C Supply
Computation for
1 50 30 220 1 Occupied cell
X 1 X
2 90 45 170 3
2 1 X
3 250 200 50 4
2 X 2

Demand 4 2 2

Occupied cell Cij = Ui + Vj Ui Vj


1B 30=U1+V2 U1=0 V2=30
2A 90=U2+V1 V1=75
2B 45=U2+V2 U2=15
3A 250=U3+V1 U3=175
3C 50=U3+V3 V3=- 125
A B C Supply
Computation for
1 50 30 220 1
X 1 X empty cell
2 90 45 170 3 Ui Vj
2 1 X
U1=0 V2=30
3 250 200 50 4
U2=15 V1=75
2 X 2
Demand 4 2 2 U3=175 V3=- 125

Empty cell Dij= Cij –(Ui + Vj) Net cost Change

1A =50-(u1+v1) =50-(0+75)=-25 

1C =220-(u1+v3) =220-(0-125)=345

2C =170-(u2+v3) =170-(15-125)=280

3B =200-(u3+v2) =200-(175+30)=-5
A B C Supply

1 50 30 220 1
X 1 X
2 90 45 170 3
2 1 X
3 250 200 50 4
2 X 2
Demand 4 2 2
Second iteration
A B C Supply A B C Supply

1 50 30 220 1 1 50 30 220 1
X + 1 X 1 x X
-
2 90 45 170 3 2 90 45 170 3
2 1 X 1 2 X
- +
3 250 200 50 4 3 250 200 50 4
2 X 2
2 X 2

Demand 4 2 2 Demand 4 2 2

Cost to be shift = 1
Solution

A B C Supply

1 50 30 220 1
1 x X OCUPIED CELL=5
m+n-1 = 3+3-1=5
2 90 45 170 3 There is no degeneracy
1 2 X

3 250 200 50 4
2 X 2

Demand 4 2 2
A B C Supply
Computation for
1 50 30 220 1 Occupied cell
1 x X

2 90 45 170 3
1 2 X

3 250 200 50 4
2 X 2

Demand 4 2 2

Occupied cell Cij = Ui + Vj Ui Vj


1A 50=U1+V1 U1=0 V1=50
2A 90=U2+V1 U2=40
2B 45=U2+V2 V2=5
3A 250=U3+V1 U3=200
3C 50=U3+V3 V3=-150
A B C Supply
Computation for
1 50 30 220 1
1 x X
empty cell
2 90 45 170 3 Ui Vj

1 2 X U1=0 V1=50
U2=40
3 250 200 50 4
V2=5
2 X 2
U3=200
Demand 4 2 2
V3=-150

Empty cell Dij= Cij –(Ui + Vj) Net cost Change

1B =30-(u1+v2) =30-(0+5)=25

1C =220-(u1+v3) =220-(0-150)=370

2C =170-(u2+v3) =170-(40-150)=280

3B =200-(u3+v2) =200-(200+5)=-5 
3 rd iteration

A B C Supply

1 50 30 220 1
1 x X

2 90 45 170 3
1 2 X

3 250 200 50 4
2 X 2

Demand 4 2 2
Solution
A B C Supply
A B C Supply

1 50 30 220 1
1 50 30 220 1
1 x X
1 x X
2 90 45 170 3
2 90 45 170 3
1 2 X
+ - 3 X X

3 250 200 50 4
3 250 200 50 4
2 X 2
-
+ X 2 2
Demand 4 2 2 Demand 4 2 2

Cost to be shift = 2
Solution

A B C Supply

1 50 30 220 1
1 x X OCUPIEDCELL=4
m+n-1 = 3+3-1=5
2 90 45 170 3 m+n-1 ≠ no of occupied
3 x X cell
There is degeneracy
3 250 200 50 4
x 2 2

Demand 4 2 2
Solution

A B C Supply

1 50 30 220 1
1 x X Add € to any empty cell
and consider it as
2 90 45 170 3 occupied cell
3 € X No of occupied cell= 5
m+n-1=5
3 250 200 50 4
X 2 2

Demand 4 2 2
A B C Supply

Computation for
1 50 30 220 1
Occupied cell
1 x X
2 90 45 170 3
3 € X
3 250 200 50 4
X 2 2

Demand 4 2 2

Occupied cell Cij = Ui + Vj Ui Vj

1A 50=U1+V1 U1=0 V1=50


2A 90=U2+V1 U2=40
2B 45=U2+V2 V2=5
3B 200=U3+V2 U3=195
3C 50=U3 + V3 V3=-145
A B C Supply
Computation for
1 50 30 220 1 empty cell
1 x X Ui Vj

2 90 45 170 3 U1=0 V1=50


3 € X
U2=40 V2=5
3 250 200 50 4
U3=195 V3=-145
X 2 2

Demand 4 2 2

Empty cell Dij= Cij –(Ui + Vj) Net cost Change


All dij >=0 , so we
1B =30-(u1+v2) =30-(0+5)=25
got optimum solution
1C =220-(u1+v3) =220-(0-145)= 365

2C =170-(u2+v3) =170-(40-145)=275

3A =250-(u3+v1) =250-(195+50)=5
A B C Supply

1 50 30 220 1
1 x X
2 90 45 170 3
3 € X
3 250 200 50 4
X 2 2

Demand 4 2 2

ALL Dij >=0 so solution is optimal solution .

TC= 1 x 50 + 3 x 90 + 45 x 0 + 200 x 2 + 2 x 50
= 50 +270 + 0 + 400 +100
= 820

You might also like