0% found this document useful (0 votes)
70 views16 pages

2022 Final Term Paper

Uploaded by

abdulahad69990
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)
70 views16 pages

2022 Final Term Paper

Uploaded by

abdulahad69990
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

Find solution using graphical method

MAX Z = x1 + x2
subject to
2x1 + 5x2 <= 800
4x1 + 2x2 <= 800
and x1,x2 >= 0
Solution:
Problem is
MAX Zx = x1 + x2
subject to
2 x1 + 5 x2 ≤ 800
4 x1 + 2 x2 ≤ 800
and x1,x2≥0;
Hint to draw constraints
1. To draw constraint 2x1+5x2≤800→(1)
Treat it as 2x1+5x2=800
When x1=0 then x2=?
⇒2(0)+5x2=800
⇒5x2=800
⇒x2=800/5=160
When x2=0 then x1=?
⇒2x1+5(0)=800
⇒2x1=800
⇒x1=800/2=400
x1 0 400
x2 160 0
2. To draw
constraint 4x1+2x2≤800→(2) Treat
it as 4x1+2x2=800
When x1=0 then x2=?
⇒4(0)+2x2=800
⇒2x2=800
⇒x2=800/2=400
When x2=0 then x1=?
⇒4x1+2(0)=800
⇒4x1=800
⇒x1=800/4=200
x1 0 200
x2 400 0
The value of the objective function at each of these extreme points is as follows:
Extreme Point
Objective function value
Coordinates Lines through Extreme Point
Z=x1+x2
(x1,x2)
3→x1≥0
O(0,0) 1(0)+1(0)=0
4→x2≥0
2→4x1+2x2≤800
A(200,0) 1(200)+1(0)=200
4→x2≥0
1→2x1+5x2≤800
B(150,100) 1(150)+1(100)=250
2→4x1+2x2≤800
1→2x1+5x2≤800
C(0,160) 1(0)+1(160)=160
3→x1≥0
The maximum value of the objective function Z=250 occurs at the extreme point (150,100).
Hence, the optimal solution to the given LP problem is : x1=150,x2=100 and max Z=250.
Find solution using graphical method
MIN Z = 3x1 + 2x2
subject to
5x1 + x2 >= 10
5x1 + 2x2 >= 12
x1 + 4x2 >= 12
and x1,x2 >= 0
Solution:
X1 = The number of liquid products per jar
X2 = The number of dry products per carton
Problem is
MIN Zx = 3 x1 + 2 x2
subject to
5 x1 + x2 ≥ 10
5 x1 + 2 x2 ≥ 12
x1 + 4 x2 ≥ 12
and x1,x2≥0;
1. To draw constraint 5x1+x2≥10→(1)
Treat it as 5x1+x2=10
When x1=0 then x2=?
⇒5(0)+x2=10
⇒x2=10
When x2=0 then x1=?
⇒5x1+(0)=10
⇒5x1=10
⇒x1=10/5=2
x1 0 2
x2 10 0
2. To draw constraint 5x1+2x2≥12→(2)
Treat it as 5x1+2x2=12
When x1=0 then x2=?
⇒5(0)+2x2=12
⇒2x2=12
⇒x2=12/2=6
When x2=0 then x1=?
⇒5x1+2(0)=12
⇒5x1=12
⇒x1=12/5=2.4
x1 0 2.4
x2 6 0
3. To draw constraint x1+4x2≥12→(3)
Treat it as x1+4x2=12
When x1=0 then x2=?
⇒(0)+4x2=12
⇒4x2=12
⇒x2=12/4=3
When x2=0 then x1=?
⇒x1+4(0)=12
⇒x1=12
x1 0 12
x2 3 0
The value of the objective function at each of these extreme points is as follows:
Extreme Point
Objective function value
Coordinates Lines through Extreme Point
Z=3x1+2x2
(x1,x2)
1→5x1+x2≥10
A(0,10) 3(0)+2(10)=20
4→x1≥0
1→5x1+x2≥10
B(1.47,2.63) 3(1.47)+2(2.63)=9.68
3→x1+4x2≥12
3→x1+4x2≥12
C(12,0) 3(12)+2(0)=36
5→x2≥0
The miniimum value of the objective function Z=9.68 occurs at the extreme point (1.47,2.63).
Hence, the optimal solution to the given LP problem is : x1=1.47,x2=2.63 and min Z=9.68.

Find solution using dual-simplex method


MIN Z = 3x1 + 2x2
subject to
3x1 + x2 >= 3
4x1 + 3x2 >= 6
x1 + x2 <= 3
and x1,x2 >= 0
Solution:
Problem is
Min Z = 3 x1 + 2 x2
subject to
3 x1 + x2 ≥ 3
4 x1 + 3 x2 ≥ 6
x1 + x2 ≤ 3
and x1,x2≥0;
In order to apply the dual simplex method, convert Min Z to Max Z and all ≥ constraint
to ≤ constraint by multiply -1.
Problem is
Max Z = - 3 x1 - 2 x2
subject to
- 3 x1 - x2 ≤ -3
- 4 x1 - 3 x2 ≤ -6
x1 + x2 ≤ 3
and x1,x2≥0;
The problem is converted to canonical form by adding slack, surplus and artificial variables
as appropiate
1. As the constraint-1 is of type '≤' we should add slack variable S1
2. As the constraint-2 is of type '≤' we should add slack variable S2
3. As the constraint-3 is of type '≤' we should add slack variable S3
After introducing slack variables
Max Z = - 3 x1 - 2 x2 + 0 S1 + 0 S2 + 0 S3
subject to
- 3 x1 - x2 + S1 = -3
- 4 x1 - 3 x2 + S2 = -6
x1 + x2 + S3 = 3
and x1,x2,S1,S2,S3≥0
Iteration-1 Cj -3 -2 0 0 0
B CB XB x1 x2 S1 S2 S3
S1 0 -3 -3 -1 1 0 0
S2 0 -6 -4 (-3) 0 1 0
S3 0 3 1 1 0 0 1
Z=0 Zj 0 0 0 0 0
Zj-Cj 3 2 0 0 0
Ratio=Zj-CjS2,j
-0.75 -0.6667↑ --- --- ---
and S2,j<0
Minimum negative XB is -6 and its row index is 2. So, the leaving basis variable is S2.
Maximum negative ratio is -0.6667 and its column index is 2. So, the entering variable is x2.
∴ The pivot element is -3.
Entering =x2, Departing =S2, Key Element =-3
R2(new)=R2(old) ÷(-3)
R1(new)=R1(old) + R2(new)
R3(new)=R3(old) - R2(new)
Iteration-2 Cj -3 -2 0 0 0
B CB XB x1 x2 S1 S2 S3
S1 0 -1 (-1.6667) 0 1 -0.3333 0
x2 -2 2 1.3333 1 0 -0.3333 0
S3 0 1 -0.3333 0 0 0.3333 1
Z=-4 Zj -2.6667 -2 0 0.6667 0
Zj-Cj 0.3333 0 0 0.6667 0
Ratio=Zj-CjS1,j
-0.2↑ --- --- -2 ---
and S1,j<0
Minimum negative XB is -1 and its row index is 1. So, the leaving basis variable is S1.
Maximum negative ratio is -0.2 and its column index is 1. So, the entering variable is x1.
∴ The pivot element is -1.6667.
Entering =x1, Departing =S1, Key Element =-1.6667
R1(new)=R1(old) ÷(-1.6667)
R2(new)=R2(old) - 1.3333R1(new)
R3(new)=R3(old) + 0.3333R1(new)
Iteration-3 Cj -3 -2 0 0 0
B CB XB x1 x2 S1 S2 S3
x1 -3 0.6 1 0 -0.6 0.2 0
x2 -2 1.2 0 1 0.8 -0.6 0
S3 0 1.2 0 0 -0.2 0.4 1
Z=-4.2 Zj -3 -2 0.2 0.6 0
Zj-Cj 0 0 0.2 0.6 0
Ratio --- --- --- --- ---
Since all Zj-Cj≥0 and all XBi≥0 thus the current solution is the optimal solution.
Hence, optimal solution is arrived with value of variables as :
x1=0.6,x2=1.2
Max Z=-4.2
∴ Min Z=4.2

Find dual from primal conversion


MAX Z = x1 + x2
subject to
2x1 + x2 = 5
3x1 - x2 = 6
and x1,x2 unrestricted in sign
Solution:
Primal is (Solution steps of Primal by Simplex method)
MAX Zx = x1 + x2
subject to
2 x1 + x2 = 5
3 x1 - x2 = 6
and x1,x2 unrestricted in sign
In primal, There are 2 variables and 2 constraints, so in dual there must be 2 constraints
and 2 variables
In primal, The coefficient of objective function c1=1,c2=1 becomes right hand side constants
in dual
In primal, The right hand side constants b1=5,b2=6 becomes coefficient of objective function
in dual
In primal, objective function is maximizing, so in dual objective function must be minimizing
The x1,x2 variables in the primal are unrestricted in sign, therefore the 1st,2nd constraints in
the dual shall be equalities.
Let y1,y2 be the dual variables
Since 1st,2nd constraints in the primal are equalities, the corresponding dual
variables y1,y2 will be unrestricted in sign.
Dual is (Solution steps of Dual by Simplex method)
MIN Zy = 5 y1 + 6 y2
subject to
2 y1 + 3 y2 = 1
y1 - y2 = 1
and y1,y2 unrestricted in sign

Find solution using Two-Phase method


MIN Z = 4x1 + x2
subject to
3x1 + x2 = 3
4x1 + 3x2 >= 6
x1 + 2x2 <= 4
and x1,x2 >= 0
Solution:
Problem is
Min Z = 4 x1 + x2
subject to
3 x1 + x2 = 3
4 x1 + 3 x2 ≥ 6
x1 + 2 x2 ≤ 4
and x1,x2≥0;

-->Phase-1<--

The problem is converted to canonical form by adding slack, surplus and artificial variables
as appropiate
1. As the constraint-1 is of type '=' we should add artificial variable A1
2. As the constraint-2 is of type '≥' we should subtract surplus variable S1 and add artificial
variable A2
3. As the constraint-3 is of type '≤' we should add slack variable S2
After introducing slack,surplus,artificial variables
Min Z = A1 + A2
subject to
3 x1 + x2 + A1 =3
4 x1 + 3 x2 - S1 + A2 = 6
x1 + 2 x2 + S2 =4
and x1,x2,S1,S2,A1,A2≥0

Iteration-1 Cj 0 0 0 0 1 1
MinRatio
B CB XB x1 x2 S1 S2 A1 A2
XBx1
A1 1 3 (3) 1 0 0 1 0 33=1→
A2 1 6 4 3 -1 0 0 1 64=1.5
S2 0 4 1 2 0 1 0 0 41=4
Z=9 Zj 7 4 -1 0 1 1
Zj-Cj 7↑ 4 -1 0 0 0
Positive maximum Zj-Cj is 7 and its column index is 1. So, the entering variable is x1.
Minimum ratio is 1 and its row index is 1. So, the leaving basis variable is A1.
∴ The pivot element is 3.
Entering =x1, Departing =A1, Key Element =3
R1(new)=R1(old) ÷3
R2(new)=R2(old) - 4R1(new)
R3(new)=R3(old) - R1(new)
Iteration-2 Cj 0 0 0 0 1
MinRatio
B CB XB x1 x2 S1 S2 A2
XBx2
x1 0 1 1 0.3333 0 0 0 10.3333=3
A2 1 2 0 (1.6667) -1 0 1 21.6667=1.2→
S2 0 3 0 1.6667 0 1 0 31.6667=1.8
Z=2 Zj 0 1.6667 -1 0 1
Zj-Cj 0 1.6667↑ -1 0 0

Positive maximum Zj-Cj is 1.6667 and its column index is 2. So, the entering variable is x2.
Minimum ratio is 1.2 and its row index is 2. So, the leaving basis variable is A2.
∴ The pivot element is 1.6667.
Entering =x2, Departing =A2, Key Element =1.6667
R2(new)=R2(old) ÷1.6667
R1(new)=R1(old) - 0.3333R2(new)
R3(new)=R3(old) - 1.6667R2(new)
Iteration-3 Cj 0 0 0 0
B CB XB x1 x2 S1 S2 MinRatio
x1 0 0.6 1 0 0.2 0
x2 0 1.2 0 1 -0.6 0
S2 0 1 0 0 1 1
Z=0 Zj 0 0 0 0
Zj-Cj 0 0 0 0
Since all Zj-Cj≤0
Hence, optimal solution is arrived with value of variables as :
x1=0.6,x2=1.2
Min Z=0
-->Phase-2<--
we eliminate the artificial variables and change the objective function for the original,
Min Z=4x1+x2+0S1+0S2

Iteration-1 Cj 4 1 0 0
MinRatio
B CB XB x1 x2 S1 S2
XBS 1
x1 4 0.6 1 0 0.2 0 0.60.2=3
x2 1 1.2 0 1 -0.6 0 ---
S2 0 1 0 0 (1) 1 11=1→
Z=3.6 Zj 4 1 0.2 0
Zj-Cj 0 0 0.2↑ 0
Positive maximum Zj-Cj is 0.2 and its column index is 3. So, the entering variable is S1.
Minimum ratio is 1 and its row index is 3. So, the leaving basis variable is S2.
∴ The pivot element is 1.
Entering =S1, Departing =S2, Key Element =1
R3(new)=R3(old)
R1(new)=R1(old) - 0.2R3(new)
R2(new)=R2(old) + 0.6R3(new)
Iteration-2 Cj 4 1 0 0
B CB XB x1 x2 S1 S2 MinRatio
x1 4 0.4 1 0 0 -0.2
x2 1 1.8 0 1 0 0.6
S1 0 1 0 0 1 1
Z=3.4 Zj 4 1 0 -0.2
Zj-Cj 0 0 0 -0.2
Since all Zj-Cj≤0
Hence, optimal solution is arrived with value of variables as :
x1=0.4,x2=1.8
Min Z=3.4
Find Solution using Least Cost method, also find optimal solution using modi
method,
D1 D2 D3 D4 Supply
S1 5 0 0 5 14
S2 17 5 10 0 16
S3 20 15 25 5 20
S4 23 11 15 5 15
Demand 18 15 20 12

Solution:
TOTAL number of supply constraints : 4
TOTAL number of demand constraints : 4
Problem Table is
D1 D2 D3 D4 Supply
S1 5 0 0 5 14
S2 17 5 10 0 16
S3 20 15 25 5 20
S4 23 11 15 5 15

Demand 18 15 20 12
The smallest transportation cost is 0 in cell S1D2
The allocation to this cell is min(14,15) = 14.
This exhausts the capacity of S1 and leaves 15 - 14=1 units with D2
Table-1
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5 10 0 16
S3 20 15 25 5 20
S4 23 11 15 5 15

Demand 18 1 20 12

The smallest transportation cost is 0 in cell S2D4


The allocation to this cell is min(16,12) = 12.
This satisfies the entire demand of D4 and leaves 16 - 12=4 units with S2
Table-2
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5 10 0(12) 4
S3 20 15 25 5 20
S4 23 11 15 5 15

Demand 18 1 20 0
The smallest transportation cost is 5 in cell S2D2
The allocation to this cell is min(4,1) = 1.
This satisfies the entire demand of D2 and leaves 4 - 1=3 units with S2
Table-3
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5(1) 10 0(12) 3
S3 20 15 25 5 20
S4 23 11 15 5 15

Demand 18 0 20 0
The smallest transportation cost is 10 in cell S2D3
The allocation to this cell is min(3,20) = 3.
This exhausts the capacity of S2 and leaves 20 - 3=17 units with D3
Table-4
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5(1) 10(3) 0(12) 0
S3 20 15 25 5 20
S4 23 11 15 5 15

Demand 18 0 17 0
The smallest transportation cost is 15 in cell S4D3
The allocation to this cell is min(15,17) = 15.
This exhausts the capacity of S4 and leaves 17 - 15=2 units with D3
Table-5
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5(1) 10(3) 0(12) 0
S3 20 15 25 5 20
S4 23 11 15(15) 5 0

Demand 18 0 2 0
The smallest transportation cost is 20 in cell S3D1
The allocation to this cell is min(20,18) = 18.
This satisfies the entire demand of D1 and leaves 20 - 18=2 units with S3
Table-6
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5(1) 10(3) 0(12) 0
S3 20(18) 15 25 5 2
S4 23 11 15(15) 5 0

Demand 0 0 2 0
The smallest transportation cost is 25 in cell S3D3
The allocation to this cell is min(2,2) = 2.
Table-7
D1 D2 D3 D4 Supply
S1 5 0(14) 0 5 0
S2 17 5(1) 10(3) 0(12) 0
S3 20(18) 15 25(2) 5 0
S4 23 11 15(15) 5 0

Demand 0 0 0 0
Initial feasible solution is
D1 D2 D3 D4 Supply
S1 5 0 (14) 0 5 14
S2 17 5 (1) 10 (3) 0 (12) 16
S3 20 (18) 15 25 (2) 5 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12
The minimum total transportation cost =0×14+5×1+10×3+0×12+20×18+25×2+15×15=670
Here, the number of allocated cells = 7 is equal to m + n - 1 = 4 + 4 - 1 = 7
∴ This solution is non-degenerate
Optimality test using modi method...
Allocation Table is
D1 D2 D3 D4 Supply
S1 5 0 (14) 0 5 14
S2 17 5 (1) 10 (3) 0 (12) 16
S3 20 (18) 15 25 (2) 5 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12
Iteration-1 of optimality test
1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj
1. Substituting, u2=0, we get
2.c22=u2+v2⇒v2=c22-u2⇒v2=5-0⇒v2=5
3.c12=u1+v2⇒u1=c12-v2⇒u1=0-5⇒u1=-5
4.c23=u2+v3⇒v3=c23-u2⇒v3=10-0⇒v3=10
5.c33=u3+v3⇒u3=c33-v3⇒u3=25-10⇒u3=15
6.c31=u3+v1⇒v1=c31-u3⇒v1=20-15⇒v1=5
7.c43=u4+v3⇒u4=c43-v3⇒u4=15-10⇒u4=5
8.c24=u2+v4⇒v4=c24-u2⇒v4=0-0⇒v4=0
D1 D2 D3 D4 Supply ui
S1 5 0 (14) 0 5 14 u1=-5
S2 17 5 (1) 10 (3) 0 (12) 16 u2=0
S3 20 (18) 15 25 (2) 5 20 u3=15
S4 23 11 15 (15) 5 15 u4=5

Demand 18 15 20 12
vj v1=5 v2=5 v3=10 v4=0
2. Find dij for all unoccupied cells(i,j), where dij=cij- ui+vj ( )
( )
1.d11=c11- u1+v1 =5-(-5+5)=5

2.d13=c13 -(u +v )=0-(-5+10)=-5


1 3

3.d14=c14 -(u +v )=5-(-5+0)=10


1 4

4.d21=c21 -(u +v )=17-(0+5)=12


2 1

5.d32=c32 -(u +v )=15-(15+5)=-5


3 2

6.d34=c34 -(u +v )=5-(15+0)=-10


3 4

7.d41=c41 -(u +v )=23-(5+5)=13


4 1

8.d42=c42 -(u +v )=11-(5+5)=1


4 2

9.d44=c44 -(u +v )=5-(5+0)=0


4 4

D1 D2 D3 D4 Supply ui
S1 5 [5] 0 (14) 0 [-5] 5 [10] 14 u1=-5
S2 17 [12] 5 (1) 10 (3) 0 (12) 16 u2=0
S3 20 (18) 15 [-5] 25 (2) 5 [-10] 20 u3=15
S4 23 [13] 11 [1] 15 (15) 5 [0] 15 u4=5

Demand 18 15 20 12
vj v1=5 v2=5 v3=10 v4=0
3. Now choose the minimum negative value from all dij (opportunity cost) = d34 = [-10]
and draw a closed path from S3D4.
Closed path is S3D4→S3D3→S2D3→S2D4
Closed path and plus/minus sign allocation...
D1 D2 D3 D4 Supply ui
S1 5 [5] 0 (14) 0 [-5] 5 [10] 14 u1=-5
S2 17 [12] 5 (1) 10 (3) (+) 0 (12) (-) 16 u2=0
S3 20 (18) 15 [-5] 25 (2) (-) 5 [-10] (+) 20 u3=15
S4 23 [13] 11 [1] 15 (15) 5 [0] 15 u4=5

Demand 18 15 20 12
vj v1=5 v2=5 v3=10 v4=0
4. Minimum allocated value among all negative position (-) on closed path = 2
Substract 2 from all (-) and Add it to all (+)
D1 D2 D3 D4 Supply
S1 5 0 (14) 0 5 14
S2 17 5 (1) 10 (5) 0 (10) 16
S3 20 (18) 15 25 5 (2) 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12
5. Repeat the step 1 to 4, until an optimal solution is obtained.
Iteration-2 of optimality test
1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj
1. Substituting, u2=0, we get
2.c22=u2+v2⇒v2=c22-u2⇒v2=5-0⇒v2=5
3.c12=u1+v2⇒u1=c12-v2⇒u1=0-5⇒u1=-5
4.c23=u2+v3⇒v3=c23-u2⇒v3=10-0⇒v3=10
5.c43=u4+v3⇒u4=c43-v3⇒u4=15-10⇒u4=5
6.c24=u2+v4⇒v4=c24-u2⇒v4=0-0⇒v4=0
7.c34=u3+v4⇒u3=c34-v4⇒u3=5-0⇒u3=5
8.c31=u3+v1⇒v1=c31-u3⇒v1=20-5⇒v1=15
D1 D2 D3 D4 Supply ui
S1 5 0 (14) 0 5 14 u1=-5
S2 17 5 (1) 10 (5) 0 (10) 16 u2=0
S3 20 (18) 15 25 5 (2) 20 u3=5
S4 23 11 15 (15) 5 15 u4=5

Demand 18 15 20 12
vj v1=15 v2=5 v3=10 v4=0

( )
2. Find dij for all unoccupied cells(i,j), where dij=cij- ui+vj

( )
1.d11=c11- u1+v1 =5-(-5+15)=-5

2.d13=c13 -(u +v )=0-(-5+10)=-5


1 3

3.d14=c14 -(u +v )=5-(-5+0)=10


1 4

4.d21=c21 -(u +v )=17-(0+15)=2


2 1

5.d32=c32 -(u +v )=15-(5+5)=5


3 2

6.d33=c33 -(u +v )=25-(5+10)=10


3 3

7.d41=c41 -(u +v )=23-(5+15)=3


4 1

8.d42=c42 -(u +v )=11-(5+5)=1


4 2

9.d44=c44 -(u +v )=5-(5+0)=0


4 4

D1 D2 D3 D4 Supply ui
S1 5 [-5] 0 (14) 0 [-5] 5 [10] 14 u1=-5
S2 17 [2] 5 (1) 10 (5) 0 (10) 16 u2=0
S3 20 (18) 15 [5] 25 [10] 5 (2) 20 u3=5
S4 23 [3] 11 [1] 15 (15) 5 [0] 15 u4=5

Demand 18 15 20 12
vj v1=15 v2=5 v3=10 v4=0
3. Now choose the minimum negative value from all dij (opportunity cost) = d11 = [-5]
and draw a closed path from S1D1.
Closed path is S1D1→S1D2→S2D2→S2D4→S3D4→S3D1
Closed path and plus/minus sign allocation...
D1 D2 D3 D4 Supply ui
S1 5 [-5] (+) 0 (14) (-) 0 [-5] 5 [10] 14 u1=-5
S2 17 [2] 5 (1) (+) 10 (5) 0 (10) (-) 16 u2=0
S3 20 (18) (-) 15 [5] 25 [10] 5 (2) (+) 20 u3=5
S4 23 [3] 11 [1] 15 (15) 5 [0] 15 u4=5

Demand 18 15 20 12
vj v1=15 v2=5 v3=10 v4=0
4. Minimum allocated value among all negative position (-) on closed path = 10
Substract 10 from all (-) and Add it to all (+)
D1 D2 D3 D4 Supply
S1 5 (10) 0 (4) 0 5 14
S2 17 5 (11) 10 (5) 0 16
S3 20 (8) 15 25 5 (12) 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12

5. Repeat the step 1 to 4, until an optimal solution is obtained.


Iteration-3 of optimality test
1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj
1. Substituting, u1=0, we get
2.c11=u1+v1⇒v1=c11-u1⇒v1=5-0⇒v1=5
3.c31=u3+v1⇒u3=c31-v1⇒u3=20-5⇒u3=15
4.c34=u3+v4⇒v4=c34-u3⇒v4=5-15⇒v4=-10
5.c12=u1+v2⇒v2=c12-u1⇒v2=0-0⇒v2=0
6.c22=u2+v2⇒u2=c22-v2⇒u2=5-0⇒u2=5
7.c23=u2+v3⇒v3=c23-u2⇒v3=10-5⇒v3=5
8.c43=u4+v3⇒u4=c43-v3⇒u4=15-5⇒u4=10
D1 D2 D3 D4 Supply ui
S1 5 (10) 0 (4) 0 5 14 u1=0
S2 17 5 (11) 10 (5) 0 16 u2=5
S3 20 (8) 15 25 5 (12) 20 u3=15
S4 23 11 15 (15) 5 15 u4=10

Demand 18 15 20 12
vj v1=5 v2=0 v3=5 v4=-10
2. Find dij for all unoccupied cells(i,j), where dij=cij- ui+vj ( )
( )
1.d13=c13- u1+v3 =0-(0+5)=-5

2.d14=c14 -(u +v )=5-(0-10)=15


1 4

3.d21=c21 -(u +v )=17-(5+5)=7


2 1

4.d24=c24 -(u +v )=0-(5-10)=5


2 4

5.d32=c32 -(u +v )=15-(15+0)=0


3 2

6.d33=c33 -(u +v )=25-(15+5)=5


3 3

7.d41=c41 -(u +v )=23-(10+5)=8


4 1

8.d42=c42 -(u +v )=11-(10+0)=1


4 2

9.d44=c44 -(u +v )=5-(10-10)=5


4 4

D1 D2 D3 D4 Supply ui
S1 5 (10) 0 (4) 0 [-5] 5 [15] 14 u1=0
S2 17 [7] 5 (11) 10 (5) 0 [5] 16 u2=5
S3 20 (8) 15 [0] 25 [5] 5 (12) 20 u3=15
S4 23 [8] 11 [1] 15 (15) 5 [5] 15 u4=10

Demand 18 15 20 12
vj v1=5 v2=0 v3=5 v4=-10
3. Now choose the minimum negative value from all dij (opportunity cost) = d13 = [-5]
and draw a closed path from S1D3.
Closed path is S1D3→S1D2→S2D2→S2D3
Closed path and plus/minus sign allocation...
D1 D2 D3 D4 Supply ui
S1 5 (10) 0 (4) (-) 0 [-5] (+) 5 [15] 14 u1=0
S2 17 [7] 5 (11) (+) 10 (5) (-) 0 [5] 16 u2=5
S3 20 (8) 15 [0] 25 [5] 5 (12) 20 u3=15
S4 23 [8] 11 [1] 15 (15) 5 [5] 15 u4=10

Demand 18 15 20 12
vj v1=5 v2=0 v3=5 v4=-10
4. Minimum allocated value among all negative position (-) on closed path = 4
Substract 4 from all (-) and Add it to all (+)
D1 D2 D3 D4 Supply
S1 5 (10) 0 0 (4) 5 14
S2 17 5 (15) 10 (1) 0 16
S3 20 (8) 15 25 5 (12) 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12
5. Repeat the step 1 to 4, until an optimal solution is obtained.
Iteration-4 of optimality test
1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj
1. Substituting, v3=0, we get
2.c13=u1+v3⇒u1=c13-v3⇒u1=0-0⇒u1=0
3.c11=u1+v1⇒v1=c11-u1⇒v1=5-0⇒v1=5
4.c31=u3+v1⇒u3=c31-v1⇒u3=20-5⇒u3=15
5.c34=u3+v4⇒v4=c34-u3⇒v4=5-15⇒v4=-10
6.c23=u2+v3⇒u2=c23-v3⇒u2=10-0⇒u2=10
7.c22=u2+v2⇒v2=c22-u2⇒v2=5-10⇒v2=-5
8.c43=u4+v3⇒u4=c43-v3⇒u4=15-0⇒u4=15
D1 D2 D3 D4 Supply ui
S1 5 (10) 0 0 (4) 5 14 u1=0
S2 17 5 (15) 10 (1) 0 16 u2=10
S3 20 (8) 15 25 5 (12) 20 u3=15
S4 23 11 15 (15) 5 15 u4=15

Demand 18 15 20 12
vj v1=5 v2=-5 v3=0 v4=-10

( )
2. Find dij for all unoccupied cells(i,j), where dij=cij- ui+vj

( )
1.d12=c12- u1+v2 =0-(0-5)=5

2.d14=c14 -(u +v )=5-(0-10)=15


1 4

3.d21=c21 -(u +v )=17-(10+5)=2


2 1

4.d24=c24 -(u +v )=0-(10-10)=0


2 4

5.d32=c32 -(u +v )=15-(15-5)=5


3 2

6.d33=c33 -(u +v )=25-(15+0)=10


3 3

7.d41=c41 -(u +v )=23-(15+5)=3


4 1

8.d42=c42 -(u +v )=11-(15-5)=1


4 2

9.d44=c44 -(u +v )=5-(15-10)=0


4 4

D1 D2 D3 D4 Supply ui
S1 5 (10) 0 [5] 0 (4) 5 [15] 14 u1=0
S2 17 [2] 5 (15) 10 (1) 0 [0] 16 u2=10
S3 20 (8) 15 [5] 25 [10] 5 (12) 20 u3=15
S4 23 [3] 11 [1] 15 (15) 5 [0] 15 u4=15

Demand 18 15 20 12
vj v1=5 v2=-5 v3=0 v4=-10

Since all dij≥0.


So final optimal solution is arrived.
D1 D2 D3 D4 Supply
S1 5 (10) 0 0 (4) 5 14
S2 17 5 (15) 10 (1) 0 16
S3 20 (8) 15 25 5 (12) 20
S4 23 11 15 (15) 5 15

Demand 18 15 20 12

The minimum total transportation cost =5×10+0×4+5×15+10×1+20×8+5×12+15×15=580


Notice alternate solution is available with unoccupied cell S2D4:d24 = [0], but with the same
optimal value.

You might also like