You are on page 1of 6

Simplex Method

Simplex algorithm is a special iterative procedure to determine basic feasible solutions to a


system of linear equations and testing each solution for optimality. The following procedure is as
follows:
1. Convert the inequalities to equalities by adding slack variables;
2. Set up the initial simplex tableau;
3. Find an initial feasible solution and use the pivoting process since simplex algorithm
iterates from one feasible solution to a better one until the optimum is reached;
4. Use the following simplex rules for a change of basis, that is, the process of adding a
variable and concurrently, removing a variable.

Simplex Rule 1
The variable having the largest value of cj – zj enters the basis for maximization. If all values of
cj – zj are zero or negative, the current basic solution is optimal. For minimization, however, the
variable having the smallest (most negative) value of cj – zj is selected as basis. If all values of c j – zj
are zero or positive, the current basic solution is optimal.

Remark: In cases of ties, we may arbitrarily choose one of the variables to enter the basis.

Simplex Rule 2
The outgoing variable has the smallest positive ratio of the solution and the exchange
coefficient of the incoming or entering variable. This rule applies for maximization and minimization
problems.

Remark: If there are negative, or zero, or undefined quotient, these are to be excluded from the
evaluation.

Illustrative Examples:

1. Maximize P = 12x1 + 15x2


Subject to:
4x1 + 3x2 ≤ 24
3x1 + 5x2 ≤ 30
x1 ,x2 ≥ 0

Solution:
Step 1. Convert the inequality to equality by adding a proper nonnegative number called slack variable
s1 to constraint one and to s2 constraint two. The slack variables have zero contribution margins. Thus
P = 12x1 + 15x2 + 0 s1 + 0 s2
4x1 + 3x2 + s1 + 0 s2 = 24
3x1 + 5x2 + 0s1 + s2 = 30
x1 ,x2 ,s1 ,s2 ≥ 0

Page 1 of 6
Step 2. Construct the first tableau.

Initial Simplex Tableau


cj OF 12 15 0 0
Solution Solution  E
ci Basis x1 x2 s1 s2
R3 0 s1 4 3 E1 1 0 24 24 3 = 8
R4 0 s2 3 5 E2 0 1 30 30 5 = 6 OV
R5 zj 0 0 0 0 0*
R6 cj - zj 12 15 0 0
IV

Analysis:
a) cj row contains the OF (objective function) where all the numerical coefficients are
written above their respective variables. For instance, 12 is written above x 1, 15
above x2 , 0 above s1 and s2. Similarly, the numerical coefficients of the constraints
are written below their respective variables in their appropriate columns. The right
hand side values are listed under the column labeled solution.

b) A close examination of table 1 yields a unit identity matrix whose variables s1 and s2
form the basis. The profit or contribution margins of s1 and s2 are written in the ci
column. Since the basic variables s1 and s2 are slack, the column labeled ci contains
zeros in the initial tableau.

c) The row labeled zj contains the sum of the products of the c i column times the
coefficients of xi columns.
*For the initial simplex tableau zj= 0.
z1 ( for x1 column) = 4(0) + 3(0) = 0
z2 ( for x2 column) = 3(0) + 5(0) = 0
z3 = 1(0) + 0(0) = 0
z4 = 0(0) + 1(0) = 0
z5 = 24(0) + 30(0) = 0

d) The row labeled cj - zj is obtained by subtracting the zj value of the jth column from
the objective function for the column.
cj = 12 15 0 0
- zj = 0 0 0 0
12 15 0 0

e) Column-Selection Principle.
Using the simplex Rule 1, x2 is the variable having the largest cj - zj value which
will enter the basis. Encircle this column. Draw an arrow labeled IV (incoming
variable). The coefficients of x2 for constraint 1 is encircled and called E 1 (exchange
coefficient for row 1) and for constraint 2, we encircle and call it E2.

Thus x2 column is to be converted to zero-one form.

f) Pivot-value selection principle.


Divide the solution column by the exchange coefficients, E 1 and E2 of the incoming
variable. From Simplex Rule 2, the outgoing variable s2 has the least ratio of the

Page 2 of 6
solution to the exchange coefficient. s2 is the outgoing variable to be replaced by x2 .
Encircle the row containing s2 and its intersection with the encircled incoming
column yields the pivot, thus 5 is the pivot which must be multiplied by its inverse
(1/5) to come up with a zero-one-form.

Step 3. Construct the second tableau.

Simplex Table 2
cj OF 12 15 0 0
Solution Solution  E
ci Basis x1 x2 s1 s2
R3 0 s1 11/5 E1 0 1 -3/5 6 6  11/5 = 30/11 OV
R4 15 x2 3/5 E2 1 0 1/5 6 6  3/5 = 10
zj 0 0 0 0 90
cj - zj 12 15 0 0
IV

Since x2 is the incoming variable, convert x2 column into zero-one form by dividing all entries
of R4 by 5. Solving in ST1 and ST2 simultaneously to eliminate x2, we get
4x1 + 3x2 + s1 + 0s2 = 24 4x1 + 3x2 + s1 + 0s2 = 24
-3(3/5x1 + 1x2 +0s1 + 1/5s2 = 6) -9/5 x1 -3x2 +0 s1 - 3/5s2 = -10
11/5 x1 + 0 + 1 s1 – 3/5s2= 6

Suppose we convert this row operation to column operations. Since R3 is in ST1 and R4 is in
ST2, let us call R3 as old R3 (OR3) and R4 as new R4(NR4). A close examination of R3 reveals
that 3 is E1. Let us now write our row operations in columnar form.

OR3 - E1x NR4


4 – 3 (3/5) = 11/5
3 – 3(1) = 0
1 – 3(0) = 1
0 – 3 (1/5) = -3/5
24 – 3(6) = 6

The obtained values are the new entries of R3 in ST2. Note that these values
are the same whether we use row or column operations.

Let us fill in the zj and cj – zj rows by following the steps outlined in ST1(remarks). The entries
show that x1 is the new incoming variable and s1 is the outgoing variable.

Step 4. Construct the third table by following the simplex rules.


Simplex Table 3
cj OF 12 15 0 0
Solution
ci Basis x1 x2 s1 s2
R1 12 x1 1 0 5/11 -3/11 30/11
R2 15 x2 0 1 -3/11 4/11 48/11
zj 12 15 15/11 24/11 1080/11
cj - zj 0 0 -15/11 -24/11

Page 3 of 6
Decision: This is the final tableau where x1 = 30/11, x2 = 48/11 units and the maximum profit is PhP
1080/11.

Example 2.
Maximize P = 8x1 + 9x2 + 4x3
Subject to: 2x1 + 2x2 + 3x3 ≤ 24
3x1 + 3x2 + 9x3 ≤ 27
x1, x2, x3  0

Step 1. Translate inequalities to equalities


Maximize P = 8x1 + 9x2 + 4x3+ 0s1 + 0s2
Subject to: 2x1 + 2x2 + 3x3 + s1 + 0s2 = 24
3x1 + 3x2 + 9x3 +0s1 + s2 = 27
x1 ,x2 ,x3 ,s1 ,s2 ≥ 0
Step 2.
Simplex Table 1
Initial Simplex Tableau
cj OF 8 9 4 0 0
Solution Solution  E
ci Basis x1 x2 x3 s1 s2
R1 0 s1 2 2 E1 3 1 0 24 24  2 = 12
R2 0 s2 3 3 E2 9 0 1 27 27 3 = 9 OV
R3 zj 0 0 0 0 0 0
R4 cj – zj 8 9 4 0 0
IV
Convert x2 column to zero-one from by pivoting 3 in row 2.

Simplex Table 2
cj OF 8 9 4 0 0
Solution Solution  E
ci Basis x1 x2 x3 s1 s2
R1 0 s1 0 0 -3 1 -2/3 6 24  2 = 12
R2 0 x2 1 1 3 0 1/3 9 27 3 = 9 OV
R3 zj 9 9 27 0 3 81
R4 cj – zj -1 0 -23 0 -3
IV

OR1 - E1x NR2


2 – 2 (1) = 0
2 – 2(1) = 0
3 – 2(3) = -3
1 – 2 (0) = 1
0 – 2(1/3) = -2/3
24 – 2(9) = 6

Decision: This is the final tableau where x1 = 0, x2 = 9 units and the maximum profit is PhP81.

Page 4 of 6
Steps in Solving Maximization Problem

1) Set up constraints from the conditions of the problem.

2) Convert the inequality explicit constraints to equations by adding slack variables.

3) Enter the numerical coefficients and variables in simplex tableau.

4) Calculate the opportunity cost and the net contributions.

5) Determine the optimum/pivot column or entering variable by choosing the most positive value
in the objective function.

6) Divide the quantity column values by the non-zero and non-negative entries in the pivotal
column. The smallest ratio/quotient belongs to the pivotal row.

7) Compute the values for the replacing row by dividing all entries by the pivot element. Enter the
result in the next table.

8) Compute the new entries for the remaining rows by reducing the optimum column entries to
zero (entries in the constraint rows).

9) Calculate the opportunity cost and net contributions.

10) If there is a positive entry in the NC row, return to step 5. The final solution has been obtained
if there is no positive value in the NC row.

Slack Variable represents the amount of unused resources.

Constructing a Simplex Tableau

a) Main Body of the Table – have many rows as there are constraints and as many columns as
there are variables in the LP problem.

b) Constraints Coefficients – entered in the main body of the table.

c) Variables and Numerical Coefficients of the Objective Function – placed on top of the main
table.

d) Basic Variables – shown on the left side.

e) Ratio Column ( Solution/E)– additional column placed on the right side and the smallest
positive ratio as the pivot row.

f) Bottom Row – “OC row” for the opportunity costs (zj )and the NC row” for the net
contributions (cj – zj )

Page 5 of 6
3. The Redy Miks Company owns a small paint factory that produces both interior and exterior house
paints for wholesale distribution. Two basic materials, A and B, are used to manufacture the paints.
The maximum availability of A is 6 tons a day; that of B is 8 tons a day. The daily requirements of the
raw materials per ton of interior and exterior paints are summarized in the following table.

Tons of Raw Material per ton of paint Maximum


Exterior Interior Availability (tons)
Raw material A 1 2 6
Raw material A 2 1 8

A market survey has established that the daily demand for interior paint cannot exceed that of exterior
paint by more than 1 ton. The survey also shows that the maximum demand for interior paint is limited
to 2 tons daily. The profit contribution per ton is 3 thousand for exterior and 2 thousand for interior
paint. How much exterior and interior paints should the company produce to maximize profit?

LP Model
Let x1 = tons produced daily of exterior paint
x2 = tons produced daily of interior paint

Maximize: P = 3x1 + 2x2 (Objective function)


Subject to: x1 + 2x2 ≤ 6 (Raw material A constraint)
2x1 + x2 ≤ 8 (Raw material B constraint)
x2 - x1 ≤ 1 (Production demand constraint)
x2 ≤ 2 (Maximum demand constraint)
x1 , x2 ≥ 0

Page 6 of 6

You might also like