2. Simplex Method
• Simplex: A linear-programming algorithm that can solve problems
having more than two decision variables.
• The simplex technique involves generating a series of solutions in
tabular form, called tableaus. This process continues as long as a
positive (negative) rate of profit (cost) exists.
• The simplex method is an iterative algorithm (a systematic solution
procedure that keeps repeating a fixed series of steps, called, an
iteration.
3. Simplex Method
Solve the following LPP using the Simplex method
Maximize Z = 12x1 + 16 x2
Subject to 10 x1 + 20 x2 ≤ 120
8 x1 + 8 x2 ≤ 80
x1, x2 ≥ 0
4. Simplex Method
Solution,
Max Z = 12x1 + 16x2
10x1 + 20x2 + s1 = 120
8x1 + 8x2 + s2 = 80
Same Slack should be added to Maximize function as well
Max Z = 12x1 + 16x2+ s1 +s2
Coefficient Value of s1 , s2 are 0
Therefore Max Z = 12x1 + 16x2+ 0s1 +0s2
x1, x2, s1, s2 ≥ 0
5. Simplex Method
Step 1
We have to frame Initial Simplex Table table
Cj = Coefficient of Objective function
Basic Variables = x1, x2, s1, s2
Max Z= 12x1 + 16 x2+ 0s1 +0s2
x1 = 12, x2= 16, s1= 0 , s2=0
7. We have to find now = Cj-Zj
Optimality condition
For Max : all Cj-Zj ≤ 0
For Min : all Cj-Zj ≥ 0
Here in above all Cj-Zj are Positive value so we have to proceed further for solution
In the table maximum value of Cj-Zj is 16
So X2 will be a Key Column
Now we have to find ratio = Solution / Key column
6 being the least value & hence 20 at the point of intersection will become key ELEMENT . So X2 will be entering Variable &
S1 will become leaving Variable.
Key Column
Entering Variable
Key Row
Key Column
Key Element
Leaving Variable
8. For first Row : Divide old row with key element
For Second Row use the formula
New Value = Old row –( Corresponding key column value x Corresponding Key row value ) / key
Element
8- (8x10 )/20 8-80/20 8-4= 4
8- (8 x20 )/20 8-160/20 8-8=0
0-(8X1)/20 0-8/20 OR 0- 2/5 = -2/5 or -0.4
1-8X0/20 1-0/20 1-0 = 1
80-(8X120 ) /20 80- 960/20 80-48 = 32
9. Zj = Σ( Cbi ) (aij )
1. (16 x0.5 ) + (0x4) 8 + 0 = 8
2. (16x 1)+(0x0) 16+0= 16
We have to find now = Cj-Zj ( Condition is Cj-Zj should be ≤ 0
Key column
Key Row
Key element
Entering Variable
Leaving Variable
10. For Key Row (x1) : Divide old row with key element.
For Second Row use the formula
New Value = Old row –( Corresponding key column value x Corresponding Key row
value ) / key Element
0.5- (0.5x4 )/4 0.5- 2/4 0.5-0.5= 0
1- (0.5 x0 )/4 1-0/4 1-0 =1
0.05-(0.5x-0.4)/4 0.5 + 0.2 / 4 0.5+ 0.05= or 0.10
0- (0.5X1)/4 0-0.5/4 0-0.125 = -0.125
6-(0.5X32 ) /4 6- 16/4 6-4 = 2
11. Simplex Method
We have to calculate first Zj
Zj = Σ( Cbi ) (aij )
1. (16x0 ) + (12x1) 0 +12= 12
2. (16x1)+(12x0) 16+0= 16
Than Cj-Zj
Optimality condition
For Max : all Cj-Zj ≤ 0
For Min : all Cj-Zj ≥ 0
x1= 8, x2= 2 , Z ( Optimality ) = 128
12. Simplex Method
Max Z= 12x1 + 16 x2
x1= 8, x2= 2, Z ( Optimality ) = 128
Put Value of x1 & x2 in Max Z
12 x 8 + 16 x 2
96 + 32 = 128
LHS = RHS
How to Check the Correctness
17. We have to find now = Cj-Zj
Optimality condition
For Max : all Cj-Zj ≤ 0 Means all value should be either zero or Negative value .
For Min : all Cj-Zj ≥ 0 Means all value should be either zero or Positive value .
Here in above Cj-Zj, there are negative value , so we have to proceed further for solution.
We have to select most negative value
Example
Cj-Zj = 2 -7 -2 0 0 0
Cj-Zj = 2 -3 -3 0 0 0
In the table most negative value of Cj-Zj is -3
So X2 will be a Key Column
18. Key Column
Now we have to find ratio = Solution / Key column
Select from Ratio the Least Positive value i.e 3.33 so s3 will be a Key Row
3 at the point of intersection will become key ELEMENT .
So X2 will be entering Variable & S3 will become leaving Variable.
Key Row
Key Element
Entering Variable
Leaving
Variable
19. Entering Variable is x2 & Leaving Variable is S3
Secondly we have to find the value of entering variable ( Old Value divided by KEY ELEMENT )
In this case Old Values are -4, 3 , 8, 0, 0, 1
Key element is 3
Therefore New value will be -4/3, 3/3, 8/3, 0,0, 1/3
We have to find out the value of first two rows
Formula is New Value = Old Value – ( Corresponding Key Column Value x Corresponding New value )
20. Formula is
New Value = Old Value – ( Corresponding Key Column Value x Corresponding New value
Old value
Corresponding New value are -4/3, 3/3, 8/3, 0,0, 1/3 , 10/3
• 3- ( -1x -4/3) 3 – ( 4/3 ) 3-4/3 = 5/ 3
• -1 –( -1 x 1 ) -1 – ( -1) -1 + 1 1 = 0
• 2- ( -1 x 8/3 ) 2- ( -8/3 ) 2 + 8/3 = 14/ 3
• 1- ( -1 x 0) 1- ( 0) 1-0 = 1
• 0-( -1 x 0) 0- ( 0) 0-0 = 0
• 0- ( -1 x 1/3 ) 0- ( -1/ 3) 0+ 1/3 = 1/ 3
• 7- ( -1 x 10/3 ) 7- ( -10/3 ) 7 + 10/3 = 31/3
s1 3 -1 2 1 0 0 7
s2 -2 -4 0 0 1 0 12
21. Zj = Σ( Cbi ) (aij )
1. (0x1.67 ) + (0x-7.33) + (-3 x -1.334) 0 +0 + 4 = 4
2. (0x0)+(0x-0) + ( -3x 1 0 +0-3 = -3
We have to find now = Cj-Zj
For Min : all Cj-Zj ≥ 0 Means all value should be either zero or Positive value .
Here in above Cj-Zj, there are negative value , so we have to proceed further for solution.
We have to select most negative value
In the table most negative value of Cj-Zj is -2
So X1 will be a Key Column
22. Now we have to find ratio = Solution / Key column
Select from Ratio the Least Positive value i.e 6.2 so s1 will be a Key Row
1.67 at the point of intersection will become key ELEMENT .
So X1 will be entering Variable & S1 will become leaving Variable.
Key Column
Key Row
Key Element
Leaving Variable
Entering Variable
23. Entering Variable is x1 & Leaving Variable is S1
Secondly we have to find the value of entering variable ( Old Value divided by KEY ELEMENT )
In this case Old Values are 1.67, 0, 4.67, 1 , 0 , 0.33 , 10.33
Key element is 1.67
Therefore New value will be 1.00, 0.00, 2.80, 0.60, 0.00, 0.20, 6.20
24. Formula is
New Value = Old Value – ( Corresponding Key Column Value x Corresponding New value )
Old value
Corresponding New value are 1, 0, 2.80, 0.60, 0 , 0.20 , 6.20
• -7.33 - ( -7.33 x 1 ) -7.33 – (-7.33 ) -7.33 + 7.33 = 0
• 0 –( -7.33 x 0 ) 0 – ( 0) 0- 0 = 0
• 10.67 - ( -7.33 x 2.80 ) 10.67 - ( -20.52 ) 10.67 + 20.52 = 31.19
• 0- ( -7.33 x 0.60) 0- ( -4.398) 0 + 4.398 = 4.398
• 1-( -7.33 x 0) 1 - ( 0) 1- 0 = 1
• 1.33- ( -7.33 x 0.20 ) 1.33- ( -1.466) 1.33 + 1.466 = 2.796
• 25.33- ( -7.33 x 6.20 ) 25.33- ( -45.446 ) 25.33 + 45.446 = 70.776
s2 -7.33 0.00 10.67 0.00 1.00 1.33 25.33
x2 -1.33 1.00 2.67 0.00 0.00 0.33 3.33
25. Zj = Σ( Cbi ) (aij )
1. (2x1 ) + (0x0) + (-3 x 0) 2 +0 + 0 = 2
2. (2x0)+(0x-0) + ( -3x 1 ) 0 +0-3 = -3
We have to find now = Cj-Zj
For Min : all Cj-Zj ≥ 0 Means all value should be either zero or Positive value .
Cj-Zj in above table are either 0 or Positive
Hence we have optimal solution Z = -22.40