Chapter 2-3 The Simplex Method

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 19

Operations Research = Chap 2 part 3

Simplex Method

2.4. THE SIMPLEX METHOD


The graphical method of solving linear programming problems is a simple way to find a
solution since the optimum solution is searched among the corner points of the solution space.
However, the graphical method is restricted to problems with two decision variables. When the
number of variables and the number of constraints increase, it becomes difficult to visualize the
solution space. As a result, the graphical method cannot be employed successfully in such cases.
In order to avoid this limitation, the simplex method/ iterative/ step by step method is efficient
method for solving linear programming problems, which was developed by George B. Datzing in
1947.

The simplex method is an algebraic procedure that starts with a feasible solution that is not
optimal and systematically moves from one feasible solution to another until an optimal solution
is found. In case of the graphical approach, optimal solution occurs at the extreme points where
the constraints intersect. Solutions where constraints intersect are called basic solutions, and
those satisfying all of the constraints together with non-negativity constraints are called basic
feasible solutions.

Constraints are generally expressed using inequalities either in ‘less than’ or ‘greater than’ or
in mixed form. Thus, constraints are not in standard form, meaning they should be converted
into equalities. To convert the inequality constraint into equality, we introduce slack or surplus
variables. In economic terminology, slack variables represent unused capacity and surplus
variables represent excess amount. The contribution (cost or profit) associated with the slack and
surplus variables are zero. An inequality of the ‘less than or equal to’ type is transformed into
equality by introducing a non-negative slack variable, as follows:

Example
Non Standard form Standard form
X 1+2X2 ≤ 6 X 1+2X2+S1= 6 one constraint that it
needs only one Slack variable (S1).
,where X1 and X2 are decision variables and S1 is a slack variable, added to the smaller side
of the inequality.

On the other hand, an inequality with ‘greater than or equal to’ type is changed into equality by
subtracting surplus variable as follows: -

Example
Non Standard form Standard form
X1+2X2 ≥ 6 X1+2X2-S1= 6

26
Operations Research = Chap 2 part 3
Simplex Method

,where X1 & X2 are decision variables and S1 is a surplus variable, subtracted from larger side
of the inequality.
As stated above, since both the slack and surplus variables are insignificant with no contribution
in the objective function, they are represented with coefficient of zero in the objective function.

To find a unique solution, the number of variables should not exceed the number of equations.
When the number of variables is more than the number of equations, the number of solutions is
unlimited. So as to get a unique solution, we have to set at least (n-m) variables to zero, where n
is the number of variables and m is the number of equalities. Those variables that are set to zero
are called non basic variables indicating they are not in the solution. The variables that are in
solution are called basic variable.
To demonstrate the simplex method, we will use the microcomputer problem with the following
objective function and constraints.
The Microcomputer Problem, which was discussed in graphic approach, can be standardized as:
Max. Z = 60X1+ 50X2 + 0S1 + 0S2 + 0S3
Subject to 4X1+10X2+S1 = 100
2X1+X2+S2 = 22
3X1+3X2+S3 = 39
, where X1 & X2 are decision variables and S1, S2 & S3 are slack variables.
Here, the number of variables (5) is greater than the number of equations (3). Therefore, the
decision variables are set to zero and we have
X1 = 0, X2 = 0, S1 = 100, S2 = 22, and S3 = 39.
This solution will serve as an initial feasible solution. An initial feasible solution is a first
solution used to generate other basic feasible solutions. The initial basic feasible solution is
obtained by setting all the decision variables to zero. As a result, the initial basic feasible
solution is entirely composed of the slack variables. X1 & X2 are non basic variables since they
are not in solution. S1, S2 & S3 are basic variables since they are in solution.
A tableau is a system of displaying the basic feasible solution, the constraints of the standard
linear programming problem as well as the objective function in a tabular form. A tableau is
useful in summarizing the result of each iteration i.e. the process of moving from one
solution/corner to another solution/corner in order to select the optimal solution.

2.4.1. THE SIMPLEX ALGORITHM


2.4.1.1. Maximization case
The solution steps of the simplex method can be outlined as follows:
Step 1. Formulate the linear programming model of the real world problem, i.e., obtain a
mathematical representation of the problem's objective function and constraints.

26
Operations Research = Chap 2 part 3
Simplex Method

Step 2. Express the mathematical model of L.P. problem in the standard form by adding slack
variables in the left-hand side of the constraints and assign a zero coefficient to these
in the objective function.
Thus we can restate the problem in terms of equations:

Maximize Z = C1X1+ C2X2 + ... +CnXn + OS1 + OS2 +... +0Sm


Subject to a11X1+a12X2 +... + a1nXn + S1 = b1
a2lX1+a22X2 +... + a2nXn + S2 = b2
. . . . .

. . . . .

. . . . .

amlXl + am2 X2 +... + amnXn + Sm = bm


, where X1, X2... Xn and S1, S2 ... Sm are non-negative.
Note that the slack variables have been assigned zero coefficients in the objective function. The
reason is that these variables typically contribute nothing to the value of the objective function.
Step 3. Design the initial feasible solution. An initial basic feasible solution is obtained by
setting the decision variables to zero.
X1= X2 = ... = Xn = 0. Thus, we get S1 = b1, S2 = b2 ... Sm = bm.

Step 4. Set up the initial simplex tableau. For computational efficiency and simplicity, the
initial basic feasible solution, the constraints of the standard LPP as well as the
objective function can be displayed in a tabular form, called the simplex tableau as
shown below:
Initial Simplex Tableau
Cj C1 C2 ... Cn,, 0 0 ... 0 Quantity Column Ratio
(Contribution Per Unit) XB/amn
Basic variables CB X1, X2, ... Xn S1 S2 ... Sm b(=Xj)
S1 CB1 a11 a12 ... a1n 1 0 ... 0 b1=Xb1
S2 CB2 a21 a22 ... a2n 0 1 ... 0 b2=Xb2
Sm CBm am1 am2…amn 0 0 ... 1 bm=Xbm
Zj=∑CBiXj 0 0 ... 0 0 0 ... 0 ∑CBiXj
Cj-Zj C1-Z1 C2-Z2 ... Cn-Zn
(Net contribution per
unit)
The interpretation of the data in the above tableau is given as under. Other simplex tableau will
have similar interpretations.
In the first row labeled "Cj", we write the coefficients of the variables in the objective
function. These values will remain the same in subsequent tableaus.

26
Operations Research = Chap 2 part 3
Simplex Method

The second row shows the major column headings.


In the first column of the second row, under the label "Basic variables" (also called
Product mix column), the basic variables are listed.
In the second column of the second row, under the label "CB", the coefficients of the
current basic variables in the objective function are listed. Thus the coefficients of S 1,
S2... Sm, which are included in the initial feasible solution, are written in the CB column.
The values listed under the non-basic variables (X 1, X2… Xn) in the initial simplex
tableau consists of the coefficients of the decision variables in the constraint set. They
can be interpreted as physical rates of substitution.
The values listed under the basic variables (S 1, S2... Sm) in the initial simplex tableau
represents the coefficients of the slack variables in the constraints set.
In the next column (also called Quantity column), we write the solution values of the
basic variables.
To find an entry in the Zj row under a column, we multiply the entries of that column by
the corresponding entries of ‘CB’ column and add the results, i.e., Z j= ∑CBiXj. The Zj
row entries will all be equal to zero in the initial simplex tableau. The other Z j entries
represent the decrease in the value of objective function that would result if one of the
variables not included in the solution were brought into the solution. The Z j entry under
the “Quantity Column" gives the current value of the objective function.
The last row labeled "Cj-Zj", called the index row or net evaluation row, is used to
determine whether or not the current solution is optimal or not. The calculation of C j-Zj
row simply involves subtracting each Zj value from the corresponding Cj value for that
column, which is written at the top of that column. We observe that C j -Zj, values are
meaningful for the non-basic variables only. This is because for a basic variable, Zj= 1 x
Cj = Cj so that Cj-Zj=Cj-Cj= 0.

Note: The entries in the Cj - Zj, row (i.e., index row) represent the net contribution to the
objective function that results by introducing one unit of each of the respective
column variables. A plus value indicates that a greater contribution can be made by
bringing the variable for that column into the solution. A negative value indicates the
amount by which contribution would decrease if one unit of the variable for that
column were brought into the solution. Index row elements are also known as the
shadow prices (or accounting prices)
Step 5. We test if the current solution is optimum or not. If all the elements or entries in the
Cj- Zj row (i.e., index row) are negative or zero, then the current solution is
optimum. If there exists some positive number, the current solution can be further
improved by removing one basic variable from the basis and replacing it by some
non-basic one. So start trying to improve the current solution in line with the
following steps.

26
Operations Research = Chap 2 part 3
Simplex Method

Step 6. Further, iterate towards an optimum solution. To improve the current feasible
solution, we replace one current basic variable (called the departing or leaving
variable) by a new non-basic variable (called the entering variable).
We now determine the variable to enter into the solution mix, the entering variable. One
way of doing this is by identifying the column with the largest positive value in the C j -
Zj row of the simplex table. The column with the largest positive entry in the Cj - Zj row
is called the key or pivot column. The non-basic variable at the top of the key column is
the entering variable that will replace a basic variable.
Next, we determine the departing variable to be replaced in the basis solution. This is
accomplished by dividing each number in the quantity column by the corresponding
number in the key column selected in identifying the entering variable. We compute the
ratio b1/a1j, b2/a2j... bm/amn. This is called replacement ratio.

Replacement Ratio (RR) = Solution Quantity (Q)


Corresponding values in pivot column

The row with the minimum ratio is the key row or pivot row. The corresponding variable
in the key row (the departing variable) will leave the basis.
We identify the key or pivot element. This is the number that lies at the intersection of the
key column and key row of a given simplex tableau.
Step7. Evaluate the new solution by constructing a second simplex tableau. After
identifying the entering and departing variable, all that remains is to find the new
basic feasible solution by constructing a new simplex tableau from the current one.
Now we evaluate or update the new solution in the following way:
New values for the key row are computed by simply dividing every element of the key
row by the key element to obtain a unit vector (1) in the key element.
The new values of the elements in the remaining rows for the new simplex table can be
obtained by performing elementary row operations on all rows so that all elements except
the key element (1) in the key column are zero, i.e. unit vector.
New entries in the CB column and XB column are entered in the new table of the current
solution.

Elementary row operation for entering variable in new simplex tableau


Old row of leaving variable
Improved row for entering variable =
Intersection key element

Elementary row operation for new simplex tableau


New row of Old row of _ Corresponding Improved row for
= ×
existing variable existing variable key element entering variable

26
Operations Research = Chap 2 part 3
Simplex Method

Compute the values of the Cj - Zj row. If all the numbers in Cj - Zj row are either negative
or zero, an optimum solution has been obtained.
Step 8. If any of the numbers in C j - Zj row are positive, repeat the steps (6-7) again until
an optimum solution has been obtained.

Note: Rules for Ties. In choosing a key column and a key row, whenever there is a tie
between two numbers, the following rules may be followed:
The column farthest (extreme) to the left may be selected if there is a tie between two
numbers in the index row.
The nearest ratio to the top may be selected whenever there is a tie between two
replacement ratios in the ratio column.

Example (Maximization Case)


Finding the initial Feasible Solution
As discussed above, the initial feasible solution is found by setting the decision variables to zero.
Max Z = 60X1+50X2+0S1+0S2+0S3
Subject to 4X1+10X2+S1 = 100
2X1+ X2+S2 = 22
3X1+ 3X2+S3 = 39
X1, X2 > = 0
Initial Simplex tableau
Cj 60 50 0 0 0 Quantity
Basic V. X1 X2 S1 S2 S3
S1 0 4 10 1 0 0 100
S2 0 2 1 0 1 0 22
S3 0 3 3 0 0 1 39
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0
Interpretation of the Initial Feasible Solution
To be noted first is that the values of each basic variable (variables that are in solution) is
composed of a single 1 and the rest 0’s. This is called a unit vector. Basic variables will have a
unit vector. Moreover, ‘1’ will appear in the same row that the variable appears in. The unit
vector concept will help us in developing subsequent tableaus when we want to change the list of
variables that are in solution. The Zj row in the quantity column indicates that the value of the
objective function is 0. The values in the Cj-Zj row indicate the net contribution of the variables
if one unit of each variable is added into that solution. For example, the 60 in column X 1
indicates that bringing one unit of X1 would increase the value of the objective function by $60.
The same is true for the X 2 column, i.e. bringing one unit of X 2 would increase the value of the
objective function by $50. On the other hand, since the slack variables are at their maximum,

26
Operations Research = Chap 2 part 3
Simplex Method

their values in the Cj-Zj row are all 0. According to what has been said before, we have the
following rule in order to identify an optimal solution.
A simplex solution in a maximization problem is optimal if the C j-Zj row consists of entirely
zeros and negative numbers, i.e. there are no positive values in the row.
So for our case in the initial tableau, we have two positive values under the non-basic variables,
which indicate that further improvement of the solution is possible. As a result, we go for the
optimal solution by developing the second simplex tablea
Developing the Second Simplex Tableau
In the initial feasible solution, the slack variables form entirely the basic variables and the decision
variables entirely form the non-basic variables. Since further improvement is possible, one of the decision
variables will be brought into the solution and one of the current basic variables will be leaving the
solution. ‘Which non-basic variable should be brought into the solution and which basic variable should
leave the solution?’ is a major concern here.
In answering the first question, the non-basic variable that should enter the solution should be the one
with the highest positive value in the Cj-Zj row since bringing that non-basic variable into the solution
would make the highest contribution to the solution (objective function) and result in the largest profit
potential. As a result, the variable with the highest value in the C j-Zj row of the initial simplex tableau is
the X1 column with a value 60. Therefore, X 1 should enter the basis or the solution mix. The X 1 column is
now called the pivot column. The numbers in this column (4 2 3) indicate the amount of the basic
variables needed to get one unit of X 1. For example, the number 4 indicates that 4 units of the first slack
are needed to obtain one unit of X1.
Since X1 has the highest profit potential, we need to make as much X 1 units as possible. The amount of X 1
that can be made depends on the values in the pivot column and the amount of slack available shown
under the quantity column. By dividing the values in the pivot column by their respective values in the
quantity column, we can identify the variable that is most limiting.
The values obtained by dividing will help us in determining the variable that should leave the
solution.
Cj 60 50 0 0 0 Quantity Ratio = Q
Basic V. X1 X2 S1 S2 S3 (Q) Pv column

S1 0 4 10 1 0 0 100 100/4 = 25
S2 0 2 1 0 1 0 22 22/2 = 11
S3 0 3 3 0 0 1 39 39/3 = 13
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0

Pivot Column
Pivot Row Pivot Element
In interpreting the ratios obtained by the division, I only the constraint was the first one, we
could make 25 units of X1. But there are also other constraints. Therefore, the one with the
smallest non-negative ratio is the most restrictive since it determines the amount of X 1. In this particular

26
Operations Research = Chap 2 part 3
Simplex Method

case, there is only enough of the second constraint to make 11 units of X 1. In making the 11 units of X1,
the second resource (S2) will be down to zero indicating that S 2 will leave out the solution mix. The row
of the leaving variable is called the pivot row. The intersection of the pivot row and the pivot column is
called the pivot element. As a rule, the leaving variable is the one with the smallest non-negative ratio.

If a zero is obtained in the results of division, none of the corresponding variable is needed to obtain one
unit of the entering variable. If a negative value is obtained in the division, bringing the entering variable
into the solution would increase the amount of the basic variable. These values will not limit the amount
of the entering variable. Therefore, there is no need to divide the quantity column by zero or negative.
Since we have determined the leaving and the entering variables and since the initial feasible solution can
be improved further, we need to develop the second tableau in order to find the optimal solution. In
developing the second tableau, we should compute for revised values of the constraint equations, the Zj
row and the Cj-Zj row and remember that the variables in solution will have a unit vector, with a value of
1 in the intersection of the column and the row of the basis, i.e. the pivot element.

To obtain a unit vector in the basis column, we perform elementary row operations resulting in new row
values by either multiplying/dividing all the elements in a row by a constant or adding/subtracting the
multiple of a row to or from another row.
In computing for the new row values from our initial simplex tableau, we first multiply the second
constraint by ½ obtaining the values as follows:
1X1+1/2X2+0S1+1/2S2+0S3 = 11, which results in making the pivot element 1.
Next, we multiply the above new row values by 4 and subtract it from the first constraint obtaining the
following results:
0X1+8X2+1S1+2S2+0S3 = 56.
Then, we multiply the new row values in the pivot row by 3 and subtract it from the third constraint
resulting as follows:
0X1+3/2X2+0S1-3/2S2+1S3 = 6
Having these new row values, we develop the second simplex tableau as shown below.
Second Simplex Tableau
Cj 60 50 0 0 0 Quantity
Basic V. X1 X2 S1 S2 S3
S1 0 0 8 1 -2 0 56
X2 60 1 ½ 0 ½ 0 11
S3 0 0 3/2 0 -3/2 1 6
Zj 60 30 0 30 0 660
Cj-Zj 0 20 0 -30 0

Interpretation of the Second Simplex Tableau


The profit obtained at this point of solution is $660. In the Cj-Zj row, we search for the highest
positive value. If there is, it means that we can further improve this solution. Therefore, we have
a positive value in the Cj-Zj row which indicates that this is not the optimal solution. As a result, we go
for the next tableau.
Developing the Third Tableau

26
Operations Research = Chap 2 part 3
Simplex Method

Here, we select the entering and the leaving variables. The entering variable is the one with the highest C j-
Zj row value which is the X2 column. This means that bringing one unit of X 2 into the solution increases
profit by $20. Therefore, the X2 will be the entering variable designated as the pivot column.
To determine the leaving variable, we divide the values in the pivot column by their corresponding row
values in the quantity column. The result obtained, as shown in the table below indicates that S 3 is the
leaving variable with the smallest non-negative ratio. This means that S 3 is the most limiting resource for
how much units of X2 can be made.

Cj 60 50 0 0 0 Quantity
Basic V. X1 X2 S1 S2 S3
S1 0 0 8 1 -2 0 56 56/8 = 7
X2 60 1 ½ 0 ½ 0 11 11/(1/2) = 22
S2 0 0 3/2 0 -3/2 1 6 6/(3/2) = 4
Zj 60 30 0 30 0 660
Cj-Zj 0 20 0 -30 0

Pivot Row
Pivot Column Pivot Element
After identifying the entering and the leaving variables, we perform elementary row operations as follows. To obtain
a unit vector with 1 in the pivot element, we multiply the pivot row by 2/3 resulting as follows:
0X1+1X2+0S1+-1S2+2/3S3 = 4
Then, multiply the above new row values by 8 and subtract it from the first constraint (row) resulting as follows:
0X1+0X2+1S1+6S2+-16/3S3 = 24.
For row 2, first multiply the new row values in the pivot row by ½ and subtract it from the second row resulting as
follows:
1X1+0X2+0S1+1S2+-1/3S3 = 9.
And the third tableau looks like the following.
Third Simplex Tableau
Cj 60 50 0 0 0 Quantity
Basic V. X1 X2 S1 S2 S3
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
X2 50 0 1 0 -1 2/3 4
Zj 60 50 0 10 40/3 740
Cj-Zj 0 0 0 -10 -40/3

Interpreting the Third Tableau

26
Operations Research = Chap 2 part 3
Simplex Method

All the values in the C j - Zj row are zero and negative indicating that there cannot be additional
improvement. This makes the third tableau to contain the optimal solution with the following
basic variables:
S1 = 24, X1 = 9, and X2 = 4 producing a maximum profit of $740.
This means that in order to achieve the maximum profit, the company should produce 9 units of
X1 and 4 units of X2 leaving 24 hours of unused resource of the second constraint.

2.4.2. SIMPLEX MAXIMIZATION WITH MIXED CONSTRAINTS


(≤ , = AND ≥ CONSTRAINTS)
2.4.2.1. The Big M Method - Introducing Slack, Surplus and Artificial
variables
If any problem constraint has negative constants on the right side, multiply both sides by -1
to obtain a constraint with a non-negative constant. (If the constraint is an inequality, this
will reverse the direction of the inequality).
Introduce a slack variable in each ≤ constraints.
Introduce a surplus variable and an artificial variable in each ≥ constraint.
Introduce an artificial variable in each '='constraint.
For each artificial variable Ai, add -MAi to the objective function in case of
maximization and +MAi in case of minimization.
Use the same constant M for all artificial variables.
Form the simplex tableau for the modified problem.
Solve the modified problem using the simplex method.
Relate the solution of the modified problem to the original problem:
If the modified problem has no solution, then the original problem has no
solution.
If any artificial variables are non-zero in the solution to the modified problem,
then the original problem has no solution.

26
Operations Research = Chap 2 part 3
Simplex Method

Note. The artificial variables are introduced for the limited purpose of obtaining an initial
solution and are required for the constraints of ≥ type or the constraints with '=' sign . It is not
relevant whether the objective function is of the minimization or the maximization type.
Obviously, since artificial variables do not represent any quantity relating to the decision
problem, they must be driven out of the system and must not remain in the final solution (and if
at all they do, it represents a situation of infeasibility). This can be ensured by assigning an
extremely high cost to them. Generally, a value M is assigned to each artificial variable, where
M represents a number higher than any finite number. For this reason, the method of solving
the problems where artificial variables are involved is termed as the 'Big M Method'. When the
problem is of the minimization nature, we assign in the objective function a coefficient of +M to
each of the artificial variables. On the other hand, for the problems with the objective function of
maximization type, each of the artificial variables introduced has a coefficient -M.

In case of equality constraints, a slack variable is not acceptable since these constraints require
a precise amount. To overcome this problem, artificial variables are introduced which are added
to = and >= constraints. They have no physical representation for their purpose is to allow the
use of simplex process. As a result, they should not appear in the final optimal solution.
Assignment of coefficients for artificial variables depends on the type of the problem, whether it
is a maximization or a minimization problem. In case of maximization problem, a large negative
contribution or coefficient in the objective function would ensure the removal of artificial
variables from the optimal solution, commonly represented by -M. For minimization problems,
introducing a large positive coefficient would ensure the non-existent of artificial variables in
the optimal solution, commonly represented by M.

In addition to this, a slack is not allowed in ≥ constraints since they can only happen an excess
amount that is more than the minimum amount of a constraint. This excess amount is represented
by a surplus variable and is subtracted from the constraint.
Example – Maximization Problems with Mixed Constraints
Assume the following maximization problem with mixed constraints.

Max. Z = 6X1+8X2
Subject to X2 ≤ 4
X1+X2 = 9
6X1+2X2 ≥ 24

In solving for this problem, introducing a slack variable is not acceptable since they represent
unused capacity and there is no unused capacity in = and >= constraints. Therefore, for >=
constraints, we introduce a surplus variable and for both >= and = constraints we introduce
artificial variables resulting as follows.

26
Operations Research = Chap 2 part 3
Simplex Method

Max Z = 6X1+8X2+0S1+0S3-MA2-MA3
Subject to X2+ S1 = 4
X1+X2+A2 = 9
6X1+2X2-S3+A3 = 24
X1, X2 ≥ 0
Wouldn’t it be possible to set A2 as A1 and A3 as A2 in the above standardized LPM form?

Developing the Initial Simplex Tableau


In the initial tableau, we list the variable in the order of decision variable, slack/surplus variables
and finally artificial variables. And for constraints, use artificial variables, and/or slack variables
and/or surplus variables for the initial solution. Therefore the initial tableau for the problem is
represented as follows.

Initial Simplex Tableau


Cj 6 8 0 0 -M -M Quantity
Basic V. X1 X2 S1 S3 A2 A3
S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24
Zj -7M -3M 0 +M -M -M -33M
Cj-Zj 6+7M 8+3M 0 -M 0 0
Since this is a maximization problem, the entering variable is the one with the maximum C j-Zj
value. Therefore, the variable with the maximum Cj-Zj is X1, the decision variable. And the
leaving variable is with the minimum non-negative ratio which is A3, the artificial variable.
Since this artificial variable is not needed we remove it from the next tableau.

Developing the Second Simplex Tableau


After identifying the entering and the leaving variable, the usual elementary row operations are performed
to obtain a unit vector in the entering variable column. The end result after performing the row operations
is as follows which shows the second tableau.
Second Simplex Tableau
Cj 6 8 0 0 -M Quantity
Basic V. X1 X2 S1 S3 A2
S1 0 0 1 1 0 0 4
A2 -M 0 2/3 0 1/6 1 5
X1 6 1 1/3 0 -1/6 0 4
Zj 6 2-2/3M 0 -1-M/6 -M 24-5M
Cj-Zj 0 6+2/3M 0 1+M/6 0

26
Operations Research = Chap 2 part 3
Simplex Method

Again here, we identify the leaving the entering variables, i.e. the pivot row and the pivot column
respectively. The entering variable with the highest C j-Zj row value is X2 and the leaving variable with the
smallest ratio is S1.
Developing the Third Simplex Tableau
Selecting the entering and leaving variables, we go for obtaining a unit vector in the pivot column by
using the elementary row operations. We get the following third tableau.
Third Simplex Tableau

Cj 6 8 0 0 -M Quantity
Basic V. X1 X2 S1 S3 A2
X2 8 0 1 1 0 0 4
A2 -M 0 0 -2/3 1/6 1 7/3
X1 6 1 0 -1/3 -1/6 0 8/3
Zj 6 8 6+2/3M -1-M/6 -M 48-7/3
Cj-Zj 0 0 -6-2/3M 1+M/6 0

Similarly, we identify the entering and the leaving variables which are S 3 and A2 respectively
representing the maximum Cj-Zj value and the minimum ratio.

Developing the Fourth Simplex Tableau


Perform elementary row operations usual to have a unit vector in the entering variable column
and you will get the following fourth tableau.
Fourth Simplex Tableau

Cj 6 8 0 0 Quantity
Basic V. X1 X2 S1 S3
X2 8 0 1 1 0 4
S3 0 0 0 -4 1 14
X1 6 1 0 -1 0 5
Zj 6 8 2 0 62
Cj-Zj 0 0 -2 0
This tableau represents the final tableau since we have only zeros and negative values in the C j-Zj
row which indicates that it is the optimal solution. So we have the following results for each of
the variables and the profit obtained.
X1 = 5, X2 = 4, S3 = 14, and Profit = 62

2.4.2.2. MINIMIZATION LINEAR PROGRAMMING PROBLEMS


(Big M-method /Charnes Penalty Method)
The Big-M Method is a technique, which is used in removing artificial variables from the basis
.In this method; we assign coefficients to artificial variables, undesirable from the objective
function point of view. If objective function Z is to be minimized, then a very large positive price

26
Operations Research = Chap 2 part 3
Simplex Method

(called penalty) is assigned to each artificial variable. Similarly, if Z is to be maximized, then a


very large negative cost (also called penalty) is assigned to each of these variables. Following are
the characteristics of Big-M Method:

a. High penalty cost (or profit) is assumed as M


b. M as a coefficient is assigned to artificial variable A in the objective function Z.
c. Big-M method can be applied to minimization as well as maximization problems with the
following distinctions:
i. Minimization problems
- Assign +M as coefficient of artificial variable A in the objective function
Z of the minimization problem.
ii. Maximization problems:
- Here –M is assigned as coefficient of artificial variable A in the objective
function Z of the maximization problem.
d. Coefficient of S (slack/surplus) takes zero values in the objective function Z
e. For minimization problem, the incoming variable corresponds to the smallest negative (or
highest numerical value with negative sign) value of Cj-Zj.
f. The solution is optimal when there is no negative value of Cj-Zj.(For minimization LPP case)
The various steps involved in using simplex method (Big M Method) for minimization problems
are:
Step 1. Formulate the linear programming model, and express the mathematical model of L.P.
problem in the standard form by introducing surplus and artificial variables in the
left hand side of the constraints. Assign a 0 (zero) and +M as coefficient for surplus
and artificial variables respectively in the objective function. M is considered a very
large number so as to finally drive out the artificial variables out of basic solution.
Step 2. Next, an initial solution is set up. Just to initiate the solution procedure, the initial basic
feasible solution is obtained by assigning zero value to decision variables. This
solution is now summarized in the initial simplex table. Complete the initial simplex
table by adding two final rows Z, and Cj - Zj. These two rows help us to know whether
the current solution is optimum or not.
Step 3. Now; we test for optimality of the solution. If all the entries of Cj - Zj, row are positive,
then the solution is optimum. However, this situation may come after a number of
iterations. But if at least one of the Cj - Zj values is less than zero, the current solution
can be further improved by removing one basic variable from the basis and replacing
it by some non-basic one.
Step 4. (i) Determine the variable to enter the basic solution. To do this, we identify the column
with the smallest negative value (or highest numerical value with negative sign) in
the Cj - Zj row of the table.
(ii) Next we determine the departing variable from the basic solution. If an artificial
variable goes out of solution, then we discard it totally and even this variable may not

26
Operations Research = Chap 2 part 3
Simplex Method

form part of further iterations. Same procedure, as in maximization case, is employed


to determine the departing variable.

Step 5. We update the new solution now. We evaluate the entries for next simplex table in
exactly the same manner as was discussed earlier in the maximization case.

Step 6. Step (3—5) are repeated until an optimum solution is obtained.


So the following are the essential things to observe in solving for minimization problems:
The entering variable is the one with the smallest negative value (or highest numerical
value with negative sign) in the Cj-Zj row while the leaving variable is the one with the
smallest non-negative ratio.
The optimal solution is obtained when the Cj-Zj row contains entirely zeros and positive
values.

Example: Assume the following minimization problem.


Min Z = 7X1+9X2
Subject to 3X1+6X2 ≥ 36
X1+4X2 ≥ 64
X1, X2 ≥ 0

We introduce both surplus and artificial variables into both constraints as follows.
Min Z = 7X1+9X2+0S1+0S2+MA1+MA2
Subject to 3X1+6X2 –S1+A1 = 36
X1+4X2 -S2+A2 = 64
X1, X2 > = 0
So the subsequent tableaus for this problem are shown below. To remind in these tableaus is in
transforming from one tableau to another, we perform elementary row operations to obtain the
unit vector in the pivot column for the entering variable into the solution.
Initial Simplex Tableau
Cj 7 9 0 0 M M Quantity Ratio
Basic V. X1 X2 S1 S2 A1 A2
A1 M 3 6 -1 0 1 0 36 6 ←
A2 M 1 4 0 -1 0 1 64 16
Zj 4M 10M -M -M M M 100M
Cj-Zj 7-4M 9-10M M M 0 0

Second Simplex Tableau


Cj 7 9 0 0 M M Quantity Ratio

26
Operations Research = Chap 2 part 3
Simplex Method

Basic V. X1 X2 S1 S2 A1 A2
X2 9 ½ 1 -1/6 0 1/6 0 6 12
A2 M -1 0 2/3 -1 -2/3 1 40 8←
Zj 9/2-M 9 -3/2+2/3M -M 3/2-2/3M M 54+40M
Cj-Zj 5/2+M 0 3/2-2/3M M 3/2+M/ 0

Third Simplex Tableau
Cj 7 9 0 0 M M Quantity Ratio
Basic V. X1 X2 S1 S2 A1 A2
X2 9 1/4 1 0 -1/4 0 1/4 16
S1 0 -3/2 0 1 -3/2 -1 3/2 60
Zj 9/4 9 0 -9/4 M 9/4 144
Cj-Zj 3 0 0 9/4 0 M-9/4

The third tableau represents a final tableau since it is the optimal solution with entirely zeros and
non-negative values in the Cj-Zj row ≥ 0.
Therefore, the optimal solution is: X1 = 0 and S2 = 0, and X2 = 16 and value of objective function
is 144
2.4.3. SPECIAL ISSUES
Several special situations which one many encounter during the application of simplex method
are summarized below:
Non-feasible Solution/ Infeasibility
A situation with no feasible solution may exist if the problem was formulated incorrectly.
Infeasibility comes about when there is no solution that satisfies all of the problem’s constraints.
In the simplex method, an infeasible solution is indicated by looking at the final tableau
Whenever the optimality criteria is satisfied but still there exist an artificial variable in the basis
or solution mix, this is the indication of infeasibility. Example: Minimization case
Cj 5 8 0 0 M
Basic V X1 X2 S1 S2 A2 Q
X1 5 1 1 -2 3 0 200
X2 8 0 1 1 2 0 100
A2 M 0 0 0 -1 1 20
Zj 5 8 -2 31-M M 1,800+200M
Cj - Zj 0 0 2 M-31 0
Even though all Cj - Zj are positive or 0 (i.e. the criterion for an optimal solution in a
minimization case), no feasible solution is possible because an artificial variable (A2) remains
in the solution mix.
Unbounded Solution

26
Operations Research = Chap 2 part 3
Simplex Method

No finite solution may exist in problems that are not bounded. This means that a variable can be
infinitely large without violating a constraint. In the simplex method, the condition of
unboundedness will be discovered prior to reaching the final tableau. We will note the problem
when trying to decide which variable to remove from the solution mix.
The procedure in unbounded solution is to divide each quantity column number by the
corresponding pivot column number. The row with the smallest positive ratio is replaced. But if
the entire ratios turn out to be negative or undefined, it indicates that the problem is unbounded.
Note: A negative ratio means that increasing that variable would increase resources. A zero
ratio means that increasing the variable would not use any resources.
Example: Maximization case:

Cj 6 9 0 0
Basic V X1 X2 S1 S2 Q
X2 9 -1 1 2 0 30
S2 0 -2 0 -1 1 10
Zj -9 9 18 0 270 RR
Cj - Zj 15 0 -18 0
30/-1=-30
Pivot Column Unacceptable RRs

The solution in the above case is not optimal because not all Cj - Zj entries are 0 or negative, as
10/-2=-5
required in a maximization problem. The next variable to enter the solution should be X1.To
determine which variable will leave the solution, we examine the ratios of the quantity column
numbers to their corresponding numbers in the X1 or pivot column. Since both pivot column
numbers are negative, an unbounded solution is indicated.
Note: When unbounded solutions occur, no outgoing variable will exist.
Degeneracy /Tie for leaving basic variable (key row)/
If there is a tie for the smallest ratio, this is a signal that degeneracy exists. Degeneracy can occur right in
the first (initial tableau). This normally happens when the number of constraints is less than the number
of variables in the LP model. Such problems can be overcome by trial and error method. If this is
resolved by a proper selection of the key element, degeneracy can be avoided. The main drawback to
degeneracy is the increase in the computation, which reduces the efficiency of the simplex method
considerably.

Example

Cj 5 8 2 0 0 0
Q RR
SV X1 X2 X3 S1 S2 S3
8 X2 1/4 1 1 -2 0 0 10 10/1/4=40
0 S2 4 0 1/3 -1 1 0 20 20/4=5 Tie for the
smallest ratio
0 S3 2 0 2 2/5 0 1 10 10/2=5
indicates
Zj 2 8 8 16 0 0 80 degeneracy.
Cj - Z j 3 0 -6 -16 0 0

26
Operations Research = Chap 2 part 3
Simplex Method

Degeneracy could lead to a situation known as cycling, in which the simplex algorithm alternatives back
and forth between the same non-optimal solutions, i.e., it puts a new variable in, then takes it out in the
next tableau, puts it back in, and so on. One simple way of dealing with the issue is to select either row
(S2 or S3 in this case) arbitrary. If we are unlucky and cycling does occur, we simply go back and select
the other row. However, the number of iterations required to arrive at the optimal solution can be
minimized by adopting the following rule:
 Divide the coefficient of slack variables in the simplex table where degeneracy is detected by the
corresponding positive numbers of the key column in the row, starting from left to right.
 The row which contains smallest ratio comparing from left to right column wise becomes the key
row. For the above example:
Column
Row s2 s3
s2 1 0
s3 0 1

Divide the coefficients by the corresponding element of the key column, we obtain the following:
Column
Row s2 s3
S2 ¼=¼ 0/4 = 0
S3 0/2 = 0 ½ = 1/2
Comparing the ratios from left to right column wise until they are not equal, the minimum ratio occurs for
the second row (0). Therefore, s3 is selected to leave the basis.
Note: When there is a tie between a slack and artificial variable to leave the basis, the preference shall
be given to artificial variable to leave the basis and there is no need to apply the procedure for
resolving such cases.

Two incoming variables / or Tie for entering variables/


In order to break this tie, the selection for the key column (entering variable) can be made arbitrary.
However; the number of solution can be minimized by adopting the following rules:
1. If there is a tie between two decision variables, then the selection can be made arbitrary.
2. If there is a tie between a decision variable and a slack (or surplus) variable, then select the
decision variable to enter into basis first.
3. If there is a tie between slack or surplus variable, then selection can be made arbitrary.
Example: If the equation is max Z:
Cj
Basic V X1 X2 S1 S3 Q

Zj
C j - Zj 5 2 5 0

In such a case,X1 is the entering variable

Multiple Optimum Solutions


This situation occurs when there can be infinite number of solutions possible for a given problem. This
situation can be recognized in a simplex method when one of the non-basic variables in the C j-Zj, row

26
Operations Research = Chap 2 part 3
Simplex Method

have a value of zero. This is to mean in the optimal solution when non basic variable (variable not in the
basis) has a zero value in C-Z row, this is the indication of existence of multiple solution. To obtain the
other solution, we will make a non- basic variable with a zero C-Z value to enter in to the basis and solve
in the same way as the one we did in the previous discussion.
Example: Maximization problem

Cj 3 2 0 0
Q
BV X1 X2 S1 S2
2 X2 3/2 1 1 0 6
0 S2 1 0 1/2 1 3
Zj 3 2 2 0 12
C j - Zj 0 0 -2 0

MaxZ=3X1+2X2
X1=0, X2=6, S2=3 and MaxZ=12 or: X1=3, X2=3/2 and Max Z=12
The Cj - Zj value of the non-basic variable (X1) is 0. Thus, this shows the existence of alternative optimal
solution. Can you identify more alternative optimal solutions?

26

You might also like