test_solutions LPP mixed problems
test_solutions LPP mixed problems
The problem is converted to canonical form by adding slack, surplus and artificial variables as
appropriate
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.
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
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
Z=20 Zj 4 5 1 0
Zj-Cj 0↑ 0 1 0
Minimum ratio is 5 and its row index is 1. So, the leaving basis variable is x2.
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
Max Z=20
The problem is converted to canonical form by adding slack, surplus and artificial
variables as appropiate
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
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
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.
Iteration-2
Cj 0 0 0 0 1
B CB XB x1 x2 S1 S2 A1 MinRatio XB/x1
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.
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
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.
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
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
2. As the constraint-2 is of type '≥' we should subtract surplus variable S2 and add
artificial variable A1
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.
Minimum ratio is 2 and its row index is 1. So, the leaving basis variable is S1.
Max Z=10
Warehouse a b c d
No. of units 15 15 20 10
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
Solution:
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,
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,
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,
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,
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,
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
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
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
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
Demand 15 15 20 10
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
Demand 15 15 20 10
Now choose the minimum negative value from all dij (opportunity cost) = d31 = [-9]
and draw a closed path from S3D1.
D2 D3 D4 Supply ui
D1
Demand 15 15 20 10
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
The quantity d is assigned to S1D3, which has the minimum transportation cost = 6.
D1 D2 D3 D4 Supply
S2 6 11 5 (20) 10 20
S3 3 (5) 8 7 9 (10) 15
Demand 15 15 20 10
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
S2 6 11 5 (20) 10 20 u2=-1
Demand 15 15 20 10
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
Demand 15 15 20 10
Now choose the minimum negative value from all dij (opportunity cost) = d14 = [-11]
D2 D3 D4 Supply ui
D1
Demand 15 15 20 10
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
S2 6 11 5 (20) 10 20
S3 3 (15) 8 7 9 15
Demand 15 15 20 10
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
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
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,
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,
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,
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,
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,
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
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
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
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
Demand 15 15 20 10
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
Demand 15 15 20 10
3. Now choose the minimum negative value from all dij (opportunity cost) = d31 = [-9]
D1 D2 D3 D4 Supply ui
Demand 15 15 20 10
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
The quantity d is assigned to S1D3, which has the minimum transportation cost = 6.
D1 D2 D3 D4 Supply
S2 6 11 5 (20) 10 20
S3 3 (5) 8 7 9 (10) 15
Demand 15 15 20 10
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
S2 6 11 5 (20) 10 20 u2=-1
Demand 15 15 20 10
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
Demand 15 15 20 10
D1 D2 D3 D4 Supply ui
Demand 15 15 20 10
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
S2 6 11 5 (20) 10 20
S3 3 (15) 8 7 9 15
Demand 15 15 20 10
The quantity d is assigned to S2D1, which has the minimum transportation cost = 6.
D1 D2 D3 D4 Supply
S2 6 (d) 11 5 (20) 10 20
S3 3 (15) 8 7 9 15
Demand 15 15 20 10
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
Demand 15 15 20 10
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
Demand 15 15 20 10
D1 D2 D3 D4 Supply
S2 6 (d) 11 5 (20) 10 20
S3 3 (15) 8 7 9 15
Demand 15 15 20 10
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.
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.
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,
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,
Move vertically,
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,
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
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
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
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
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
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.
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
(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
(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.
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