Simplex Method - Part 1
Simplex Method - Part 1
(Part 1)
K Karpagam
Assistant Professor of Mathematics
PG & Research Department of Mathematics
Sri Ramakrishna College of Arts & Science, Coimbatore
Simplex procedure (or) Algorithm procedure :
Step 1 :
(i)Check whether the objective function is to be maximum (or) minimum .
(ii)f it is Minimum , then convert into Maximum by Maximum Z = - (Minimum Z) .
Step : 2 : Check whether all bi’s are positive . If any of bi’s negative , Multiple both sides of the
conditions by -1 .
Step : 3 : By introducing slack (or) surplus variable , convert the inequality conditions into
equations .
Step : 4 : Find an initial basic feasible solution .
Where Cj = variable in Z
CB = basic variables in Z
YB = basic variables
XB = variables of basic variables .
Cj C1 C2 0 0 0
…
CB YB XB x1 x2 S1 S2 S3
…
CB1 S1 b1 a11 a12 1 0 0
…
CB2 S2 b2 a21 a22 0 1 0
…
.
.
.
Zj – Cj Z0 (Z1 – C1) (Z1 – C2) …
Step : 5 : Complete the net values Zj – Cj by using the realization Zj – Cj = CB aj – Cj
If Zj – Cj ≥ 0 the current base feasible solution XB is optimal .
If Zj – Cj ≤ 0 the current base feasible solution is not optimal , go to next step .
Step : 6 : To find the entering variable :
If more than one variable has same negative Z j – Cj , any of this variable may be selected .
Step : 7 : To find the leaving variable :
ϴ = Min XB ; ai > 0
ai
Step : 8 : New equation
(Zj – Cj) = old equation – [corresponding column coefficient] × [New equation]
Step : 9 : Go to step (5) and repeat the procedure until either an optimum solution is obtained .
Problems :
1. Use simplex method to solve the LPP
Maximum Z = 4x1 + 10x2
Subject to condition
2x1 + x2 ≤ 50
2x1 + 5x2 ≤ 100
2x1 + 3x2 ≤ 90 and x1 , x2 ≥ 0
Solution :
Maximum Z = 4x1 + 10x2 + 0s1 + 0s2 + 0s3
Subject to converted
2x1 + x2 + s1 + 0s2 + 0s3 = 50
2x1 + 5x2 + 0s1 + s2 + 0s3 = 100
2x1 + 3x2 + 0s1 + 0s2 + s3 = 90 and x1 , x2 , s1 , s2 , s3 ≥ 0
IBFS (Initial Basic Feasible Solution)
s1 = 50 ; s2 = 100 ; s3 = 90
Cj 4 10 0 0 0
CB YB XB (aj) x1 x2 s1 s2 s3
0 s1 50 2 1 1 0 0
0 s2 (x2) 100 2 5 0 1 0
0 s3 90 2 3 0 0 1
Zj 0 0 0 0 0 0
Zj – Cj (0 – 4) (0 – 10) 0 0 0
=-4 = -10
x
ϴ = min aB = min 50 , 100 , 90
i
1 5 3
= min {50 , 20 , 30} = > ϴ = 20
1st iteration :
Cj 4 10 0 0 0
CB YB XB x1 x2 s1 s2 s3
0 s1 30 8/5 0 1 -1/5 0
10 x2 20 2/5 1 0 1/5 0
0 s3 30 4/5 0 0 -3/5 1
Zj 200 4 10 0 2 0
Zj – Cj 200 (4 – 4) (10 – 10) 0-0 2–0 0–0
=0 =0 =0 =2 =0
Now , x2 = 100/5 , 2/5 , 5/5 , 0/5 , 1/5 , 0/5
x2 = 20 , 2/5 , 1 , 0 , 1/5 , 0
Solving
Old s1 = > 50 2 1 1 0 0
x2 × 1 = > 20 2/5 1 0 1/5 0
(-) (-) (-) (-) (-) (-)
30 8/5 0 1 -1/5 0
Old s3 = > 90 2 3 0 0 1
x2 × 3 = > 60 6/5 3 0 3/5 0
(-) (-) (-) (-) (-) (-)
30 4/5 0 0 -3/5 1
Maximum Z = 200 ; x1 = 0 and x2 = 20 .
2. Use Simplex Method
Maximum Z = x1 + x2 + 3x3
Subject to condition
3x1 + 2x2 + x3 ≤ 3
2x1 + x2 + 2x3 ≤ 2 and x1 , x2 , x3 ≥ 0
Solution :
Maximum Z = x1 + x2 + 3x3 + 0s1 + 0s2
Subject to condition
3x1 + 2x2 + x3 + s1 + 0s2 = 3
2x1 + x2 + 2x3 + 0s1 + s2 = 2 and x1 , x2 , x3 , s1 , s2 ≥ 0 . IBFS : s1 = 3 ; s2 = 2 .
Cj 1 1 3 0 0
CB YB XB x1 x2 x3 s1 s2
0 s1 3 3 2 1 1 0
0 s2 2 2 1 2 0 1
Zj 0 0 0 0 0 0
Zj – Cj 0 -1 -1 -3 0 0
ϴ = min xB = min 3 , 2
ai
1 2
= min {3 , 1} =>ϴ=1
New , x3 = 2/2 , 2/2 , 1/2 , 2/2 , 0/2 , 1/2
x3 = 1 , 1 , 1/2 , 1 , 0 , 1/2
Solving
Old s1 = > 3 3 2 1 1 0
x3 × 1 = > 1 1 1/2 1 0 1/2
(-) (-) (-) (-) (-) (-)
2 2 3/2 0 1 -1/2
1st Iteration :
Cj 1 1 3 0 0
CB YB XB x1 x2 x3 s1 s2
0 s1 2 2 3/2 0 1 -1/2
3 x3 1 1 1/2 1 0 1/2
Zj 3 3 3/2 3 0 3/2
Zj – Cj 3 (3 – 1) (3/2 -1) (3 – 3) (0 – 0) (3/2 – 0)
= 2 = 1/2 =0 =0 = 3/2