Sei sulla pagina 1di 62

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).

Materials Gown(X1 Suit(X2) Available


)
Cotton 3 2 18
Silk 2 4 20
Wool 1 0 5
Profit 1200 1600
Step 3.
Formulate the objective function and
constraints by restating the information in
mathematical form.

The objective function is:


Maximize: P=1200X1 + 1600X2
The constraints are:
Structural
3x1 + 2x2 18 Cotton
2x1 + 4x2 20 Silk
x1 5 Wool
Where as:
X1, X2 0.

Step 4.
Convert the inequality in structural constraints
to equation by adding a slack variable in a
less-than or-equal-to constraints.

Slack variables are variables added to


constraints to convert them into equations.
Surplus variables are variables that are
subtracted from constraints to convert them
into equations.
Artificial variables is a computational device
used in linear programming to achieve an
initial solution to problem.
Rules for preparing constraints.
Constraint Adjustme Objective Function
s nts Coefficients
Maximizatio Minimizatio
n n
Add a slack 0 0
variable
Add an -M M
artificial
variable
Subtract a 0 0
surplus M M
variable
and add
artificial
variable
Note: M represents a very large number.
Let Sn represents a slack variables.
Max: Zj= 1200X1+1600X2+0S1+0S2+0S3
Subject to:
3x1+2X2+S1 = 18
2X1+ 4X2+S2 = 20
X1 + S3 =5
X1, X2, S1, S2, S3 0
Step 5.
Enter the constraints coefficients in the initial
tableau and calculate Zj and Cj-Zj.
Tableau 1

Cj Basic Right- 120 160 0 0 0


variable Hand 0 0
s Side 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
The Zj row is computed as :

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)
Cj- Zj= (1200, 1600, 0,0,0) (0, 0, 0,
0 ,0)
= (1200, 1600, 0, 0, 0)
Tableau 1.

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)

Cj Basic Right-Hand 120 160 0 0 0


variables 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
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.

Replacing Row(RR)= Pivot Row (PR) Pivot


(P)
= (20, 2, 4, 0, 1, 0)
4
= (5, , 1, 0, ,
0)
Step 9.
Compute the new values for the remaining
rules using the formula.
Remaining Row= Old Row-(Intersectional
Element x Replacing Row).
First Row= (18, 3, 2, 1, 0, 0)-(2 ) (5,, 1,
0, , 0)
= (18, 3, 2, 1, 0, 0) (10, 1, 2,
0, , 0)
= (8, 2, 0, 1,-, 0)
Third Row= (5, 1, 0, 0,0,1)- (o) (5,,1, 0,
, 0)
= (5, 1, 0, 0 ,0,1) (0, 0, 0, 0,
0, 0 )
= (5, 1, 0, 0, 0, 1)
Enter the results in tableau 2.
Cj Basic Right-Hand 12 16 0 0 0
variables Side 00 00
X1 X2 S1 S2 S
3
0 S1 8 2 0 1 - 0

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..

Zj= (0) (8,2,0,1,-,0) + (1600) (5,,1,0,,0)+(0)


(5,1,0,0,0,1)
=
(0,0,0,0,0,0)+(8000,800,1600,0,400,0)+(0,0,0,0,0
,0)
=(8000,800,1600,0,400,0)
Cj-Zj = (1200,1600,0,0,0)-(800,1600,0,400,0)
= (400,0,0,-400,0)
Cj Basic R ight- 120 160 o o o
variables Hand 0 0
Side X1 X2 S1 S2 S3

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

Antibiotic 3 units 1 unit 6


1 1 unit 1 unit 4
Antibiotic 2 units 6 units 12
2
Antibiotic
3
The company wants to determine the number
of grams of ingredients 1 and 2 that must go in
to drug in order to meet the antibiotics minimum
requirements at the minimum cost.
Solution: In order to solve the problem it is
necessary to formulate first the standard form
of the model.

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

Minimize: Zj= 80X1 + 50X2


Subject to: 3X1 + X2 6
antibiotic 1
X1 + X2 4
antibiotic 2
2X1+ 6X2 12
antibiotic 3
Step 3.
Convert the inequality structural constraints to
the equation to be subtracting a surplus variable in
a and adding an artificial variable constraints.
Let Sn represents the surplus variables
An represents the artificial variables
Standard Form:
Minimize: Zj = 80X1 + 50X2 + 0S1+ 0S2 + 0S3 +
MA1 + MA2 + MA3
Subject to: 3X1 + X2 S1 + A1 = 6
X1 + X2 S2 + A2 = 4
2X1 + 6X2 S3 + A3 = 12
X1, X2, S1, S2, S3 0
Step 4.
Enter the constraints coefficients in the
initial tableau and calculate Zj and Cj-Zj.
Tableau 1.

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, )

Cj- Zj = (80, 50, 0,0,0,M,M,M) (6M,8M,-M,-M,-


M,M,M)
= (80-6M,50-8M,M,M,M,0,0,0)
Tableau 1.
Cj Basic RHS 80 50 0 0 0 M M M
variables
X1 X2 S1 S2 S3 A1 A2 A3

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

Cj-Zj 80- 50- M M M 0 0 0


6M 8M

Note: whenever artificial variables are used, they can be


dropped from the simplex tableau as soon as they have
been eliminated from the basic feasible solution.
Notice that A3 is the living variable in tableau
1, therefore A3 column will not be included in
the succeeding tableau.
Pivot Row (PR)= RHS IE
Pivot Row (PR) = 61 = 6
= 41 = 4
= 126 = 2 leaving
basic variable
Replacing Row(RR) = Pivot Row Pivot
= (12,2,6,0,0,-1,0,0)
6
= (2, 1/3,1,0,0,-1/6,0,0)
Remaining Row= Old Row- (Intersectional
Element x Replacing Row)
First Row = (6,3,1,,-1,0,0,1,0) (1) (2,1/3,1,0,0,-
1/6,0,0)
= (6,3,1,-1,0,0,1,0) (2,1/3,1,0,0,-
1/6,0,0)
= (4, 8/3, 0, -1, 0, 1/6, 1, 0)
Second Row = (4,1,1,0,-1,0,0,1) (2,1/3,1,0,0,-
1/6,0,0)
= (4,1,1,0,-1,0,0,1) (2,1/3,1,0,0,-
1/6,0,0)
= (2, 2/3, 0, 0, -1, 1/6, 0, 1)
Tableau 2.

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

Zj 100 +6M 50/3+ 50 -M -M -25/3+ M M


10M/3 M/3
Cj-Zj 190/3- 0 M M 25/3- M/3 0 0
10M/3
Observe that A1 is the leaving variable in
tableau 2. Its column will not be included in
the succeeding tableau.

Pivot Row(PR)= Right-Hand(RHS)Intersectional


Elements
Pivot Row(PR)= 48/3 =4 (3/8) = 3/2
leaving Variable
= 2 2/3 = 2 (3/2) = 3
= 2 1/3 = 2 (3) = 6
Replacing Row(RR)= Pivot Row(PR) Pivot (P)
=(4,8/3,0,-1,0,1/6,0) 8/3
=(4,8/3,0,-1,0,1/6,0) (3/8)
=(3/2,1,0,-3/8,0,1/16,0)
Remaining Row= Old Row-(Intersectional
Element x Replacing Row)
Second Row=(2,2/3,0,0,-1,1/6,1) (2/3)(3/2,1,0,-
3/8,0,1/16,0)
=(2,2/3,0,0,-1,1/6,1) (1,2/3,0,-
1/4,0,1/24,0)
=(1,0,0,1/4,-1,1/8,1)
Third Row = (2,1/3,1,0,0,-1/6,0) (1/3)(3/2,1,0,-
3/8,0,1/6,0)
= (2,1/3,1,0,0,-1/6,0) (1/2,1/3,0,-
1/8,0,1/48,0)
=(3/2, 0, 1, 1/8, 0, -3/16, 0)
Tableau 3.
Cj Basic Right- 80 50 0 0 0 M
variabl Hand X1 X2 S1 S2 S3 A2
es Side

80 X1 3/2 1 0 -3/8 0 1/16 0


M A2 1 0 0 -1 1/8 1
50 X2 3/2 0 1 1/8 0 - 0
3/16
Zj
Cj-Zj
Zj= (80)(3/2,1,0,-3/8,0,1/16,0) + (M)
(1,0,0,1/4,-1,1/8,1)
+ (50) (3/2, 0, 1, 1/8, 0, -3/16, 0)
=(120,80,0,-30,0,5,0)+(M,0,0,M/4,-
M,M/8,M) (75,0,50,25/4,0,-75/8,0)
=(195+M,80,50,-95/4+ M/4,-M,-
35/8+M/8,M)
Cj-Zj= (80,50,0,0,0,M) (80,50,-95/4 + M/4,-M,-
35/8 + M/8, M)
=(o, o, 95/4-M/4, M, 35/8-M/8, 0)
Tableau 3.

Cj Basic Rig- 80 5 0 0 0 M
variab Hand 0
les side X1 X S1 S2 S3 A2
2

80 X1 3/2 1 0 -3/8 0 1/16 0

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)

Third Row =(1, 1, 0, -1/2, , 0) (-1/4) (8, 0, 0,


2, -8, 1)
= (1, 0, 1, 0, , -1/4) (-2, 0, 0,
-1/2, 2, -1/4)
= (3, 0, 1, , -3/2, 0)
Tableau 5.

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)

Cj-Zj= (80, 50, 0, 0, 0) (80, 50, -15, -35, 0)


= (0, 0, 15, 35, 0)
Tableau 5.
Cj Basic Right 80 50 0 0 0
varia - X1 X2 S1 S2 S3
ble Hand
side

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

Potrebbero piacerti anche