0% found this document useful (0 votes)
62 views13 pages

Linear Programming Problem Simplex Method

Uploaded by

yash.bhatt
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)
62 views13 pages

Linear Programming Problem Simplex Method

Uploaded by

yash.bhatt
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

SIMPLEX METHOD TO SOLVE LPP

STEP1
Convert LPP into STANDARD FORM in the following manner
a) Addition of slack variable : It represents a quantity of
unused resources either in the form of time on a machine,
labour hrs, warehouse space, quantity of raw material etc.
It is added to less than (≤) type constraints in order to
convert it into equality. Coefficient of slack variable in the
objective function is 0
e.g
𝑀𝑎𝑥 𝑧 = 𝑥1 + 5𝑥2 + 4𝑥3
Subject to
. 2𝑥1 + 3𝑥2 + 7𝑥3 ≤ 30
𝑥1 + 2𝑥2 + 4𝑥3 ≤ 45
X1 ≥ 0, 𝑥2 ≥ 0, 𝑥3 ≥ 0
Each inequality is converted into equality by adding slack
variable 𝑠1 & s2 whose coefficient in the objective
function is 0
Max z =x1+5x2+4x3+0s1+0s2
Subject to
. 2𝑥1 + 3𝑥2 + 7𝑥3 + 𝑠1 = 30
𝑥1 + 2𝑥2 + 4𝑥3 + 𝑠2 = 45
𝑥1 ≥ 0, 𝑥2 ≥ 0, 𝑥3 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 , 𝑥2 & 𝑥3 are known as decision variables
s1 & s2 are known as slack variables
b) Subtraction of Surplus variable: It represents the amount
by which solution values exceeds a resources . Therefore It
is subtracted from the constraint which are in the form of
greater than (≥) type constraints in order to convert it into
equality. Coefficient of surplus variable in the objective
function is 0
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2
Subject to
e.g. 2𝑥1 + 4𝑥2 ≥ 40
3𝑥1 + 5𝑥2 ≥ 20
x1 ≥ 0, 𝑥2 ≥ 0
each inequality is converted into equality by subtracting
surplus variable s1 & s2 whose coefficient in the objective
function is 0
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2
Subject to
e.g. 2𝑥1 + 4𝑥2 − 𝑠1 = 40
3𝑥1 + 5𝑥2 − 𝑠2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 & 𝑥2 are known as decision variables
𝑠1 & 𝑠2 are known as surplus variables
c) Addition of Artificial variable: These are added to those
constraints which has surplus variables& its coefficient in
the objective function is M in case of 𝑚𝑖𝑛 𝑧 & −𝑀 in case
of 𝑚𝑎𝑥 𝑧 where M is very large positive cost
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2
Subject to
e.g. 2𝑥1 + 4𝑥2 ≥ 40
3𝑥1 + 5𝑥2 ≥ 20
x1 ≥ 0, 𝑥2 ≥ 0
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2
Subject to
e.g. 2𝑥1 + 4𝑥2 − 𝑠1 = 40
3𝑥1 + 5𝑥2 − 𝑠2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 & 𝑥2 are known as decision variables
𝑠1 & 𝑠2 are known as surplus variables
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2 + 𝑀𝐴1 + 𝑀𝐴2
Subject to
e.g. 2𝑥1 + 4𝑥2 − 𝑠1 + 𝐴1 = 40
3𝑥1 + 5𝑥2 − 𝑠2 + 𝐴2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 & 𝑥2 are known as decision variables
𝑠1 & 𝑠2 are known as surplus variables
𝐴1 & 𝐴2 are known as artificial variables

eg
𝑀𝑎𝑥 𝑧 = 𝑥1 + 𝑥2
Subject to
e.g. 2𝑥1 + 4𝑥2 ≤ 40
3𝑥1 + 5𝑥2 ≥ 20
x1 ≥ 0, 𝑥2 ≥ 0
𝑀𝑎𝑥 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2
Subject to
e.g. 2𝑥1 + 4𝑥2 + 𝑠1 = 40
3𝑥1 + 5𝑥2 − 𝑠2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 & 𝑥2 are known as decision variables

𝑠1 is known as slack variable


𝑠2 is known as surplus variables
𝑀𝑎𝑥 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2 − 𝑀𝐴1
Subject to
e.g. 2𝑥1 + 4𝑥2 + 𝑠1 = 40
3𝑥1 + 5𝑥2 − 𝑠2 + 𝐴1 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0, 𝐴1 ≥ 0
𝑥1 & 𝑥2 are known as decision variables

𝑠1 is known as slack variable


𝑠2 is known as surplus variables
A1 is known as artificial variable
eg
𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2
Subject to
e.g. 2𝑥1 + 4𝑥2 ≥ 40
3𝑥1 + 5𝑥2 ≤ 20
x1 ≥ 0, 𝑥2 ≥ 0

𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2


Subject to
e.g. 2𝑥1 + 4𝑥2 − 𝑠1 = 40
3𝑥1 + 5𝑥2 + 𝑠2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0
𝑥1 & 𝑥2 are known as decision variables

𝑠1 is known as surplus variable


𝑠2 is known as slack variables

𝑀𝑖𝑛 𝑧 = 𝑥1 + 𝑥2 + 0𝑠1 + 0𝑠2 + 𝑀𝐴1


Subject to
e.g. 2𝑥1 + 4𝑥2 − 𝑠1 + 𝐴1 = 40
3𝑥1 + 5𝑥2 + 𝑠2 = 20
x1 ≥ 0, 𝑥2 ≥ 0, 𝑠1 ≥ 0, 𝑠2 ≥ 0, 𝐴1 ≥ 0
𝑥1 & 𝑥2 are known as decision variables

𝑠1 is known as surplus variable


𝑠2 is known as slack variables
A1 is artificial variable
Solve the following LPP by Simplex Method
i) 𝑀𝑎𝑥 𝑧 = 4𝑥 + 7𝑦
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥 + 3𝑦 ≤ 18
4𝑥 + 2𝑦 ≤ 8
𝑥 ≥ 0, 𝑦 ≥ 0
STEP 1 To Convert given LPP into standard Form
𝑀𝑎𝑥 𝑧 = 4𝑥 + 7𝑦 + 0𝑆1 + 0𝑆2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥 + 3𝑦 + 𝑆1 + 0𝑆2 = 18
4𝑥 + 2𝑦 + 0𝑆1 + 𝑆2 = 8
𝑥 ≥ 0, 𝑦 ≥ 0, 𝑆1 ≥ 01 , 𝑆2 ≥ 0
𝑥, 𝑦 are decision variables & 𝑆1 , 𝑆2 are slack variable

STEP 2 EXPRESS THE ABOVE STANDARD FORM INTO MATRIX


FORM 𝑨𝑿 = 𝑩
𝑥
1 3 1 0 𝑦 18
𝐴= , 𝑋= 𝑆1 , 𝐵 =
4 2 0 1 8
𝑆2
, 𝐶𝑗 = 4 7 0 0 Cj:Matrix of Coefficient of each
variable in the objective function
STEP 3 TO FIND INITIAL SOLUTION BY SUBSTITUTING 𝑥 = 0 & 𝑦 = 0 in
standard form

∴ initial solution is 𝑆1 = 18 , 𝑆2 = 8

STEP 4 FORM THE INITIAL SIMPLEX TABLE

STEP 5 FIND THE VALUES OF 𝒁𝒋 = (𝑪𝑩 𝒙𝒋 ) for each variable


STEP 6 FIND ∆𝒋 = 𝑪𝒋 − 𝒁𝒋

STEP 7 FIND INCOMING VARIABLE CORRESPONDING TO HIGHEST ∆𝒋


STEP 8 FIND REPLACEMENT RATIO 𝑋𝐵 /𝑥𝑗

STEP 9 FIND OUTGOING VARIABLE CORRESPONDING TO MINIMUM


POSITIVE RATIO

STEP 10 FIND KEY ELEMENT i.e. intersecting element of key column &
key row

STEP 11 MODIFY THE VALUES by performing calculations

Old element-(New element * the element which is to be converted into


zero)

& REPEAT STEPS 5, 6, …. UNTILL WE GET ALL VALUES OF ∆𝒋 ≥ 𝟎


Simplex Table
Basic 𝑪𝒋 4 7 0 0 Replacement
Variables ratio=(𝑿𝑩 /𝒙𝒋)
𝑿𝑩 𝑪𝑩 𝒙 𝒚 𝑺𝟏 𝑺𝟐

KEY COLUMN
S1(OLD) 18 0 1 3 1 0 18/3=6

S2 0 4 2 Key 0 1 8/2=4
(KEY 8 element (Outgoing vari
ROW)
0×1+0 0×3+0 0×1+0 0×0
𝒁𝒋 ×4 ×2 =0+0 ×0 +0
=0+0 =0 =0+0 ×1
= (𝑪𝑩 𝒙𝒋 )
=0 =0 =0+0
=0
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 4−0=4 7−0=7 0−0= 0 0−0
Incoming =0
Variable

18 0 1 − (2 ∗ 3) 3 − (1 ∗ 3) 1 − (0 ∗ 3) 0
S1 − (4 =1−6 =3−3=0 =1−0 − (1/2
∗ 3) = −5 =1 ∗ 3)
= 18 =0
− 12 − 3/2
=6 = 3/2
(NEW)*3 8/2=4 7 4/2=2 2/2=1 0/2=0 ½
y
𝒁𝒋 0*(- 0*0+7*1=7 0*1+7*0=0 0*3/2+7
5)+7*2=0+ *1/2=7/
= (𝑪𝑩 𝒙𝒋 )
14=14 2
4 − 14 7-7=0 0-0=0 0 − 7/2 = −7/2
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 = −10
Since there is no ∆𝒋 𝒑𝒐𝒔𝒊𝒕𝒊𝒗𝒆 solution so obtained is optimal
Solution of given LPP is x=0 ,y=4 zmax=28

ii) 𝑀𝑎𝑥 𝑧 = 50𝑥 + 20𝑦


𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 20𝑥 + 10𝑦 ≤ 500 , 50𝑥 + 50𝑦 ≤ 300 ,
𝑥 ≥ 0, 𝑦 ≥ 0
STEP I STANDARD FORM
𝑀𝑎𝑥 𝑧 = 50𝑥 + 20𝑦 + 0𝑆1 + 0𝑆2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 20𝑥 + 10𝑦 + 𝑆1 = 500
50𝑥 + 50𝑦 + 𝑆2 = 300
𝑥 ≥ 0, 𝑦 ≥ 0, 𝑆1 ≥ 0, 𝑆2 ≥ 0
𝑥, 𝑦 are decision variables & 𝑆1 , 𝑆2 are slack variables

STEP 2 MATRIX FORM 𝑨𝑿 = 𝑩


𝑥
20 10 1 0 𝑦 500
𝐴= , 𝑋= 𝑆1 ,𝐵 = ,
50 50 0 1 300
𝑆2
𝐶𝑗 = 50 20 0 0
STEP 3 INITIAL SOLUTION BY SUBSTITUTING 𝑥 = 0 & 𝑦 = 0 in standard
form
∴ initial solution is 𝑆1 = 500 , 𝑆2 = 300
Simplex Table

Basic 𝑪𝒋 50 20 0 0 Replacemen
Variables
𝑿𝑩 𝑪𝑩 𝒙 𝒚 𝑺𝟏 𝑺𝟐
𝑺𝟏 500 0 20 10 1 0 500/20=25
Old
𝑺𝟐 300 0 50 0 1 6
50
Key
element 300/50=
𝒁𝒋 = (𝑪𝑩 𝒙𝒋) (0×20) + (0×10) + (0×1)+(0×0) = (0×0) +
(0×50) = (0×50) = 0 0 (0×1) = 0
0
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 50−0= 20 − 0 = 0−0= 0 0−0=0
20
50

𝑺𝟏 500−6×20 = 0 20−(1×20 10−(1×20 1−(0×20) = 1 0−(1/50×20


Old- 380 ) =0 ) = −10 ) = −2/5
new*20
𝒙 300/50=6 50 50/50=1 50/50=1 0/50=0 1/50
New
𝒁𝒋 = (𝑪𝑩 𝒙𝒋) (0× 0) + (0× −10) + (0×1) + (0× −2/5) +
(50 × 1) = (50×1) = 50 (50×0) = 0 (50×1/50) =
50 1
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 50 − 50 20 − 50 = 0−0= 0 0 − 1 = −1
=0 −30

Since there is no positive value of ∆𝒋 ,solution is optima Therefore


,optimal solution is 𝒙 = 𝟔, 𝒚 = 𝟎, 𝒛𝒎𝒂𝒙 = 𝟔 × 𝟓𝟎 + 𝟐𝟎 × 𝟎 = 𝟑𝟎

iii) 𝑀𝑎𝑥 𝑧 = 8𝑥 + 20𝑦


𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 2𝑥 + 𝑦 ≤ 80 , 3𝑥 + 4𝑦 ≤ 96 , 𝑥 ≥ 0, 𝑦 ≥ 0
STEP I STANDARD FORM
𝑀𝑎𝑥 𝑧 = 8𝑥 + 20𝑦 + 0𝑆1 + 0𝑆2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 2𝑥 + 𝑦 + 𝑆1 = 80
3𝑥 + 4𝑦 + 𝑆2 = 96
𝑥 ≥ 0, 𝑦 ≥ 0, 𝑆1 ≥ 0, 𝑆2 ≥ 0
𝑥, 𝑦 are decision variables & 𝑆1 , 𝑆2 are slack variables
STEP 2 MATRIX FORM 𝑨𝑿 = 𝑩
𝑥
2 1 1 0 𝑦 80
𝐴= , 𝑋= 𝑆 ,𝐵 = , 𝐶𝑗 = 8 20 0 0
3 4 0 1 1 96
𝑆2
STEP 3 INITIAL SOLUTION BY SUBSTITUTING 𝑥 = 0 & 𝑦 = 0 in standard form
∴ initial solution is 𝑆1 = 80 , 𝑆2 = 96
Simplex Table

Basic 𝑪𝒋 8 20 0 0 Replacement ra
Variables
𝑿𝑩 𝑪𝑩 𝒙 𝒚 𝑺𝟏 𝑺𝟐
𝑺𝟏 80 0 2 1 1 0 80/1=80
𝑺𝟐 96 0 3 4 0 1 96/4=
24

𝒁𝒋 (0×2) + (0×1) + (0×1)+(0× (0×0


(0×3) = 0 (0×4) = 0 0) = 0 )+
(0×1
)=0
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 8−0=8 20 − 0−0=0 0−0
20 0= =0

𝑺𝟏 80−(24× 0 2−(3/4× 1) = 1−(1×1) = 0 1−(0×1 0−(1/4


1) = 56 5/4 ) =1 ×1) =
−1/4
𝒚 96/4=24 20 3/4 4/4=1 0/4=0 1/4
𝒁𝒋 (0× 5/4) + (0× 0) + (0×1) + (0×
(20 × 3/4) = (20×1) = 20 (20×0) = 0 −1/
15 4) +
(20×1/
4) = 5
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 8 − 15 = −7 20 − 20 = 0 0−0=0 0−5
= −5
Since there is no positive value of ∆𝒋 ,solution is optimal

Therefore ,optimal solution is 𝒙 = 𝟎 , 𝒚 = 𝟐𝟒 𝒛𝒎𝒂𝒙 = 𝟖 × 𝟎 + 𝟐𝟎 × 𝟐𝟒 = 𝟒𝟖𝟎


CASES OF SOLUTION OF SIMPLEX METHOD

a) In the final simplex table of given LPP when one of


MULTIPLE SOLUTION:
the non-basic variable has ∆𝒋 = 𝒄𝒋 − 𝒛𝒋 = 𝟎 then it has Multiple
solution.
Eg
Basic Cj 6 4 0 0 0 Replacement
variables Xb Cb X1 X2 S1 S2 S3 ratio
S1 14 0 0 5/3 1 -2/3 0 42/5
S3 5 0 0 -1/3 0 1/3 1 ---
X1 8 6 1 2/3 0 1/3 0 12
zj 6 4 0 2 0
Cj-zj 0 0 0 -2 0
One of the non-basic variable x2 has cj-zj=0 therefore we
conclude that given LPP has multiple solution
b) DEGENERATE SOLUTION:

Degeneracy arises when there is a tie in the minimum


replacement ratio that determines the variable to leave the basis.
e.g.
Basic Cj 3 9 0 0 Replacement
variable Xb Cb X1 X2 S1 S2 ratio(Xb/x2)
S1 8 0 1 4 1 0 8/4=2
S2 4 0 1 2 0 1 4/2=2
Zj 0 0 0 0
Cj-zj 3 9 0 0
From the above table we observe that 𝑥2 is incoming variable. But
minimum replacement ratio is same for both s1 & s2 for outgoing
variable. i.e there is a tie among two variables . This is an indication of
existence of degeneracy.
c) Unique Solution: If cj-zj <0 for each non-basic variable in the final
simplex table then we conclude that given LPP has unique solution
Final Simplex Table
Basic 𝑪𝒋 8 20 0 0 Replacement ra
Variables
𝑿𝑩 𝑪𝑩 𝒙 𝒚 𝑺𝟏 𝑺𝟐
𝑺𝟏 56 0 5/4 0 1 −1/4
𝒚 24 20 3/4 1 0 1/4
𝒁𝒋 15 20 0 5
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 −7 0 0 −5

Non basic variables x & s2 has cj-zj<0 therefore we conclude that


given LPP has unique solution

d) UNBOUNDED SOLUTION: If there is no positive replacement ratio


then we conclude that given LPP has unbounded solution
Basic 𝑪𝒋 60 20 0 0 Replacement ra
Variables
𝑿𝑩 𝑪𝑩 𝒙 𝒚 𝑺𝟏 𝑺𝟐
𝑺𝟐 240 0 0 10 −4 1 ---
𝒙 60 60 1 2 -1/2 0 ----
𝒁𝒋 60 120 30 0
∆𝒋 = 𝑪𝒋 − 𝒁𝒋 0 −100 30 0

Since it is not possible to find outgoing variable due to negative


replacement ratio, we conclude that given LPP has unbounded
solution

2
0

You might also like