Chapter 03 Linear Programming - Simplex Method
Chapter 03 Linear Programming - Simplex Method
Simplex Method
Chapter
03
Guide questions in learning the topic:
3. What are the steps in solving a problem using linear programing – simplex method in
maximization problem?
4. What are the steps in solving a problem using linear programing – simplex method in
minimization problem?
SIMPLEX METHOD
The problems to be solved using simplex method is almost the same with those solved using
graphical method but you can solve more unknown variable is simplex method. Remember that the
number of unknown variables that can be represented and solved using graphical method is only
two because of the limitation in the cartesian coordinate plane where you can only have two
variables. If the number of unknown of variables that needs to be represented and solved exceeds
by two (i.e., three or more), then simplex method should be used.
All the constraints in simplex method are expressed as equation. The inequality constraints in the
graphical method will be converted to equations or in the standard form of linear programming
problem. Simplex method is a technique which begins with a feasible solution that is not yet
optimal and is improved until there is no further possible improvement.
Solution/Discussion:
1. Understand the problem and determine the objective of the problem and the decision that you
must make. In this problem, our objective to maximize the sales by getting the number of
gown and suit that should be produced and sold.
Since we do not know yet the number of units that we will sell, we can use some variable first
to represent the unknown amounts.
The constraints are the limitations presented in the problem that must be taken into
consideration. In this problem, the constraints are as follows:
a. The maximum number of available cottons is 18 m2
b. The maximum number of available silks is 20 m2
c. The maximum number of available wools is 5 m2
d. The number of gowns and suits to be produced and sold must not be less than 0 (non-
negativity constraint, which is also an implicit constraint that restricts all variables to be
zero or any positive amount only at all times).
3. Formulate the objective function and constraint function by transcribing the information to
mathematical form.
Constraints:
3x1 + 2x2 ≤ 18 Cotton
2x1 + 4x2 ≤ 20 Silk
x1 ≤ 5 Wool
x1, x2 ≥ 0 Non-negativity
4. Convert the objective function and constraint functions to equations in standard form.
In the standard for of equation, all the terms with variables are on the left side of the equation
while all the constants are on the right side. Also, slack variables should be added to each
constraint inequalities with less-than-or-equal-to (≤) sign. Usually, the constraint for
maximization problems is the limitation on the scarce resources. The maximum amount of
available resources is being given and a ≤ inequality sign is used to represent the resources to
be used and the maximum amount of resources that can be used. The slack variable (si)
represents the amount of resources that will not be used in obtaining the optimal solution which
should be added to left-hand-side of the constraint function and we can now change the
inequality sign to equal sign. (i.e., the resources to be used in optimal solution plus the slack
resources is equal to the maximum amount of available resources). Slack variables which has
a numerical coefficient of zero is added also to the objective function to show that those
variables are being used in the solution.
Constraints:
3x1 + 2x2 ≤ 18 2x1 + 4x2 ≤ 20 x1 ≤ 5
3x1 + 2x2 + s1 = 18 2x1 + 4x2 + s2 = 20 x1 + s3 = 5
Constraint variables
Function
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
0 s1 18 3 2 1 0 0
0 s2 20 2 4 0 1 0
0 s3 5 1 0 0 0 1
Zj
Cj – Z j
6. Compute for the value Zj of each column by getting the sum of products of the coefficient in
Cj and the coefficient in that column
Zj = (0)(18, 3, 2, 1, 0, 0) + (0)(20, 2, 4, 0, 1, 0) + (0)(5, 1, 0, 0, 0, 1)
= (0, 0, 0, 0, 0, 0) + (0, 0, 0, 0, 0, 0) + (0, 0, 0, 0, 0, 0)
= (0, 0, 0, 0, 0, 0)
Tableau 1
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
0 s1 18 3 2 1 0 0
0 s2 20 2 4 0 1 0
0 s3 5 1 0 0 0 1
Zj 0 0 0 0 0 0
Cj – Z j 1,200 1,600 0 0 0
By looking in the initial tableau above, we can say that the pivot column is column of
variable x2.
b. Determine the pivot row – The pivot row is the row with the lowest answer when the
value of RHS column is divided by the value in the pivot column.
R1 = 18 ÷ 2 = 9
R2 = 20 ÷ 4 = 5 The pivot row is R2
R3 = 5 ÷ 0 = Undefined
Tableau 2
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
s1 R1
1,600 x2 5 ½ 1 0 ¼ 0 R2
s3 R3
Zj
Cj – Z j
The entering variable already replaced the leaving variable
Improved Row (Other) = Old Row Coefficient – Intersectional Coefficient x Improved Pivot Row
Coefficient
Tableau 2
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
0 s1 8 2 0 1 -½ 0 R1
1,600 x2 5 ½ 1 0 ¼ 0 R2
0 s3 5 1 0 0 0 1 R3
Zj
Cj – Z j
Tableau 2
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
0 s1 8 2 0 1 -½ 0 R1
1,600 x2 5 ½ 1 0 ¼ 0 R2
0 s3 5 1 0 0 0 1 R3
Zj 8,000 800 1,600 0 400 0
Cj – Z j 400 0 0 -400 0
Since there is still a positive coefficient in the improved tableau (Tableau 2),
let’s do Step 7 again.
Improvement to Tableau 3
a. Determine the pivot column – By looking in the initial tableau above, we can say that
the pivot column is column of variable x1.
Also, the entering variable (1,200 and x1) should replace the leaving variable
(0, s1).
Tableau 3
Basic Cj 1,200 1,600 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
1,200 x1 4 1 0 ½ -¼ 0 R1
1,600 x2 3 0 1 -¼ 3⁄ 0 R2
8
0 s3 1 0 0 -½ ¼ 1 R3
Zj 9,600 1,200 1,600 200 300 0
Cj – Z j 0 0 -200 -300 0
After improving Tableau 2 and coming up with Tableau 3, there are no more
positive coefficients in the Cj – Zj, thus, the simplex method tableau 3 is
already the optimal solution.
The solution for the linear programming solution is found in the RHS column.
Decision:
x1 = 4 gowns
x2 = 3 suits
P = P9,600.00
Let us check for the maximum amount of profit that can be obtained by the optimal solution
Objective Function: P = 1,200x1 + 1,600x2
= 1,200(4) + 1,600(3)
= 4,800 + 4,800
= 9,600
Same with the table 3, only s3 has a slack value which is 1. All other slack variable is zero.
The steps in minimization problems are just the same with maximization. There is additional rule
in converting the objective function and constraint functions in standard form.
Also, whenever an artificial variable is used, the same artificial variable should be included to the
objective function as well. The coefficient of which should be +M if it is a minimization problem
and -M if it is a maximization problem. “M” is a very large value of number.
Artificial variables and rules for M are also added to constraint functions with equal (=) sign.
In determining if the simplex method tableau already contains the optimal solution, the Cj – Zj. must
be greater-than-or-equal-to zero (Cj – Zj ≥ 0). It means that the simplex method tableau must still
be improved if there is still a negative value on it
Illustration 2:
A leading soap manufacturing company produces two variants of soap. It uses three kinds of
chemicals in its production. The total unit cost is P80 and P50 for Soap#1 and Soap#2, respectively.
The production of the soaps depends on the availability of the chemicals used producing the soap.
The mixture in producing the soaps are shown below:
Resource Requirement Minimum
Chemicals
Soap#1 Soap#2 requirement
Chemical 1 3g 1g 6g
Chemical 2 1g 1g 4g
Chemical 3 2g 6g 12 g
The company wants to know the number of Soap#1 and Soap#2 that must be produced that will
also attain the minimum cost possible,
Discussion:
1. Understand the problem and determine the objective of the problem and the decision that you
must make. In this problem, our objective to minimize the cost by getting the number of
soap#1 and soap#2 that should be produced.
Since we do not know yet the number of units that we will produce, we can use some variable
first to represent the unknown amounts.
The constraints are the limitations presented in the problem that must be taken into
consideration. In this problem, the constraints are as follows:
a. The minimum number of chemical 1 to be used is 6 g.
b. The minimum number of chemical 2 to be used is 4 g.
c. The minimum number of chemical 3 to be used is 12 g.
d. The number of soap#1 and soap#2 to be produced and sold must not be less than 0 (non-
negativity constraint, which is also an implicit constraint that restricts all variables to be
zero or any positive amount only at all times).
4. Convert the objective function and constraint functions to equations in standard form.
Constraints:
3x1 + x2 ≥ 6 x1 + x2 ≥ 4 2x1 + 6x2 ≥ 12
3x1 + x2 – s1 + a1 = 6 x1 + x2 – s2 + a2 = 4 2x1 + 6x2 – s3 + a3 = 12
6. Compute for the value Zj of each column by getting the sum of products of the coefficient in
Cj and the coefficient in that column
Zj = (M)(6, 3, 1, -1, 0, 0, 1, 0, 0) + (M)(4, 1, 1, 0, -1, 0, 0, 1, 0)
+(M)(12, 2, 6, 0, 0, -1, 0, 0, 1)
Zj = (6M, 3M, M, -M, 0, 0, M, 0, 0) + (4M, M, M, 0, -M, 0, 0, M, 0)
+ (12M, 2M, 6M, 0, 0, -M, 0, 0, M)
Zj = (22M, 6M, 8M, -M, -M, -M, M, M, M)
Since M is a very large number, let us assume a number which we will substitute in Cj
– Zj to know which column has te most negative value.
NOTE: If the leaving value is an artificial variable, the column of that artificial
variable will be removed in the next improvement. Thus, A3 is not included in the
improved Tableau 2.
Tableau 2
Basic Cj 80 50 0 0 0 M M
CB
Variables RHS x1 x2 s1 s2 s3 a1 a2
M a1
M a2
50 x2 2 1/3 1 0 0 -1/6 0 0
Zj
Cj – Zj
The entering variable already replaced the leaving variable
Tableau 2
Basic Cj 80 50 0 0 0 M M
CB
Variables RHS x1 x2 s1 s2 s3 a1 a2
M a1 4 8/3 0 -1 0 1/6 1 0
M a2 2 2/3 0 0 -1 1/6 0 1
50 x2 2 1/3 1 0 0 -1/6 0 0
Zj
Cj – Zj
Since there are still negative coefficients in the improved tableau (Tableau 2), let’s
do Step 7 again.
Improvement to Tableau 3
a. Determine the pivot column
Let M be equal to 1,000
x, s3
190 − 10𝑀 25 − 𝑀
Cj – Zj = Cj – Zj =
3 3
190 − 10(1,000) 25 − 1,000
= =
3 3
190 − 10,000 − 975
= =
3 3
− 9,810
=
3
NOTE: Since the leaving value is an artificial variable, the column of that artificial variable
will be removed in the next improvement. Thus, A1 is not included in the improved
Tableau 3.
Tableau 3
Basic Cj 80 50 0 0 0 M
CB
Variables RHS x1 x2 s1 s2 s3 a2
80 x1 3/2 1 0 -3/8 0 1/16 0
M a2
50 x2
Zj
Cj – Zj
The entering variable already replaced the leaving variable.
Tableau 3
Basic Cj 80 50 0 0 0 M
CB
Variables RHS x1 x2 s1 s2 s3 a2
80 x1 3/2 1 0 -3/8 0 1/16 0
M a2 1 0 0 1/4 -1 1/8 1
50 x2 3/2 0 1 1/8 0 -3/16 0
𝑀 − 95 𝑀 − 35
Zj 195+M 80 50 -M M
4 8
95 − 𝑀 35 − 𝑀
Cj – Zj 0 0 M 0
4 8
Since there are still negative coefficients in the improved tableau (Tableau 3), let’s
do Step 7 again.
Improvement to Tableau 4
a. Determine the pivot column
Let M be equal to 1,000
s, s3
95 − 𝑀 35 − 𝑀
Cj – Zj = Cj – Zj =
4 8
95 − 1,000 35 − 1,000
= =
4 8
−905 − 965
= =
4 8
NOTE: Since the leaving value is an artificial variable, the column of that artificial variable
will be removed in the next improvement. Thus, A2 is not included in the improved
Tableau 4.
Tableau 4
Basic Cj 80 50 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
80 x1 3 1 0 0 -3/2 ¼
0 s1 4 0 0 1 -4 ½
50 x2 1 0 1 0 ½ -¼
Zj
Cj – Z j
Tableau 4
Basic Cj 80 50 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
80 x1 3 1 0 0 -3/2 ¼
0 s1 4 0 0 1 -4 ½
50 x2 1 0 1 0 ½ -¼
Zj 290 80 50 0 -95 15/2
Cj – Z j 0 0 0 95 -15/2
Since there is still a negative coefficient in the improved tableau (Tableau 4), let’s
do Step 7 again.
Improvement to Tableau 5
a. Determine the pivot column – The pivot column is column of variable s3.
Tableau 5
Basic Cj 80 50 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
80 x1
0 s3 8 0 0 2 -8 1
50 x2
Zj
Cj – Z j
The entering variable already replaced the leaving variable.
Tableau 5
Basic Cj 80 50 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
80 x1 1 1 0 -½ ½ 0
0 s3 8 0 0 2 -8 1
50 x2 3 0 1 ½ -3/2 0
Zj
Cj – Z j
Tableau 5
Basic Cj 80 50 0 0 0
CB
Variables RHS x1 x2 s1 s2 s3
80 x1 1 1 0 -½ ½ 0
0 s3 8 0 0 2 -8 1
50 x2 3 0 1 ½ -3/2 0
Zj 230 80 50 -15 -35 0
Cj – Z j 0 0 15 35 0
Decision:
x1 = 1 soap#1
x2 = 3 soap#2
C = P230
Let us check for the minimum amount of cost that can be obtained by the optimal solution
Objective Function: C = 80x1 + 50x2
= 80(1) + 50(3)
= 80 + 130
= 230
Same with the table 5, only s1 has a surplus value which is 8. All other surplus variables
are zero.
Tableau 1
Basic Cj 2 1 3 0 0
CB x3
Variables RHS x1 x2 s1 s2
0 S1 400 1 1 2 1 0
0 S2 500 2 1 1 0 1
Zj 0 0 0 0 0 0
Cj – Zj 2 1 3 0 0
pivot row:
200/ 1/2 = 400
Tableau 2 300/ 3/2= 200
Basic Cj 2 1 3 0 0
CB
Variables RHS x1 x2 x3 s1 s2
r1 3 x3 200 1/2 1/2 1 1/2 0
r2 0 s2 300 3/2 or 1 1/2 1/2 0 -1/2 1
Zj 600 3/2 3/2 3 3/2 0
Cj – Zj 1/2 -1/2 0 -3/2 0
Tableau 1
Basic Cj 80 60 0 0 -10 -10
CB
Variables RHS x1 x2 s1 s2 a1 a2
-10 a1 400 1 1 0 0 1 0
0 s1 50 1 0 1 0 0 0
-10 a2 80 0 1 0 -1 0 1
Zj
Cj – Z j 90 80 0 -10 0 -20
Tableau 2
Basic Cj
CB
Variables RHS
Zj
Cj – Z j
Tableau 3
Basic Cj
CB
Variables RHS
Zj
Cj – Z j
Tableau 4
Basic Cj
CB
Variables RHS
Zj
Cj – Z j
Decision:
Tableau 1
Basic Cj 9 11 7 0 0 M M
CB x1
Variables RHS x2 x3 s1 s2 a1 a2
M a1 50 2 1 1 -1 0 1 0
M a2 153 5 3 5 0 -1 0 1
Zj 203M 7M 4M 6M -M -M M M
Cj – Z j 9-7M 11-4M 7-6M M M 0 0
Tableau 1
Basic Cj 30 10 0 0 M M
CB
Variables RHS x1 x2 s1 s2 a1 a2
0 s1 40 1 2 1 0 0 0
M a1 25 1 1 0 0 1 0
M a2 60 4 3 0 -1 0 1
Zj 85M 5M 4M 0 -M M M
Cj – Zj 30-5M 10-4M 0 M 0 0
-4970 -3990
r1 = (40, 1, 2, 1, 0, 0) - 1(15, 1, 3/4, 0, -1/4, 0)
r2 = (25, 1, 1, 0, 0, 1) - 1(15, 1, 3/4, 0, -1/4, 0)
Tableau 2
Basic Cj 30 10 0 0 M
CB
Variables RHS x1 x2 s1 s2 a1
20 r1 0 s1 25 0 5/4 1 1/4 0
40 r2 M a1 10 0 1/4 0 1/4 1
20 30 x1 15 1 3/4 0 -1/4 0
Zj 450+10M 30 90+M/4 0 -30+M/4 M
Cj – Zj 0 -50-M/4 0 30-M/4 0
10M, 0, M/4, 0, M/4, M
450, 30, 90/4, 0, -30/4, 0
Tableau 3
Basic Cj 30 10 0 0
CB
Variables RHS X1 X2 S1 S2
10 x2 15 0 1 1 0
0 s2 25 0 0 -1 1
30 x1 10 1 0 -1 0
Zj 450 30 10 -20 0
Cj – Z j 0 0 20 0
Tableau 4
Basic Cj 30 10 0 0 M
CB
Variables RHS X1 X2 S1 S2 a1
100 10 x2 20 0 1 4/5 1/5 0
25 M a1 5 0 0 -1/5 1/5 1
0 30 x1 0 1 0 -3/5 -2/5 0
Zj 200+5M 30 10 -10-M/5 -10+M/5 M
Cj – Z j 0 0 10+M/5 10-M/5 0
202 -198
Decision:
Zj= 30 (10) + 10 (15)
x1 = 10 = 300 + 150
x2 = 15 =450
s2 = 25
Zj = 450
1. Err-Can Company produces two types of air conditioner: a regular room aircon model and an
office room aircon model. The company has 900 hours of production time available in its
production department, 300 hours available in its assembly department and 100 hours available
in packaging and shipping department. The production time requirements and the profit
contribution per aircon are given in the table below:
2. The Creative Equipment Corporation manufactures desktop computer and laptops. Each
desktop computer requires two hours of software works and six hours of hardware works while
each laptop requires four hours of software works and four hours of hardware works. There are
600 software work hours and 480 hardware work hours available per week. If each desktop
computer contributes P900 to profits and each laptop contributes P1,200 to profit, how many
desktop computers and laptops must the corporation produce to maximize the profit?
DESKTOP (x1) laptop (x2)
P = 900x1 + 1200x2
constraints:
2x1 + 4x2 600
6x1 + 4x2 480
1. Solvent Inc. produces variety of chemical products. produce two products: In one of its
production processes, three different raw materials are mixed to produce two products: a fuel
additive and a solvent base. Each ton of fuel additive is a mixture of 0.40 ton of material X and
1.60 tom of material Z. A ton of solvent base is a mixture of 0.50 ton of material X, 0.20 ton
of material Y and 0.30 ton of material Z. After deducting relevant costs, the profit contribution
is $40 for every ton of fuel additive produced and $30 for every ton of solvent base produced.
The production is constrained by the limited number of raw materials. For the current period’s
production, there are 20 tons of material X, 5 tons of material Y and 21 tons of material Z
available. How many tons of each product should be produced to obtain the maximum profit?
How much is the amount of the maximum profit?
1. SHaktOE Sports produces different kind of sports shoes. It is currently planning the number of
Running shoes and Basketball shoes to be produced for the next month’s operations. There are
constraints in the operations of the shoes which will both pass through cutting and dyeing,
sewing and inspection and packaging processes. For the next month’s operations, it has 340
hours of cutting and dyeing, 420 hours of sewing and 200 hours of inspection and packaging
available. Each running shoes contributes P500 to profit and is produced by using 12 minutes
of cutting and dyeing time, 9 minutes of sewing and 6 minutes of inspection and packaging. A
unit of Basketball shoes contributes P400 to profit and is produced by using 6 minutes of cutting
and dyeing, 15 minutes of sewing and 6 minutes of inspection of packaging. How many units
of Running shoes and basketball shoes should be produced to maximize the profit? How much
is the maximum amount of profit that can be obtained? How many minutes of cutting and
dyeing, sewing and inspection and packaging will not be used (surplus) to produce the number
of units that will maximize the profit?