You are on page 1of 16

Simplex Method

In practice, most problems contain more than two


variables and are consequently too large to be tackled
by conventional means. Therefore, an algebraic
technique is used to solve large problems using
Simplex Method.
Simplex method is carried out through different stages
systematically step by step, and finally the maximum
or minimum values of the objective function are
attained.
The simplex method solves the linear programming
problem in different levels to improve the value of the
objective function.
The simplex approach not only yields the optimal
solution but also other valuable information to
perform economic and 'what if' analysis.
To apply simplex approach there are different conditions
Conditions for application of simplex method
• The following two conditions have to be satisfied
1. The RHS of each of the constraint should be non-negative. If an LPP has a
constraint for which a negative resource value is given, it should be in the first step
converted in to positive value by multiplying both sides of the constraint by -1.

1. Each of the decision variables of the problem should be non-negative. Sometimes,


a problem might have a variable which is “unrestricted in sign” or free, so that it
can assume negative values as well as non-negative. This situation is handled by
treating such a variable as the difference of two variables which are both non-
negative, because such a difference may be positive, negative or zero.

Consider the following example


Max z = 5x1 + 7x2 – 2x3
s.t 2x1 + 5x2 + 3x3 <= 80
5x1 + 2x2 – 2x3 <= 30
x2 + 6x3 <= 42

x1, x2 >= 0, x3 unrestricted in sign


...

Since x3 is unrestricted in sign, we can represent it by a difference of two non-


negative variables, say x4 and x5. Substituting x3 = x4 – x5, in the above and
simplifying it, we will get

Max Z = 5x1 + 7x2 – 2x4 + 2x5

Subject to 2x1 + 5x2 + 3x4 - 3x5 <= 80


5x1 + 2x2 – 2x4 + 2x5 <= 30
x2 + 6x4 - 6x5 <= 42

x1, x2, x4, x5 >= 0

After the solution is obtained, we shall substitute the difference of the


values of x4 and x5 as the value of x3.
ADDITIONAL VARIABLES USED IN SOLVING LPP
Three types of additional variables are used in simplex method such as,

(a) Slack variables (S1, S2, S3..…Sn): Slack variables refer to the amount of
unused resources like raw materials, labor and money.

(b) Surplus variables (-S1, -S2, -S3..…-Sn): Surplus variable is the amount of
resources by which the left hand side of the equation exceeds the
minimum limit.

(c) Artificial Variables (a1, a2, a3.. …an): Artificial variables are temporary
slack variables which are used for purposes of calculation, and are
removed later.
 
The above variables are used to convert the inequalities into equality
equations, as given in the Table next slide.
Types of Additional Variables

Constraints Type Varaibles added Format

A Less than or equal to ≤ Add slack variables +S

B Greater than or equal to ≥ Subtract surpluss -S + a


variables and add
artificial varables
C Equal to = Add artificial variables +a
Procedure of simplex Method
Step 1: Formulate the LP problem.

Step 2: Introduce slack /auxiliary variables.


if constraint type is ≤ introduce + S
if constraint type is ≥introduce – S + a and
if constraint type is = introduce a

Step 3: Find the initial basic solution.

Step 4: Establish a simplex table and enter all variable coefficients.

Step 5: Take the largest coefficient in the objective function, Zj to identify the
key column (the corresponding variable is the entering variable of the
next table).

Step 6: Find the ratio between the solution value and the coefficient of the key
column. Enter the values in the minimum ratio column.
Cont….
Step 7: Take the minimum positive value available in the minimum ratio
column to identify the key row. (The corresponding variable is the leaving
variable of the table).

Step 8: The intersection element of the key column and key row is the pivotal
element.

Step 9: Construct the next table by eliminating the leaving variable and
introducing the entering variable.

Step 10: Convert the pivotal element as 1 in the next table and compute the other
elements in that row accordingly. This is the pivotal equation row (not
key row).

Step 11: Other elements in the key column must be made zero. For simplicity,
form the equations as follows: Change the sign of the key column element,
multiply with pivotal equation element and add the corresponding
variable.
Cont….
Step 12: Check the values of objective function. If there are
positive values, the solution is not an optimal one; go to
step 5. Else, if all the values are negative, optimality is
reached.
Solution to Maximization Problem
• Consider the LPP given below
Max Z = 40x1 +35x2
subject to 2x1 + 3x2 <= 60 raw materials constraints
4x1 + 3x2 <= 96 Labor Hours constraints
x1, x2 >= 0
The solution in step wise is
1. Standardization of the problem: The first step in applying simplex method is to
standardize the problem. For this inequalities of the constraints are converted
into equations. To convert it into an equation, we need to add a variable S 1, on
the LHS of the first equation and S2 on the second equation
Thus, the equations are
2x1 + 3x2 + s1 = 60
4x1 + 3x2 + s2 = 96
The value of S1, depends on the value of 2x1 + 3x2 = 60. It may vary from the rang
0 to 60.
The value of S2 depends on the value of 4x1 + 3x2 = 96 and it may vary from the
range 0 to 96.
The value of S1 and S2 indicates the amount of unused resources.
• The objective function should also modified. Because objective function
for the simplex method should contains every variables in the system
including slack or other variables.
• Then, the objective function is expressed as
Max Z = 40x1 + 35x2 + 0S1 + 0S2
2. Obtaining the initial tableau and solution using the standardized form. The
initial simplex tableau is as follow
Max Z = 40x1 + 35x2 + 0S1 + 0S2
S.T 2x1 + 3x2 + S1 = 60
4x1 + 3x2 + S2 = 96
Basic Basis X1 X2 S1 S2 bi
variables
with their S1 0 2 3 1 0 60
coefficient in
the objective S2 0 4 3 0 1 96 Constraint
function values
Cj 40 35 0 0
contribution
Solution 0 0 60 96
Net ∆j = Cj - Zj 40 35 0 0
evaluation
row
How to calculate the value of variables in the
column quanitity
Column
• Quantity Zj = 40 x 0 + 35 x 0 + 0 x 60 + 0 x
96 = 0
x1 Z1 = 0 x 2 + 0 X 4 = 0 S1
Z3 = 0 x 1 + 0 x 0 = 0 Basis X1 X2 S1 S2 bi
x2 Z2 = 0 x 3 + 0 x 3 = 0 S2
Z4 = 0 x 0 + 0 x 1 = 0
S1 0 2 3 1 0 60
∆1 = Cj1– Z1 ∆3 = 0 – 0 = 0
= 40 – 0 = 40
S2 0 4 3 0 1 96
∆2 = C2 – Z2 ∆4 = 0 – 0 = 0
= 35 – 0 = 35
– The row title Cj indicates the coefficient of 40 35 0 0
various variables in the objective function.
Cj
– Next from the table identify the identity
matrix and the variables involved in it. The
identity matrix contains all zeros except the Soln. 0 0 60 96
diagonal column of positive 1’s.
– To determine the solution representing the
first feasible solution we set all variables ∆j = Cj - 40 35 0 0
other than those the identity equal to zero Zj
and then assign the values of the constrains
(bi’s) to variables in the identity.
• The variables in the identity are called Basic
variables and the remaining are called Non-
Basic variables.
• The bottom row containing ∆j values is used
to test optimality of the solution
• From the initial solution the solution
indicates as x1 = 0, x2 = 0, s1 = 60 and s2 = Basis X1 X2 S1 S2 bi
96.
• Then Z = 40 x 0 + 35 x 0 + 0 x 60 + 0 x 96 = 0
• This means the initial feasible solution is not S1 0 2 3 1 0 60
to produce any of the products with a zero
profit.
Testing the optimality S2 0 4 3 0 1 96
To test whether the solution obtained in simplex
table is optimal or not, the value of ∆j should
be calculated. ∆j is equal to Cj – Zj, which are
given at the bottom row of the table. 40 35 0 0
To obtain the value of Z, under each variable Cj
head column, first each element of that
column is multiplied by the corresponding Soln 0 0 60 96
coefficient of the solution variables
appearing in the basis. Then the products
added up to get Zj. ∆j = Cj - 40 35 0 0
The value of zj represent the amount by which Zj
the profit would be reduce if one unit of any
of the variables (x1, x2, s1 and s2) are added
to the mix
• Except when an artificial value is included a
simple table depicts an optimal solution if all
entries in the ∆j row are
a. Zero or negative, when the LPP is a
maximization type and
b. Zero or positive when the LPP of minimization
3. Deriving a revised tableau for improved solution Basis X1 X2 S1 S2 bi
The presence of positive ∆j values suggests that
the solution can be improved by moving any
one of the variables into the solution that are S1 0 2 3 1 0 60
not there.
Steps to revised the tableau
Select the variable that has the largest ∆j value S2 0 4 3 0 1 96
This is designated as the incoming variable
The column corresponding to this variable is
called the key column Cj 40 35 0 0
Next the bi values are divided by the
corresponding values in the key column, (bi/aij)
this is a replacement ratios
Solution 0 0 60 96
Select the row with the least non-negative
quotient, this is key row and the variable
corresponding to this represent the outgoing
variable ∆j = Cj - 40 35 0 0
The element which lies at the intersection of Zj
the key column and key row is termed as the
key element
• Then using the information from the key column, key row and key
element an other tableau is derived.
a. Divide each element of the key row by the key element to get the
corresponding values in the new tableau. These values are replacement
row values
b. For each row other than the key row
New row element = old row element – (Row element in the key column X
Corresponding replacement row
value)
Old row - Row element in X corresponding = New row
element the key column replacement row value element
2 - (2 X 1) = 0
3 - (2 X ¾) = 3/2
1 - (2 X 0) = 1
0 - (2 X ¼) = -1/2
60 - (2 x 24) = 12
• The revised simplex tableau is as follow

Basis X1 X2 S1 S2 Bi Bi/aij
S1 0 0 3/2 1 -1/2 12 8
X1 40 1 ¾ 0 ¼ 24 32
cj 40 35 0 0 Outgoing
Solution 24 0 12 0 variable
∆j 0 5 0 -10

Incoming variable
4. Revised tableau for further improved solution
To obtain an improved solution to the problem, we need to revise again using the
same procedure
a. Obtain the key column, key row and key element. The largest ∆j which is
represent the key column. Using the key column the replacement ratio can
be found. Accordingly the first row is the key row and the outgoing variable
is S1.
The intersection of the key column and key row yields the key element
b. With the information of key column, key row and key element, now we
can obtain a revised table.

Basis X1 X2 S1 S2 bi
X2 35
0 1 2/3 -1/3 8
X1 40
1 0 -1/2 ½ 18
Cj 40 35 0 0
solution 18 8 0 0
∆j 0 0 -10/3 -25/3
• This solution x1 = 18 , x2 = 8, yields high value
the objective function value 40 x 18 + 35 x 8 + 0 x 0 + 0 x 0 = 1000
• The row values of ∆j being ≤ 0, indicates that the solution is optimal
• The resource are used fully too

You might also like