Professional Documents
Culture Documents
1
Objectives
After completing this chapter, students will be able to:
2
Gauss-Jordan Elimination
Solve: 2 x1 3 x2 7
4 x1 5 x2 13
We can perform the problem as matrix form:
2 3 7
4 5 13
Goal: reduce this to trivial form
1 0 a 1x1 0 x2 a
and read off answer
from right column
0 x1 1x2 b
0 1 b
3
Gauss-Jordan Elimination (cont.)
2 3 7 row1 1 3
2
7 2
new= 1/2 * row1
4 5 13 4 5 13
1 3
2
7
2 1 3
2
7 2
0 1 1 row2new= (-1) * row2
0 1 1
1 0 2
0 1 1 Read off solution: x1 = 2, x2 = 1
4
Simplex Method
m = 2; n = 4 m = 2; n = 4
The initial solution: The final solution:
x1 = x2 = 0 :non-basic x1 = 30; x2 = 40
s1 = 240; s2 = 100: basic s1 = s2 = 0
We have m=2 basic We have m=2 basic
solution and 4-2 = 2 non- solution and 4-2 = 2
basic solution non-basic solution
8
Simplex Tableau
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj - Zj $7 $5 $0 $0
10
Simplex Tableau- Step by Step
Max. Z = $7x1 + $5x2 + $0s1 + $0s2
Subject to:
2x1 + 1x2 + 1s1 = 100
4x1 + 3x2 + 1s2 = 240
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
x
$0 S1 2 1 1 0 100
x +
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj - Zj Obj. value 11
Simplex Tableau- Step by Step
Max. Z = $7x1 + $5x2 + $0s1 + $0s2
Subject to:
2x1 + 1x2 + 1s1 = 100
4x1 + 3x2 + 1s2 = 240
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
-
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj - Zj $7 $5 $0 $0 12
Simplex Tableau- Step by Step
Max. Z = $7x1 + $5x2 + $0s1 + $0s2
Subject to:
2x1 + 1x2 + 1s1 = 100
4x1 + 3x2 + 1s2 = 240
Completed Initial Tableau
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj - Zj $7 $5 $0 $0 13
Simplex Method for Maximization problem
3. Compute the new value for pivot row: divide every number by the pivot
number. The purpose is to transform the pivot number to value 1.
4. Compute the new value for each remaining row: keep other number in
the pivot column ( pivot number) to be zero by matrix elementary
transformation
5. Compute Zj and (Cj - Zj) rows. If all numbers in the (Cj - Zj) are non-
positive, reach optimal. If not, return to step 1 14
Cj Solution $7 $5 $0 $0 Leaving
X1 X2 S1 S2 Quantity Variable
$0 S1 2 1 1 0 100 100/2 = 50
$0 S2 4 3 0 1 240 240/4 = 60
Zj $0 $0 $0 $0 $0
Cj - Zj $7
$7 $5 $0 $0
Pivot number
Entering Variable
The entering var. is X1: the most positive number in (Cj-Zj) row.
The leaving var. is S1: the smallest ratio (100/2) compare with
(240/4). So the basic var. will be X1 and S2.
15
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
$7 X1 1 1/2 1/2 0 50 Row is
divided
$0 S2 4 3 0 1 240
by 2
Zj $0 $0 $0 $0 $0
Cj - Zj $7 $5 $0 $0
The second simplex tableau
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
$7 X1 1 1/2 1/2 0 50
$0 S2 0 1 -2 1 40 Apply same
method for
Zj $7 $7/2 $7/2 $0 $350 all values in
Cj - Zj $0 $3/2 -$7/2 $0 Row
0 = 1* (- 4) + 4
16
Basic var.: X1 and S2, non-basic var.: X2 and S1.
Cj Solution $7 $5 $0 $0
X1 X2 S1 S2 Quantity
$7 X1 1 1/2 1/2 0 50 50/(1/2)= 100
$0 S2 0 1 -2 1 40 40/1 = 40
Zj $7 $7/2 $7/2 $0 $350
Leaving
Cj - Zj $0 $3/2 -$7/2 $0
Variable
Entering Variable Pivot number Become 0
All the (Cj - Zj) are non positive - stop. Reaches optimal solution
17
Itn. Cj Solution $7 $5 $0 $0
1 X1 X2 S1 S2 Qty.
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240Transform the
Zj $0 $0 $0 $0 $0 row to get
pivot value 1
Cj - Zj $7 $5 $0 $0
2 $7 X1 1 1/2 1/2 0 50
$0 S2 0 1 -2 1 40
Zj $7 $7/2 $7/2 $0 $350
Cj - Zj $0 $3/2 -$7/2 $0
3 $7 X1 1 0 3/2 -1/2 30
$5 X2 0 1 -2 1 40
Zj $7 $5 $1/2 $3/2 $410
Cj - Zj $0 $0 -$1/2 -$3/2
This process ended because we got the optimal
18
(all elements of Cj-Zj ≤0)
Artificial variables
X2 - S2 + A2 = 150
Initial Simplex tableau
Cj -5 -6 0 0 -M -M Quantity
Solution X1 X2 S1 S2 A1 A2
-M A1 1 1 0 0 1 0 1000
0 S1 1 0 1 0 0 0 300
-M A2 0 1 0 -1 0 1 150
Tj = -Zj -M -2M 0 +M -M -M -1150 M
Cj - Tj M-5 2M-6 0 -M 0 0
21
The third Simplex tableau
Cj -5 -6 0 0 -M -M Quantity
Solution X1 X2 S1 S2 A1 A2
-M A1 0 0 -1 1 1 -1 550
-5 X1 1 0 1 0 0 0 300
-6 X2 0 1 0 -1 0 1 150
Tj = -Zj -5 -6 M-5 -M+6 -M M-6 -550M-2400
Cj - Tj 0 0 -M+5 M-6 0 -2M+6
26
Degeneracy problem
Cj $5 $8 $2 $0 $0 $0
SOLUTION
X1 X2 X3 S1 S2 S3 QUANTITY
MIX
$8 X2 0.25 1 1 –2 0 0 10
$0 S2 4 0 0.33 –1 1 0 20 20/4 = 5
$0 S3 2 0 2 0.4 0 1 10 10/2 = 5
Zj $2 $8 $8 $16 $0 $0 $80
Cj - Zj $3 $0 –$6 –$16 $0 $0
28
Consider the following example:
The High Note Sound Company manufactures quality compact disc (CD) players
and stereo receivers. Each of these products requires a certain amount of skilled
artisanship, of which there is a limit weekly supply.
29
20 40 50
1. Changes in the objective function coefficients
Final simplex table:
20 40 50 60
32
2. Changes in the Resources (RHS values)
Shadow Price: is the change in obj. function value from
increasing of one unit of a scarce resource.
Maximize Profit = $50 X1 + $120 X2
Subject to:
2 X1 + 4 X2 80 (available electricians’ time)
3 X1 + X2 60 (avai. audio technicians’ time)
X1, X2 0
Look at the negative values at (Cj – Zj) row of slack variables, these values are
called shadow prices.
Should the firm hire an extra electrician on Obj. function value will increase
part time basis with cost $22/hrs? 30 when increasing one unit of 33
40 1 40
So, range of RHS of resource 2: (20, ∞)
The audio technician resource is slightly different in that all 60 hours of time
originally available have not been used up.
o S2 = 40 hours in final tableau.
Applying the ratio test, the number of audio technicians’ hours can be reduced
by only 40 (the smallest positive ratio = 40/1) before a shortage occurs.
Since not all the hours currently available are being used, they can be
increased indefinitely without altering the problem’s solution.
o There are no negative substitution rates in the S2 column, so there are no
negative ratios.
So, the valid range for this shadow price would be from 20 (= 60 - 40) hours to
an unbounded upper limit.
35
3. Computer output for ranging
Variable Value Reduced Cost Original Val Lower Bound Upper Bound
X1 0. 10 50. -Infinity 60.
X2 20. 0 120. 100. Infinity
Constraint Dual Value Slack/Surplus Original Val Lower Bound Upper Bound
Constraint 1 30 0 80 0. 240.
Constraint 2 0 40 60 20. Infinity
36
Sensitivity Analysis by Computer
37
Sensitivity Analysis by Computer (cont.)
38
Sensitivity Analysis by Computer (cont.)
39
Terms Used in Different Books on Simplex method
Binding Tight
Non-binding Loose
Slack Slack
Excess Surplus
Reduced cost Opportunity cost
Shadow price Dual price
40
Signs of Shadow Prices for
maximization problems
“ ≤ constraint” . The shadow price is non-negative.
41
Reduced Cost
Reduced cost of an unused activity is:
The amount by which the profit contribution of
an activity (objective function coefficient)
needs to be increased before producing this
activity
the amount by which the profit will decrease if
1 unit of this activity is forced into the solution
42
Brief summary on reduced costs
The reduced cost of a non-basic variable xj
is the “increase” in the objective value of
requiring that xj >= 1.
The reduced cost of a basic variable is 0.
The reduced cost can be computed by
treating shadow prices as real prices. This
operation is known as “pricing out.”
Pricing out can determine if a new variable
would be of value (and would enter the
basis).
43