0% found this document useful (0 votes)
20 views

test_solutions LPP mixed problems

Uploaded by

28 Shivani
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)
20 views

test_solutions LPP mixed problems

Uploaded by

28 Shivani
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/ 40

LINEAR PROGRAMMING AND APPLICATIONS

1. Use simplex method to solve the following linear programming problem


Maximize 4𝑥1 + 5𝑥2
subject to
4𝑥1 + 5𝑥2 ≤ 20
2𝑥1 + 3𝑥2 ≤ 60
𝑥1 , 𝑥2 ≥ 0

The problem is converted to canonical form by adding slack, surplus and artificial variables as
appropriate

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

After introducing slack variables


Iteration-1 Cj 4 5 0 0

MinRatio
B CB XB x1 x2 S1 S2
XBx2

S1 0 20 4 (5) 1 0 205=4→

S2 0 60 2 3 0 1 603=20

Z=0 Zj 0 0 0 0

Zj-Cj -4 -5↑ 0 0

Negative minimum Zj-Cj is -5 and its column index is 2. So, the entering variable is x2.

Minimum ratio is 4 and its row index is 1. So, the leaving basis variable is S1.

∴ The pivot element is 5.

Entering =x2, Departing =S1


Iteration-2 Cj 4 5 0 0

B CB XB x1 x2 S1 S2 MinRatio

x2 5 4 0.8 1 0.2 0
S2 0 48 -0.4 0 -0.6 1

Z=20 Zj 4 5 1 0

Zj-Cj 0 0 1 0

Since all Zj-Cj≥0

Hence, optimal solution is arrived with value of variables as :


x1=0,x2=4

Max Z=20
Here Z1-C1=0 and x1 is not in the basis (i.e. x1=0).

This indicates that there are more than 1 optimal solution of the problem.
Thus by entering x1 into the basis, we may obtain another alternative optimal solution.

Iteration-2 Cj 4 5 0 0

MinRatio
B CB XB x1 x2 S1 S2
XBx1

x2 5 4 (0.8) 1 0.2 0 40.8=5→

S2 0 48 -0.4 0 -0.6 1 ---

Z=20 Zj 4 5 1 0

Zj-Cj 0↑ 0 1 0

So, the entering variable is x1.

Minimum ratio is 5 and its row index is 1. So, the leaving basis variable is x2.

∴ The pivot element is 0.8.

Entering =x1, Departing =x2


Iteration-3 Cj 4 5 0 0

B CB XB x1 x2 S1 S2 MinRatio
x1 4 5 1 1.25 0.25 0

S2 0 50 0 0.5 -0.5 1

Z=20 Zj 4 5 1 0

Zj-Cj 0 0 1 0

Since all Zj-Cj≥0

Hence, optimal solution is arrived with value of variables as :


x1=5,x2=0

Max Z=20

2. Use simplex method to solve the following linear programming problem


Minimize 2𝑥1 + 𝑥2
subject to
2𝑥1 + 𝑥2 ≤ 10
2𝑥1 + 5𝑥2 ≤ 50
𝑥1 , 𝑥2 ≥ 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

After introducing slack variables

Iteratio
Cj 2 1 0 0
n-1

C S S MinRa
B XB x1 x2 tio
B 1 2

S1 0 10 2 1 1 0
S2 0 50 2 5 0 1
Z=0 Zj 0 0 0 0
Zj-
-2 -1 0 0
Cj

Since all Zj-Cj≤0

Hence, optimal solution is arrived with value of variables as :


x1=0,x2=0

Min Z=0

3. Using two phase method, solve the following linear programming problem
Minimize 3𝑥1 + 𝑥2
subject to
𝑥1 + 𝑥2 ≥ 1
2𝑥1 + 3𝑥2 ≥ 2
𝑥1 , 𝑥2 ≥ 0

-->Phase-1<--

The problem is converted to canonical form by adding slack, surplus and artificial
variables as appropriate

1. As the constraint-1 is of type '≥' we should subtract surplus variable S1 and add
artificial variable A1

2. As the constraint-2 is of type '≥' we should subtract surplus variable S2 and add
artificial variable A2

After introducing surplus, artificial variables

Iteration-1

Cj 0 0 0 0 1 1
B CB XB x1 x2 S1 S2 A1 A2 MinRatio XB/x2

A1 1 1 1 1 -1 0 1 0 1/1 = 1

A2 1 2 2 (3) 0 -1 0 1 2/3=0.6667→

z=6 Zj 3 4 -1 -1 1 1
Zj-Cj 3 4↑ -1 -1 0 0

Positive maximum Zj-Cj is 4 and its column index is 2. So, the entering variable is x2.

Minimum ratio is 0.6667 and its row index is 2. So, the leaving basis variable is A2.
∴ The pivot element is 3.

Entering =x2, Departing =A2

Iteration-2
Cj 0 0 0 0 1
B CB XB x1 x2 S1 S2 A1 MinRatio XB/x1

A1 1 0.3333 (0.3333) 0 -1 0.3333 1


0.3333/0.3333=1→
x2 0 0.6667 0.6667 1 0 -0.3333 0
0.6667/0.6667=1
z=0.3333 Zj 0.3333 0 -1 0.3333 1
Zj-Cj 0.3333↑ 0 -1 0.3333 0

Positive maximum Zj-Cj is 0.3333 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 0.3333. Entering =x1, Departing =A1,

Iteration-3
Cj 0 0 0 0
B CB XB x1 x2 S1 S2 MinRatio
x1 0 1 1 0 -3 1
x2 0 0 0 1 2 -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=1,x2=0

Min z=0
->Phase-2<--

we eliminate the artificial variables and change the objective function for the original,
Min z=3x1+x2+0S1+0S2

Iteratio
Cj 3 1 0 0
n-1
MinRa
C x x S S tio
B XB
B 1 2 1 2 XBS2

(
- 11=1→
x1 3 1 1 0 1
3
)
- ---
x2 1 0 0 1 2
1
-
z=3 Zj 3 1 2
7
Zj- - 2
0 0
Cj 7 ↑
Positive maximum Zj-Cj is 2 and its column index is 4. So, the entering variable is S2.

Minimum ratio is 1 and its row index is 1. So, the leaving basis variable is x1.

∴ The pivot element is 1.

Entering =S2, Departing =x1

Iteration-2
Cj 3 1 0 0
B CB XB x1 x2 S1 S2 MinRatio
S2 0 1 1 0 -3 1
x2 1 1 1 1 -1 0
z=1 Zj 1 1 -1 0
Zj-Cj -2 0 -1 0

Since all Zj-Cj≤0

Hence, optimal solution is arrived with value of variables as :


x1=0,x2=1

Min z=1

4. Use the Big-M method to solve the following linear programming problem
Maximize 𝑥1 + 2𝑥2 + 3𝑥3
subject to
2𝑥1 + 𝑥2 + 𝑥3 ≤ 4
3𝑥1 + 4𝑥2 + 2𝑥3 ≥ 12
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
The problem is converted to canonical form by adding slack, surplus and artificial
variables as appropriate

1. As the constraint-1 is of type '≤' we should add slack variable S1

2. As the constraint-2 is of type '≥' we should subtract surplus variable S2 and add
artificial variable A1

After introducing slack, surplus, artificial variables

Iteration-1
Cj 1 2 3 0 0 -M
B CB XB x1 x2 x3 S1 S2 A1MinRatioXB/x2

S1 0 4 2 1 1 1 0 0 4/1=4
A1 -M 12 3 (4) 2 0 -1 1 12/4=3→
Z=-12M Zj -3M -4M -2M 0 M -M
Zj-Cj -3M-1 -4M-2↑ -2M-3 0 M 0

Negative minimum Zj-Cj is -4M-2 and its column index is 2. So, the entering variable
is x2.
Minimum ratio is 3 and its row index is 2. So, the leaving basis variable is A1.

∴ The pivot element is 4.

Entering =x2, Departing =A1


Iteration-2
Cj 1 2 3 0 0
B CB XB x1 x2 x3 S1 S2 MinRatioXB/x3
S1 0 1 1.25 0 (0.5) 1 0.25 1/0.5=2→
x2 2 3 0.75 1 0.5 0 -0.25 3/0.5=6
Z=6 Zj 1.5 2 1 0 -0.5
Zj-Cj 0.5 0 -2↑ 0 -0.5
Negative minimum Zj-Cj is -2 and its column index is 3. So, the entering variable is x3.

Minimum ratio is 2 and its row index is 1. So, the leaving basis variable is S1.

∴ The pivot element is 0.5. Entering =x3, Departing =S1,


Iteration-3
Cj 1 2 3 0 0
B CB XB x1 x2 x3 S1 S2 MinRatio
x3 3 2 2.5 0 1 2 0.5
x2 2 2 -0.5 1 0 -1 -0.5
Z=10 Zj 6.5 2 3 4 0.5
Zj-Cj 5.5 0 0 4 0.5

Since all Zj-Cj≥0

Hence, optimal solution is arrived with value of variables as :


x1=0,x2=2,x3=2

Max Z=10

5. A company has four warehouses a, b, c and d. It is required to deliver a product from


these warehouses to three customers A, B and C. The warehouses have the following
amounts in the stock

Warehouse a b c d

No. of units 15 15 20 10

and the customer’s requirements are


Customer’s A B C
No. of units 25 20 15

The table below shows the costs of transporting one unit from warehouses to the customers

a b c d

A 8 9 6 3

B 6 11 5 10

C 3 8 7 9

Find the optimal schedule and minimum transportation cost.

Solution:

The rim values for S1=25 and D1=15 are compared.

The smaller of the two i.e. min(25,15) = 15 is assigned to S1 D1

This meets the complete demand of D1 and leaves 25 - 15=10 units with S1

Table-1
D1 D2 D3 D4 Supply

S1 8(15) 9 6 3 10

S2 6 11 5 10 20

S3 3 8 7 9 15

Demand 0 15 20 10

Move horizontally,

The rim values for S1=10 and D2=15 are compared.

The smaller of the two i.e. min(10,15) = 10 is assigned to S1 D2

This exhausts the capacity of S1 and leaves 15 - 10=5 units with D2

Table-2
D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11 5 10 20

S3 3 8 7 9 15

Demand 0 5 20 10

Move vertically,

The rim values for S2=20 and D2=5 are compared.

The smaller of the two i.e. min(20,5) = 5 is assigned to S2 D2

This meets the complete demand of D2 and leaves 20 - 5=15 units with S2
Table-3
D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5 10 15
S3 3 8 7 9 15

Demand 0 0 20 10

Move horizontally,

The rim values for S2=15 and D3=20 are compared.

The smaller of the two i.e. min(15,20) = 15 is assigned to S2 D3

This exhausts the capacity of S2 and leaves 20 - 15=5 units with D3


Table-4

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7 9 15

Demand 0 0 5 10

Move vertically,

The rim values for S3=15 and D3=5 are compared.

The smaller of the two i.e. min(15,5) = 5 is assigned to S3 D3

This meets the complete demand of D3 and leaves 15 - 5=10 units with S3

Table-5

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7(5) 9 10

Demand 0 0 0 10
Move horizontally,

The rim values for S3=10 and D4=10 are compared.

The smaller of the two i.e. min(10,10) = 10 is assigned to S3 D4

Table-6
D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7(5) 9(10) 0

Demand 0 0 0 0

Initial feasible solution is

D1 D2 D3 D4 Supply

S1 8 (15) 9 (10) 6 3 25

S2 6 11 (5) 5 (15) 10 20

S3 3 8 7 (5) 9 (10) 15

Demand 15 15 20 10

The minimum total transportation cost =8×15+9×10+11×5+5×15+7×5+9×10=465

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


Optimality test using modi method...
Allocation Table is

D1 D2 D3 D4 Supply
S1 8 (15) 9 (10) 6 3 25

S2 6 11 (5) 5 (15) 10 20

S3 3 8 7 (5) 9 (10) 15

Demand 15 15 20 10

Iteration-1 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=8-0⇒v1=8

3.c12=u1+v2⇒v2=c12-u1⇒v2=9-0⇒v2=9

4.c22=u2+v2⇒u2=c22-v2⇒u2=11-9⇒u2=2

5.c23=u2+v3⇒v3=c23-u2⇒v3=5-2⇒v3=3

6.c33=u3+v3⇒u3=c33-v3⇒u3=7-3⇒u3=4

7.c34=u3+v4⇒v4=c34-u3⇒v4=9-4⇒v4=5

D2 D3 D4 Supply ui
D1

S1 8 (15) 9 (10) 6 3 25 u1=0

S2 6 11 (5) 5 (15) 10 20 u2=2

S3 3 8 7 (5) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

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


1.d13=c13-(u1+v3)=6-(0+3)=3

2.d14=c14-(u1+v4)=3-(0+5)=-2
3.d21=c21-(u2+v1)=6-(2+8)=-4

4.d24=c24-(u2+v4)=10-(2+5)=3

5.d31=c31-(u3+v1)=3-(4+8)=-9

6.d32=c32-(u3+v2)=8-(4+9)=-5

D2 D3 D4 Supply ui
D1

S1 8 (15) 9 (10) 6 [3] 3 [-2] 25 u1=0

S2 6 [-4] 11 (5) 5 (15) 10 [3] 20 u2=2

S3 3 [-9] 8 [-5] 7 (5) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

Now choose the minimum negative value from all dij (opportunity cost) = d31 = [-9]
and draw a closed path from S3D1.

Closed path is S3D1→S3D3→S2D3→S2D2→S1D2→S1D1

Closed path and plus/minus sign allocation...

D2 D3 D4 Supply ui
D1

S1 8 (15) (-) 9 (10) (+) 6 [3] 3 [-2] 25 u1=0

S2 6 [-4] 11 (5) (-) 5 (15) (+) 10 [3] 20 u2=2

S3 3 [-9] (+) 8 [-5] 7 (5) (-) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

Minimum allocated value among all negative position (-) on closed path = 5
Substract 5 from all (-) and Add it to all (+)
D2 D3 D4 Supply
D1

S1 8 (10) 9 (15) 6 3 25

S2 6 11 5 (20) 10 20

S3 3 (5) 8 7 9 (10) 15

Demand 15 15 20 10

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


Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6
∴ This solution is degenerate

The quantity d is assigned to S1D3, which has the minimum transportation cost = 6.

D1 D2 D3 D4 Supply

S1 8 (10) 9 (15) 6 (d) 3 25

S2 6 11 5 (20) 10 20

S3 3 (5) 8 7 9 (10) 15

Demand 15 15 20 10

Iteration-2 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=8-0⇒v1=8

3.c31=u3+v1⇒u3=c31-v1⇒u3=3-8⇒u3=-5

4.c34=u3+v4⇒v4=c34-u3⇒v4=9+5⇒v4=14

5.c12=u1+v2⇒v2=c12-u1⇒v2=9-0⇒v2=9

6.c13=u1+v3⇒v3=c13-u1⇒v3=6-0⇒v3=6
7.c23=u2+v3⇒u2=c23-v3⇒u2=5-6⇒u2=-1

D1 D2 D3 D4 Supply ui

S1 8 (10) 9 (15) 6 (d) 3 25 u1=0

S2 6 11 5 (20) 10 20 u2=-1

S3 3 (5) 8 7 9 (10) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14

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


1.d14=c14-(u1+v4)=3-(0+14)=-11

2.d21=c21-(u2+v1)=6-(-1+8)=-1

3.d22=c22-(u2+v2)=11-(-1+9)=3

4.d24=c24-(u2+v4)=10-(-1+14)=-3

5.d32=c32-(u3+v2)=8-(-5+9)=4

6.d33=c33-(u3+v3)=7-(-5+6)=6
D1 D2 D3 D4 Supply ui

S1 8 (10) 9 (15) 6 (d) 3 [-11] 25 u1=0

S2 6 [-1] 11 [3] 5 (20) 10 [-3] 20 u2=-1

S3 3 (5) 8 [4] 7 [6] 9 (10) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14

Now choose the minimum negative value from all dij (opportunity cost) = d14 = [-11]

and draw a closed path from S1D4.


Closed path is S1D4→S1D1→S3D1→S3D4

Closed path and plus/minus sign allocation...

D2 D3 D4 Supply ui
D1

S1 8 (10) (-) 9 (15) 6 (d) 3 [-11] (+) 25 u1=0

S2 6 [-1] 11 [3] 5 (20) 10 [-3] 20 u2=-1

S3 3 (5) (+) 8 [4] 7 [6] 9 (10) (-) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14

Minimum allocated value among all negative position (-) on closed path = 10
Subtract 10 from all (-) and Add it to all (+)

D1 D2 D3 D4 Supply

S1 8 9 (15) 6 (d) 3 (10) 25

S2 6 11 5 (20) 10 20

S3 3 (15) 8 7 9 15

Demand 15 15 20 10

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

Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is degenerate

The quantity d is assigned to S2D1, which has the minimum transportation cost = 6.

D1 D2 D3 D4 Supply
S1 8 9 (15) 6 (d) 3 (10) 25

S2 6 (d) 11 5 (20) 10 20

S3 3 (15) 8 7 9 15

Demand 15 15 20 10

Iteration-3 of optimality test


1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj

Find Solution using North-West Corner method, also find optimal solution using modi
method

D1 D2 D3 D4 Supply

S1 8 9 6 3 25

S2 6 11 5 10 20

S3 3 8 7 9 15

Demand 15 15 20 10

Solution:
TOTAL number of supply constraints : 3
TOTAL number of demand constraints : 4
Problem Table is

D1 D2 D3 D4 Supply

S1 8 9 6 3 25

S2 6 11 5 10 20

S3 3 8 7 9 15
Demand 15 15 20 10

The rim values for S1=25 and D1=15 are compared.

The smaller of the two i.e. min(25,15) = 15 is assigned to S1 D1

This meets the complete demand of D1 and leaves 25 - 15=10 units with S1

Table-1

D1 D2 D3 D4 Supply

S1 8(15) 9 6 3 10

S2 6 11 5 10 20

S3 3 8 7 9 15

Demand 0 15 20 10

Move horizontally,

The rim values for S1=10 and D2=15 are compared.

The smaller of the two i.e. min(10,15) = 10 is assigned to S1 D2

This exhausts the capacity of S1 and leaves 15 - 10=5 units with D2

Table-2

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11 5 10 20

S3 3 8 7 9 15
Demand 0 5 20 10

Move vertically,

The rim values for S2=20 and D2=5 are compared.

The smaller of the two i.e. min(20,5) = 5 is assigned to S2 D2

This meets the complete demand of D2 and leaves 20 - 5=15 units with S2

Table-3

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5 10 15

S3 3 8 7 9 15

Demand 0 0 20 10

Move horizontally,

The rim values for S2=15 and D3=20 are compared.

The smaller of the two i.e. min(15,20) = 15 is assigned to S2 D3

This exhausts the capacity of S2 and leaves 20 - 15=5 units with D3

Table-4

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7 9 15
Demand 0 0 5 10

Move vertically,

The rim values for S3=15 and D3=5 are compared.

The smaller of the two i.e. min(15,5) = 5 is assigned to S3 D3

This meets the complete demand of D3 and leaves 15 - 5=10 units with S3

Table-5

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7(5) 9 10

Demand 0 0 0 10

Move horizontally,

The rim values for S3=10 and D4=10 are compared.

The smaller of the two i.e. min(10,10) = 10 is assigned to S3 D4

Table-6

D1 D2 D3 D4 Supply

S1 8(15) 9(10) 6 3 0

S2 6 11(5) 5(15) 10 0

S3 3 8 7(5) 9(10) 0
Demand 0 0 0 0

Initial feasible solution is

D1 D2 D3 D4 Supply

S1 8 (15) 9 (10) 6 3 25

S2 6 11 (5) 5 (15) 10 20

S3 3 8 7 (5) 9 (10) 15

Demand 15 15 20 10

The minimum total transportation cost =8×15+9×10+11×5+5×15+7×5+9×10=465

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is non-degenerate

Optimality test using modi method...


Allocation Table is

D1 D2 D3 D4 Supply

S1 8 (15) 9 (10) 6 3 25

S2 6 11 (5) 5 (15) 10 20

S3 3 8 7 (5) 9 (10) 15

Demand 15 15 20 10

Iteration-1 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=8-0⇒v1=8

3.c12=u1+v2⇒v2=c12-u1⇒v2=9-0⇒v2=9

4.c22=u2+v2⇒u2=c22-v2⇒u2=11-9⇒u2=2

5.c23=u2+v3⇒v3=c23-u2⇒v3=5-2⇒v3=3

6.c33=u3+v3⇒u3=c33-v3⇒u3=7-3⇒u3=4

7.c34=u3+v4⇒v4=c34-u3⇒v4=9-4⇒v4=5

D1 D2 D3 D4 Supply ui

S1 8 (15) 9 (10) 6 3 25 u1=0

S2 6 11 (5) 5 (15) 10 20 u2=2

S3 3 8 7 (5) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

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

1.d13=c13-(u1+v3)=6-(0+3)=3

2.d14=c14-(u1+v4)=3-(0+5)=-2

3.d21=c21-(u2+v1)=6-(2+8)=-4

4.d24=c24-(u2+v4)=10-(2+5)=3

5.d31=c31-(u3+v1)=3-(4+8)=-9

6.d32=c32-(u3+v2)=8-(4+9)=-5

D1 D2 D3 D4 Supply ui
S1 8 (15) 9 (10) 6 [3] 3 [-2] 25 u1=0

S2 6 [-4] 11 (5) 5 (15) 10 [3] 20 u2=2

S3 3 [-9] 8 [-5] 7 (5) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

3. Now choose the minimum negative value from all dij (opportunity cost) = d31 = [-9]

and draw a closed path from S3D1.

Closed path is S3D1→S3D3→S2D3→S2D2→S1D2→S1D1

Closed path and plus/minus sign allocation...

D1 D2 D3 D4 Supply ui

S1 8 (15) (-) 9 (10) (+) 6 [3] 3 [-2] 25 u1=0

S2 6 [-4] 11 (5) (-) 5 (15) (+) 10 [3] 20 u2=2

S3 3 [-9] (+) 8 [-5] 7 (5) (-) 9 (10) 15 u3=4

Demand 15 15 20 10

vj v1=8 v2=9 v3=3 v4=5

4. Minimum allocated value among all negative position (-) on closed path = 5
Substract 5 from all (-) and Add it to all (+)

D1 D2 D3 D4 Supply

S1 8 (10) 9 (15) 6 3 25

S2 6 11 5 (20) 10 20
S3 3 (5) 8 7 9 (10) 15

Demand 15 15 20 10

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

Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is degenerate

The quantity d is assigned to S1D3, which has the minimum transportation cost = 6.

D1 D2 D3 D4 Supply

S1 8 (10) 9 (15) 6 (d) 3 25

S2 6 11 5 (20) 10 20

S3 3 (5) 8 7 9 (10) 15

Demand 15 15 20 10

Iteration-2 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=8-0⇒v1=8

3.c31=u3+v1⇒u3=c31-v1⇒u3=3-8⇒u3=-5

4.c34=u3+v4⇒v4=c34-u3⇒v4=9+5⇒v4=14

5.c12=u1+v2⇒v2=c12-u1⇒v2=9-0⇒v2=9

6.c13=u1+v3⇒v3=c13-u1⇒v3=6-0⇒v3=6
7.c23=u2+v3⇒u2=c23-v3⇒u2=5-6⇒u2=-1

D1 D2 D3 D4 Supply ui

S1 8 (10) 9 (15) 6 (d) 3 25 u1=0

S2 6 11 5 (20) 10 20 u2=-1

S3 3 (5) 8 7 9 (10) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14

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

1.d14=c14-(u1+v4)=3-(0+14)=-11

2.d21=c21-(u2+v1)=6-(-1+8)=-1

3.d22=c22-(u2+v2)=11-(-1+9)=3

4.d24=c24-(u2+v4)=10-(-1+14)=-3

5.d32=c32-(u3+v2)=8-(-5+9)=4

6.d33=c33-(u3+v3)=7-(-5+6)=6

D1 D2 D3 D4 Supply ui

S1 8 (10) 9 (15) 6 (d) 3 [-11] 25 u1=0

S2 6 [-1] 11 [3] 5 (20) 10 [-3] 20 u2=-1

S3 3 (5) 8 [4] 7 [6] 9 (10) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14


3. Now choose the minimum negative value from all dij (opportunity cost) = d14 = [-11]

and draw a closed path from S1D4.

Closed path is S1D4→S1D1→S3D1→S3D4

Closed path and plus/minus sign allocation...

D1 D2 D3 D4 Supply ui

S1 8 (10) (-) 9 (15) 6 (d) 3 [-11] (+) 25 u1=0

S2 6 [-1] 11 [3] 5 (20) 10 [-3] 20 u2=-1

S3 3 (5) (+) 8 [4] 7 [6] 9 (10) (-) 15 u3=-5

Demand 15 15 20 10

vj v1=8 v2=9 v3=6 v4=14

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 8 9 (15) 6 (d) 3 (10) 25

S2 6 11 5 (20) 10 20

S3 3 (15) 8 7 9 15

Demand 15 15 20 10

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


Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6
∴ This solution is degenerate

The quantity d is assigned to S2D1, which has the minimum transportation cost = 6.

D1 D2 D3 D4 Supply

S1 8 9 (15) 6 (d) 3 (10) 25

S2 6 (d) 11 5 (20) 10 20

S3 3 (15) 8 7 9 15

Demand 15 15 20 10

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.c12=u1+v2⇒v2=c12-u1⇒v2=9-0⇒v2=9

3.c13=u1+v3⇒v3=c13-u1⇒v3=6-0⇒v3=6

4.c23=u2+v3⇒u2=c23-v3⇒u2=5-6⇒u2=-1

5.c21=u2+v1⇒v1=c21-u2⇒v1=6+1⇒v1=7

6.c31=u3+v1⇒u3=c31-v1⇒u3=3-7⇒u3=-4

7.c14=u1+v4⇒v4=c14-u1⇒v4=3-0⇒v4=3

D2 D3 D4 Supply ui
D1

S1 8 9 (15) 6 (d) 3 (10) 25 u1=0

S2 6 (d) 11 5 (20) 10 20 u2=-1


S3 3 (15) 8 7 9 15 u3=-4

Demand 15 15 20 10

vj v1=7 v2=9 v3=6 v4=3

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

1.d11=c11-(u1+v1)=8-(0+7)=1

2.d22=c22-(u2+v2)=11-(-1+9)=3

3.d24=c24-(u2+v4)=10-(-1+3)=8

4.d32=c32-(u3+v2)=8-(-4+9)=3

5.d33=c33-(u3+v3)=7-(-4+6)=5

6.d34=c34-(u3+v4)=9-(-4+3)=10

D2 D3 D4 Supply ui
D1

S1 8 [1] 9 (15) 6 (d) 3 (10) 25 u1=0

S2 6 (d) 11 [3] 5 (20) 10 [8] 20 u2=-1

S3 3 (15) 8 [3] 7 [5] 9 [10] 15 u3=-4

Demand 15 15 20 10

vj v1=7 v2=9 v3=6 v4=3

Since all dij≥0.

So final optimal solution is arrived.

D1 D2 D3 D4 Supply

S1 8 9 (15) 6 (d) 3 (10) 25

S2 6 (d) 11 5 (20) 10 20
S3 3 (15) 8 7 9 15

Demand 15 15 20 10

The minimum total transportation cost =9×15+3×10+5×20+3×15=310

6. For the following cost minimizing transportation problem, find the initial basic feasible
solution by using North-West corner rule, Least cost method and Vogel’s approximation
method. Compare the three solutions (in terms of cost)

A B C D Supply

I 23 19 21 17 20

II 20 17 18 24 15

III 30 25 16 39 15

Demand 15 10 10 15

Solution:
North-West corner rule
The rim values for S1=20 and D1=15 are compared.

The smaller of the two i.e. min(20,15) = 15 is assigned to S1 D1

This meets the complete demand of D1 and leaves 20 - 15=5 units with S1

Table-1
D1 D2 D3 D4 Supply
S1 23(15) 19 21 17 5
S2 20 17 18 24 15
S3 30 25 16 39 15
Demand 0 10 10 15

Move horizontally,
The rim values for S1=5 and D2=10 are compared.

The smaller of the two i.e. min(5,10) = 5 is assigned to S1 D2

This exhausts the capacity of S1 and leaves 10 - 5=5 units with D2

Table-2

D1 D2 D3 D4 Supply
S1 23(15) 19(5) 21 17 0
S2 20 17 18 24 15
S3 30 25 16 39 15
Demand 0 5 10 15

Move vertically,

The rim values for S2=15 and D2=5 are compared.

The smaller of the two i.e. min(15,5) = 5 is assigned to S2 D2

This meets the complete demand of D2 and leaves 15 - 5=10 units with S2
Table-3
D1 D2 D3 D4 Supply
S1 23(15) 19(5) 21 17 0
S2 20 17(5) 18 24 10
S3 30 25 16 39 15
Demand 0 0 10 15

Move horizontally,

The rim values for S2=10 and D3=10 are compared.

The smaller of the two i.e. min(10,10) = 10 is assigned to S2 D3

This exhausts the capacity of S2 and leaves 10 - 10=0 units with D3


Table-4
D1 D2 D3 D4 Supply
S1 23(15) 19(5) 21 17 0
S2 20 17(5) 18(10) 24 0
S3 30 25 16 39 15
Demand 0 0 0 15

Move vertically,

The rim values for S3=15 and D3=0 are compared.


The smaller of the two i.e. min(15,0) = 0 is assigned to S3 D3

This meets the complete demand of D3 and leaves 15 - 0=15 units with S3
Table-5
D1 D2 D3 D4 Supply
S1 23(15) 19(5) 21 17 0
S2 20 17(5) 18(10) 24 0
S3 30 25 16 39 15
Demand 0 0 0 15

Move horizontally,

The rim values for S3=15 and D4=15 are compared.

The smaller of the two i.e. min(15,15) = 15 is assigned to S3 D4


Table-6
D1 D2 D3 D4 Supply
S1 23(15) 19(5) 21 17 0
S2 20 17(5) 18(10) 24 0
S3 30 25 16 39(15) 0
Demand 0 0 0 0

Initial feasible solution is


D1 D2 D3 D4 Supply
S1 23 (15) 19 (5) 21 17 20
S2 20 17 (5) 18 (10) 24 15
S3 30 25 16 39 (15) 15
Demand 15 10 10 15
The minimum total transportation cost =23×15+19×5+17×5+18×10+39×15=1290

Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is degenerate

LEAST COST METHOD

The smallest transportation cost is 16 in cell S3D3

The allocation to this cell is min(15,10) = 10.


This satisfies the entire demand of D3 and leaves 15 - 10=5 units with S3
Table-1
D1 D2 D3 D4 Supply
S1 23 19 21 17 20
S2 20 17 18 24 15
S3 30 25 16(10) 39 5
Demand 15 10 0 15

The smallest transportation cost is 17 in cell S1D4

The allocation to this cell is min(20,15) = 15.


This satisfies the entire demand of D4 and leaves 20 - 15=5 units with S1
Table-2
D1 D2 D3 D4 Supply
S1 23 19 21 17(15) 5
S2 20 17 18 24 15
S3 30 25 16(10) 39 5
Demand 15 10 0 0

The smallest transportation cost is 17 in cell S2D2

The allocation to this cell is min(15,10) = 10.


This satisfies the entire demand of D2 and leaves 15 - 10=5 units with S2

Table-3
D1 D2 D3 D4 Supply
S1 23 19 21 17(15) 5
S2 20 17(10) 18 24 5
S3 30 25 16 (10) 39 5
Demand 15 0 0 0

The smallest transportation cost is 20 in cell S2D1

The allocation to this cell is min(5,15) = 5.


This exhausts the capacity of S2 and leaves 15 - 5=10 units with D1

Table-4
D1 D2 D3 D4 Supply
S1 23 19 21 17(15) 5
S2 20(5) 17(10) 18 24 0
S3 30 25 16(10) 39 5
Demand 10 0 0 0

The smallest transportation cost is 23 in cell S1D1

The allocation to this cell is min(5,10) = 5.

This exhausts the capacity of S1 and leaves 10 - 5=5 units with D1


Table-5
D1 D2 D3 D4 Supply
S1 23(5) 19 21 17(15) 0
S2 20(5) 17(10) 18 24 0
S3 30 25 16(10) 39 5
Demand 5 0 0 0
The smallest transportation cost is 30 in cell S3D1

The allocation to this cell is min(5,5) = 5.

Table-6
D1 D2 D3 D4 Supply
S1 23(5) 19 21 17(15) 0
S2 20(5) 17(10) 18 24 0
S3 30(5) 25 16(10) 39 0
Demand 0 0 0 0
Initial feasible solution is
D1 D2 D3 D4 Supply
S1 23 (5) 19 21 17 (15) 20
S2 20 (5) 17 (10) 18 24 15
S3 30 (5) 25 16 (10) 39 15
Demand 15 10 10 15

The minimum total transportation cost =23×5+17×15+20×5+17×10+30×5+16×10=950

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is non-degenerate

VOGEL’S APPROXIMATION METHOD

Table-1
D1 D2 D3 D4 Supply Row Penalty
S1 23 19 21 17 20 2=19-17
S2 20 17 18 24 15 1=18-17
S3 30 25 16 39 15 9=25-16
Demand 15 10 10 15
Column
3=23-20 2=19-17 2=18-16 7=24-17
Penalty

The maximum penalty, 9, occurs in row S3.

The minimum cij in this row is c33=16.

The maximum allocation in this cell is min(15,10) = 10.


It satisfy demand of D3 and adjust the supply of S3 from 15 to 5 (15 - 10=5).
Table-2
D1 D2 D3 D4 Supply Row Penalty
S1 23 19 21 17 20 2=19-17
S2 20 17 18 24 15 3=20-17
S3 30 25 16(10) 39 5 5=30-25
Demand 15 10 0 15
Column
3=23-20 2=19-17 -- 7=24-17
Penalty
The maximum penalty, 7, occurs in column D4.

The minimum cij in this column is c14=17.


The maximum allocation in this cell is min(20,15) = 15.
It satisfy demand of D4 and adjust the supply of S1 from 20 to 5 (20 - 15=5).
Table-3
D1 D2 D3 D4 Supply Row Penalty
S1 23 19 21 17(15) 5 4=23-19
S2 20 17 18 24 15 3=20-17
S3 30 25 16(10) 39 5 5=30-25
Demand 15 10 0 0
Column
3=23-20 2=19-17 -- --
Penalty

The maximum penalty, 5, occurs in row S3.

The minimum cij in this row is c32=25.

The maximum allocation in this cell is min(5,10) = 5.


It satisfy supply of S3 and adjust the demand of D2 from 10 to 5 (10 - 5=5).
Table-4
D1 D2 D3 D4 Supply Row Penalty
S1 23 19 21 17(15) 5 4=23-19
S2 20 17 18 24 15 3=20-17
S3 30 25(5) 16(10) 39 0 --
Demand 15 5 0 0
Column
3=23-20 2=19-17 -- --
Penalty

The maximum penalty, 4, occurs in row S1.

The minimum cij in this row is c12=19.

The maximum allocation in this cell is min(5,5) = 5.


It satisfy supply of S1 and demand of D2.

Table-5
D1 D2 D3 D4 Supply Row Penalty
S1 23 19(5) 21 17(15) 0 --
18 24
S2 20 17 15 20

S3 30 25(5) 16(10) 39 0 --
Demand 15 0 0 0
Column
20 -- -- --
Penalty

The maximum penalty, 20, occurs in row S2.

The minimum cij in this row is c21=20.

The maximum allocation in this cell is min(15,15) = 15.


It satisfy supply of S2 and demand of D1.

Initial feasible solution is


D1 D2 D3 D4 Supply Row Penalty
S1 23 19(5) 21 17(15) 20 2 | 2 | 4 | 4 | -- |
S2 20(15) 17 18 24 15 1 | 3 | 3 | 3 | 20 |
S3 30 25(5) 16(10) 39 15 9 | 5 | 5 | -- | -- |
Demand 15 10 10 15
3 2 2 7
3 2 -- 7
Column
3 2 -- --
Penalty
3 2 -- --
20 -- -- --

The minimum total transportation cost =19×5+17×15+20×15+25×5+16×10=935

Here, the number of allocated cells = 5, which is one less than to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is degenerate

7. A company is faced with the problem of assigning six different machines to six different
jobs. Determine the optimal solution of the assignment problem with the following cost
matrix
A B C D E F
1 19 22 28 21 19 27
2 53 58 53 79 63 28
3 41 28 91 37 41 33
4 19 42 27 49 27 32
5 36 18 57 22 25 18
6 31 56 53 31 17 28

Solution:
Find out the each row minimum element and subtract it from that row

1 2 3 4 5 6
A 0 3 9 2 0 8 (-19)
B 25 30 25 51 35 0 (-28)
C 13 0 63 9 13 5 (-28)
D 0 23 8 30 8 13 (-19)
E 18 0 39 4 7 0 (-18)
F 14 39 36 14 0 11 (-17)

Find out the each column minimum element and subtract it from that column.

1 2 3 4 5 6

A 0 3 1 0 0 8
B 25 30 17 49 35 0
C 13 0 55 7 13 5
D
0 23 0 28 8 13

E 18 0 31 2 7 0
F 14 39 28 12 0 11
(- (- (- (- (- (-
0) 0) 8) 2) 0) 0)

Iteration-1 of steps 3 to 6
Step-3: Make assignment in the opportunity cost table
(1) Rowwise cell (B,6) is assigned, so columnwise cell (E,6) crossed off.
(2) Rowwise cell (C,2) is assigned, so columnwise cell (E,2) crossed off.

(3) Rowwise cell (F,5) is assigned, so columnwise cell (A,5) crossed off.

(4) Columnwise cell (D,3) is assigned, so rowwise cell (D,1) crossed off.

(5) Columnwise cell (A,1) is assigned, so rowwise cell (A,4) crossed off.

Rowwise & columnwise assignment shown in table


1 2 3 4 5 6
A [0] 3 1 0 0 8
B 25 30 17 49 35 [0]
C 13 [0] 55 7 13 5
D 0 23 [0] 28 8 13
E 18 0 31 2 7 0
F 14 39 28 12 [0] 11

Step-4: Number of assignments = 5, number of rows = 6


Which is not equal, so solution is not optimal.

Step-5: Draw a set of horizontal and vertical lines to cover all the 0
Step-5: Cover the 0 with minimum number of lines
(1) Mark(✓) row E since it has no assignment

(2) Mark(✓) column 2 since row E has 0 in this column

(3) Mark(✓) column 6 since row E has 0 in this column

(4) Mark(✓) row C since column 2 has an assignment in this row C.

(5) Mark(✓) row B since column 6 has an assignment in this row B.

(6) Since no other rows or columns can be marked, therefore draw straight lines through the
unmarked rows A,D,F and marked columns 2,6
Tick mark not allocated rows and allocated columns
1 2 3 4 5 6
A [0] 3 1 0 0 8
B 25 30 17 49 35 [0] ✓(5)
C 13 [0] 55 7 13 5 ✓(4)
D 0 23 [0] 28 8 13
E 18 0 31 2 7 0 ✓(1)
F 14 39 28 12 [0] 11
✓ ✓
(2) (3)

Step-6: Develop the new revised table by selecting the smallest element, among the cells not
covered by any line (say k = 2)
Subtract k = 2 from every element in the cell not covered by a line.
Add k = 2 to every elment in the intersection cell of two lines.

1 2 3 4 5 6
A 0 5 1 0 0 10
B 23 30 15 47 33 0
C 11 0 53 5 11 5
D 0 25 0 28 8 15
E 16 0 29 0 5 0
F 14 41 28 12 0 13

Repeat steps 3 to 6 until an optimal solution is obtained.


Iteration : 1
Iteration-2 of steps 3 to 6
Step-3: Make assignment in the opporunity cost table
(1) Rowwise cell (B,6) is assigned, so columnwise cell (E,6) crossed off.

(2) Rowwise cell (C,2) is assigned, so columnwise cell (E,2) crossed off.

(3) Rowwise cell (E,4) is assigned, so columnwise cell (A,4) crossed off.

(4) Rowwise cell (F,5) is assigned, so columnwise cell (A,5) crossed off.

(5) Rowwise cell (A,1) is assigned, so columnwise cell (D,1) crossed off.

(6) Rowwise cell (D,3) is assigned


Rowwise & columnwise assignment shown in table
1 2 3 4 5 6
A [0] 5 1 0 0 10
B 23 30 15 47 33 [0]
C 11 [0] 53 5 11 5
D 0 25 [0] 28 8 15
E 16 0 29 [0] 5 0
F 14 41 28 12 [0] 13

Step-4: Number of assignments = 6, number of rows = 6


Which is equal, so solution is optimal

Optimal assignments are


1 2 3 4 5 6
A [0] 5 1 0 0 10
B 23 30 15 47 33 [0]
C 11 [0] 53 5 11 5
D 0 25 [0] 28 8 15
E 16 0 29 [0] 5 0
F 14 41 28 12 [0] 13

Optimal solution is
Work Job Cost
A 1 19
B 6 28
C 2 28
D 3 27
E 4 22
F 5 17
Total 141

You might also like