You are on page 1of 18

Chapter 03 - The Simplex Method Principles

The Simplex Method


Principles
Definition: A variable is said to a basic variable in a given equation if
it appears with a unit coefficient in that equation and zero coefficients in
all other equations.
Other variables are called nonbasic variables.
Remark: Recall the reduced row-echelon form of the augmented matrix
of a system of linear equations.
Definition: A pivot operation is a sequence of elementary operations
that reduces a given system to an equivalent system in which a specified
variable has a unit coefficient in one equation and zero elsewhere. (this
is a basic variable).
Example: x1  2 x2  x3  4 x4  2 x5  2
x1  x 2  x3  3x4  x5  4
yields the system
x1  3 x3  2 x 4  4 x 5  6
x 2 2 x3  x4  3 x5  2

After a sequence of elementary row operations. This is called the


canonical form of the system.
2 2
The Simplex Method
Principles
Definition: A variable x1 is said to be a basic variable in a given system of linear
equations if it appears with a unit coefficient in one equation and zero
coefficients in other equations. Other variables are called nonbasic variables.
Definition: A pivot operation is a sequence of elementary row operations that
reduces a given system to an equivalent system in which a specified variable
has a unit coefficient in one equation and zero elsewhere. (Basic variable).
Remark: The number of basic variables is determined by the number of equations
in the system. (no. of basic variables is less than or equal to the no. of
equations).
Definition: The solution obtained from a canonical system by setting the nonbasic
variables to zero and solving for the basic variables is called a basic solution.
A basic feasible solution is a basic solution in which the values of the basic
variables are all nonnegarive.
In the previous example, the basic feasible solution is x1  6 and x 2  2.

3 3
The Simplex Method
Principles
The simplex method is an iterative process for solving LPP’s expressed in
standard form . In addition to that, the constraint equations are expressed
in a canonical system.
Steps:
1. Start with an initial basic feasible solution in canonical form.
2. Improve the initial solution (if possible) by finding another bfs with a
better objective function value. The SM implicitly eliminates from
consideration all those bfs’s whose objective function values are worse
than the present (current) solution.
3. Continue until a particular bfs cannot be improved further. It becomes an
optimal solution, and the method terminates.
Definition: A bfs that differs from the present bfs by exactly one basic variable
is called an adjacent bfs.
Definition: The relative profit of a variable is the change in the value of the
objective function that results from increasing the value of this variable
4 4
by 1.
Example 1

Maximize Z  5 x1  2 x 2  3x3  x 4  x5
S.T : x  2 x 2 x  x 8
1 2 3 4

3x1  4 x2  x3  x5  7
Iteration # 1
Step 1: The system is in canonical form with respect tox 4 , x.5Take
x1  x 2  x3  0, and take x 4  8, x5  7
Notice that the current value of z= -1. (basic: x 4 , x 5 , nonbasic: x1 , x 2 , x3 . )
Step 2: Compute relative profits of the nonbasic variables, as follows:
1)
x1  1 x  x  8 
  x4  7, x5  4
1 4

 1
3 x  x 5  7 
Z=5-7+4=2, relative profit=2-(-1)=3.
2)
x2  1 2 x2  x4  8
   x4  6, x5  3
 2
4 x  x 5  7 
Z=2-6+3=-1, relative profit=-1-(-1)=0.
5 5 3) x3  1 2 x3  x4  8
   x4  6, x5  6
 3
x  x 5  7 
Example 1

z= 3-6+6=3, relative profit=3-(-1)=4.


x 3 is the new basic variable (highest rel.profit). Highest increase in x 3 is the
minimum {4,7} = 4. Why?. Now,
2 x3  x 4  8 {4,7}: what number we
   x 4  0, x5  3 put instead of x3 in the
 x3  x5  7  two equations to get
So, x1  x 2  x 4  0, x3  4, x5  3 x4 and x5 = 0
z  3(4)  3  15
Iteration # 2:
Step 1: Rewrite the system in canonical form with respect to
x3 and x5 , to get :
1 1
x1  x 2  x3  x 4  4
2 2
5 1
x1  3x 2 - x 4  x5  3
6 6 2 2
Example 1

Step 2: Compute rel profits of the nonbasic variables.


1) x1  1
1 
 2 x1  x3 4 
 7 1
   x3  , x5 
5 x  x 5  3 
2 2
 2 1 
21 1
Z  5   16
2 2
rel. profit  16 - 15  1.
2) x2  1
 x2  x3 4 
   x3  3, x5  0
3x 2  x5  3 
Z  2  9  0  11
rel. profit  11 - 15  -4  0.

7 7
Example 1

3) x 4  1
 1 
x
 3 2 4 x  4  7 7
   x 3  , x 5 
 1  2 2
  x 4  x 5  3 
2
21 7
Z  1   13
2 2
rel . profit  13 - 15  -2  0.
x1 is the new basic variable. x1 = min{8,6/5} = 6/5.
3 17
x3  4  
5 5
51 81
Z  6 
5 5
8
basic : x1 , x3 , nonbasic : x 2  x4  x5  0
Example 1
Iteration # 3
Step 1: Rewrite the system in canonical form with respect to x1 and x3 , to get :
6 1 2 6
x1  x2 - x4 - x 5 
5 5 5 5
2 3 1 17
x 2  x 3  x 4  x5 
5 5 5 5
x2  1
1)
 6 6 
 x1  5 x 2  5 
   x1  0, x3  3
2
 x x   17
 5 2 3
5 
81 15
Z  2  9  11, rel. profit  11     3  0
5 5
2) x4  1
 1 6 
 x  x 
5 
1 4
5 7 14
   x1  , x3 
 x  3 x  17  5 5
 3
5
4
5 
42 72 72 81 9
9 Z 7 1  , rel . profit      3  0
5 5 5 5 5
Example 1

3) x5 1
 2 6 
 x  x 
5 
1 5
5 4 18
   x1  , x3 
 x  1 x  17  5 5
 3 5 5 5 
54 79 79 81 2
Z  4 1  , rel . profit    0
5 5 5 5 5

Conclusion: All relative profits in this iteration are negative. Therefore,


there is no new entering variables. The results of the previous iteration
give the optimal solution. i.e
6 17 81
x1  , x3  , Z 
5 5 5

DONE

10
Example 2

Maximize Z  3x1  2 x 2
S .T : x1  2 x2  6
2x1  x2  8
- x 1  x2  1
x2  2
x 1 , x2  0
I. Write the LPP in standard form, to get:
Maximize Z  3x1  2 x 2
S .T : x1  2 x 2  x3 6
2x1  x 2  x4 8
- x 1  x2  x5 1
x2  x6  2
x1 , x 2 ,...,x6  0

11
Example 2

12
13
14
15
16
17
Summary

Summary of the simplex method:


1. Start with an initial basic feasible solution (bfs) in canonical form.
2. Check if the current solution is optimal or not as follows:
(i) If the relative profits of the nonbasic variables are all zero or negative,
then this is the optimal solution. STOP.
(ii) Else, choose the nonbasic variable with highest relative profit as an
entering variable. The leaving variable is determined by the constraint
that gives the minimum value to the entering variable. (The minimum
ratio rule).
3. Rewrite the system in canonical form with respect to the new basic
variables.
4. GO TO STEP 2.

You might also like