Linear Programming
Linear Programming
Simplex Method
Chapter Objectives
Differentiate the simplex method from
graphical method.
Use the simplex method in solving linear
programming problems.
Examine in detail all steps of the simplex
method.
Apply the iterative process used in the
simplex method.
Interpret simplex solutions.
What is simplex
method ?
It is an iterative technique that
begins with a feasible solutions that
is not optimal, but serves as a
starting point. With the use of
algebraic manipulation, the solution
is improved until no further
improvement is possible.
Standard Form
Is the way 0f expressing the constraints of
a linear programming problem as
equalities with all variables on the left side
of the equation and a constant on the right
side.
Conditions that are met in
standard form:
All the variables are non-negative.
All other constraints are written as linear
expressions that is less than or equal to
Maximization problem
A tailor has the following materials available:
18 square meter cotton, 20 square meters
silk, 5 square meter wool. A gown requires
the following : 3 square meters cotton, 2
square meters silk and 1 square meters wool.
A suit requires the following : 2 square
meters cotton, 4 square meter silk. If a gown
sells for P1,200 and a suit for P1600, how
many of each garment should the tailor make
to obtain maximum amount of money?
Step 1.
Represent the unknown in the problem.
let X1 be the number of gowns and
X2 be the number of suits.
Step 2.
Tabulate the data about the facts (if necessary).
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
The Zj row is computed as :
Cj Basic Right- 12 16 0 0 0
variables Hand Side 00 00
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-Zj 12 160 0 0 0
00 0
Step 6.
Determine the optimum column or entering
by choosing the most positive entry in the Cj-
Zj row, which is 1600.
Optimum Column is the column in any
solution to a maximization problem which has
the largest positive value or which has the
lowest negative value in the minimization
problem.
Intersectional Elements are elements
common to both the optimum column and the
rows representing variables in the solution.
Pivot Row is the row in the simplex tableau
corresponding to the basic variable that will
leave the solution.
Pivot is the element of the simplex tableau
that is in both the pivot row and optimum
column.
Pivoting is the process of going one simplex
tableau to the next.
Tableau
Cj Basic Right- 1200 160 0 0 0
variables Hand 0
Side X1 X2 S2 S3
S1
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-Zj 120 160 0 0 0
0 0
Optimum column
Tableau 1.
Intersectional
Element (IE)
Right-Hand Side (RHS)
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-Zj 120 160 0 0 0
0 0
Step 7.
Identity the pivot row by dividing the right-hand
side values by the non-zero and non-negative
entries in the optimum column.
Pivot Row(RR)= Right-Hand Side (RHS) /
Intersectional Elements(IE)
Pivot Row (PR)= 182= 9
=204=5 Leaving
basic variable
= 50 = (undefined)
The second row in the constraints coefficient has
the smallest positive quotient which is 5; second
row will be the pivot row.
Cj Basic Right-Hand 120 1600 0 0 0
Variable side 0
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-Zj 12 160 0 0 0
00 0
Pivot Row
Other parts of simplex table.
Entering Variable
Contribution Profit Column
Cj Basic RJ-Jight- 120 160 0 0 0
Variables Hand side 0 0
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-Zj 120 160 0 0 0
0 0
Pivot
Leaving Basic Variable constraints coefficient
Cj Basic Right- 12 16 0 0 0
Variables Hand Side 00 00
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-Zj 12 160 0 0 0
00 0
Step 8.
Compute the values of the replacing row by
dividing all the entries by the pivot 4.
1600 X2 5 1 0 0
0 S3 5 1 0 0 0 1
Zj
Cj-Zj
Step 10
Calculate the Zj and Cj-Zj values..
0 S1 8 2 0 1 - 0
1600 X2 5 1 0 0
0 S3 5 1 0 0 0 1
Zj 8000 80 16 0 40 0
0 00 0
Cj-Zj 40 0 0 - 0
0 40
0
Step 7.
Identify the pivot row by dividing the right-
hand side values by non-zero and non-
negative entries or the non-intersectional
elements.
Pivot Row(PR)= Right-Hand Side(RHS)
Intersectional Elements
Pivot Row (PR)= 82 = 4 leaving
Basic variable
= 52 = 5(2) = 10
= 51 = 5
The first row of the constraint coefficient has
the smallest positive quotient, which is 4; it
will be the pivot row.
Step 8.
Compute the values of the replacing row by
deviding all the entries by the pivot 2.
Replacing Row(PR)= Pivot Row(PR) Pivot (P)
= (8,2,0,1,-,0) 2
= (4,1,0,,-,0)
Step 9.
Compute the new values for the remaining rows
using the formula.
Remaining Row= Old Row (Intersectional
Element x Replacing Row )
Second Row = (5,,1,0,,0) ()
(4,`1,0,,-,0)
= (5,,1,0,,0) (2,,0,,-
1/8,0)
= (3,0,1,-,3/8,0)
Third Row = (5,1,0,0,0,1) (1) (4,1,0,,-
,0)
= (5,1,0,0,0,1) (4,1,0,,-,0)
= (1,0,0,-,,1)
tableau 3
Cj Basic Right- 12 16 0 0 0
Variable Hand side 00 00
s X1 X2 S1 S2 S3
120 X1 4 1 0 - 0
0
160 X2 3 0 1 - 0
0
0 S3 1 0 0 - 1
Zj
Cj-Zj
Step 10.
Calculate the Zj and Cj-Zj values.
Zj= (1200) (4,1,0,,-,0) + (1600) (3,0,1,-
,,0) + (0)
(1,0,0,-,,1)
= (4800,1200,0,600,-300,0) + (4800,0,1600,-
400,600,0)
+(0,0,0,0,0,,0)
= (9600, 1200, 1600, 200, 300, 0)
Cj-Zj= (1200, 1600, 0,0,0) (1200, 1600, 200,
300, 0)
= (0, 0, -200, -300, 0)
Note: Identify if there is still a positive entry in
Cj-Zj row. If so return to Step 6. the final
Tableau 3.
Cj Basi Righ 1200 1600 0 0 0
c t- X1 X2 S1 S2 S3
vari Han
able d
s side
120 X1 4 1 0 - 0
0
160 X2 3 0 1 - 0
0
0 S3 1 0 0 - 1
Zj 960 120 160 200 300 0
0 0 0
Step 11.
If the last Cj-Zj row do not contain positive
entry the tableau is optimum . Our decision
will be to make.
Decision:
X1 = 4 Gowns S1 = 0
X2 = 3 Suits S2 = 0
Zj = 9600 Profit S3 = 1
Minimization Problem
A drug company produces a drug from
two ingredients. Each ingredient contains
the same three antibiotics in different
proportions. Each ingredient 1 produced
results in $80 in costs; each ingredient 2
results in $50 in cost. The production of the
antibiotics is dependent on the availability
of limited resources. The resource
requirements for the production are as
follows:
RESOURCES REQUIREMENTS
Antibioti Available
c unit
Ingredient 1 Ingredient 2
Step 1.
Represent the unknown in the problem.
Let X1 be the quantity of ingredient 1, and
X2 be the quantity ingredients 2.
Step 2.
Tabulate the data about the facts.
Materials Ingredient 1 Ingredient2 Requiremen
(X1) (X2) ts
Antibiotic 1 3 1 6
Antibiotic 2 1 1 4
Antibiotic 3 2 6 2
COST 80 50
Cj Basic Right 80 50 0 0 0 M M M
variabl -
Hand X1 X2 S1 S2 S3 A1 A2 A3
es Side
M A1 6 3 1 -1 0 0 1 0 0
M A2 4 1 1 0 -1 0 0 1 0
M A3 12 2 6 0 0 -1 0 0 1
Zj
Cj-Zj
Zj= (M) (6,3,1,-1,0,0,1,0,0) + (M) (12,2,6,0,0,-
1,0,0,1)
= (6M,3M,M,-M,0,0,M,0) + (4M,M,M,0,-
M,0,0,M,0) +
(12M, 2M, 6M, 0, 0, -M, 0, 0, M)
= (22M,6M, 8M,-M, -M, -M, 0, 0, 0, )
M A1 6 3 1 -1 0 0 1 0 0
M A2 4 1 1 0 -1 0 0 1 0
M A3 12 2 6 0 0 -1 0 0 1
Zj 22M 6M 8M -M -M -M M M M
Basic RHS 80 50 0 0 0 0 0
variab X2 X2 S1 S2 S3 A1 A2
les
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 - 0 0
1/6
Zj
Cj-Zj
Tableau 2.
Cj Basic Right- 80 50 0 0 0 M M
variabl Hand
X1 X2 S1 S2 S3 A1 A2
es Side
M A1 4 8/3 0 -1 0 1/6 1 0
M A2 2 2/3 0 0 -1 1/6 0 1
M X2 2 1/3 1 0 0 -1/6 0 0
Cj Basic Rig- 80 5 0 0 0 M
variab Hand 0
les side X1 X S1 S2 S3 A2
2
M A2 1 0 0 -1 1/8 1
50 X2 3/2 0 1 1/8 0 -3/16 0
Zj 195+M 80 50 - -M -3/8+M/8 M
95/4+M/
4
Cj-Zj 0 0 95/4- M 35/8-M/8 0
M/4
Pivot Row(PR)= Right-
Hand(RHS)Intersectional Elements
Pivot Row(PR)=3/2 -3/8 = 3/2 (-8/3) = -4
= 1 = 1 (4) =4
leaving basic variable
= 3/2 1/8 = 3/2(8) = 12
Replacing Row(RR) = Pivot Row(PR) Pivot (P)
= (1, 0, 0, , -1, 1/8)
= (1,0, 0, , -1, 1/8) (4)
= (4, 0, 0, 1, -4, )
Remaining Row= Old Row (Intersectional
Element x Replacing Row)
First Row= (3/2,1,0,-3/8,0,1/16) (-3/8)
(4,0,0,1,-4,1/2)
= (3/2,1,0,-3/8,0,1/16) (-3/2,0,0,-
3/8,3/2,-3/16)
= (3, 1,0, 0, -3/2, 1/14)
Second Row= (3/2,0,1,1/8,0,-3/16) (1/8)
(4,0,0,1,-4,1/2)
= (3/2,0,1,1/8,0,-3/16)
(1/2,0,0,1/8,-1/2,1/16)
= (1, 0, 1, 0, , -1/4)
Tableau 4.
Cj Basic Right 80 50 0 0 0
varia - X1 X2 S1 S2 S3
bles Hand
Side
80 X1 3 1 0 0 -3/2
0 S1 4 0 0 1 -4
50 X2 1 0 1 0 1/2 -1/4
Zj
Cj-Zj
Zj=(80) (3,1,0,0,-3/2,1/4) + (0) (4,0,0,1,-4,1/2)
+ (50) (1,0,1,0,1/2,-1/4
= (240, 80, 0, 0, -120, 20) +(0,0,0, 0,
0,0 ) + (50, 0, 50, 0, 25, -25/2)
= (290, 80, 50, 0, -95, 15/2)
Cj-Zj= (80, 50, 0, 0, 0, ) (80, 50, 0, -95, 12/2)
= (0, 0, 0, 95, -15/2)
Tableau 4.
Cj Basic Right 80 50 0 0 0
Varia - X1 X2 S1 S2 S3
ble Hand
side
80 X1 3 1 0 0 -3/3
0 S1 4 0 0 1 -4
50 X2 1 0 1 0 -1/4
Zj 290 80 50 0 -95 15/2
Cj-Zj 0 0 0 95 -15/2
Pivot Row(PR)= Right-
Hand(RHS)Intersectional Elements (IE)
Pivot Row(PR)= 3 = 3 (4) = 12
= 4 = 4 (2) = 8
leaving variable
= 1 -1/4 = 1 (-4) = -4
Replacing Row(RR) = Pivot Row Pivot
= (4,0, 0, 1, -4, )
= (4, 0, 0, 1, -4, ) (2)
= (8, 0, 0, 2, -8, 1)
Remaining Row= Old Row-(Intersectional
Element x Replacing Row)
First Row = (3, 1, 0, 0,-3/2, 1/4)-(1/4) (8, 0, 0, 2,
-8,1)
=(, 1, 0, 0,-3/2, 1/4)-(2, 0, 0, , -2,
)
=(1, 1, 0, -1/2, , 0)
Cj Basic Right 80 50 0 0 0
varia - X1 X2 S1 S2 S3
ble hand
side
80 X1 1 1 0 -1/2 1/2 0
0 S3 8 0 0 2 -8 1
50 X2 3 0 1 1/2 -3/2 0
Zj
Cj-Zj
Zj= (80) (1, 1, 0, -1/2, 0) + (8, 0, 0, 2, -8, 1) +
(3, 0, 1, , -3/2, 0)
= (80, 80, 0, -40, 40, 0) (0, 0, 0, 0, 0, 0) +
(150, 0, 50, 25, -75, 0)
= (230, 80, 50, -15, -35, 0)
80 X1 1 1 0 -1/2 0
0 S2 8 0 0 2 -8 1
50 X2 3 0 1 -3/2 0
Zj 230 80 50 -15 -35 0
Cj-Zj 0 0 15 35 0
Decision:
X1 = 1 S1 =
0
X2 = 3 S2 =
0
Zj = 230 cost S3 =
8