The Revised Simplex Method:
Computer Implementations: use a device to facilitate solution.
Ch. 24: L, U-factorization of basis.
Ch. 7: Eta-factorization of basis.
Let Bk-1 be the basis matrix at step k-1, and
let Bk be the basis matrix at step k.
where a is the column of A corresponding to the entering variable.
Note: Bk-1 * d = a
So,
where Ek-1 is the Eta matrix with the column corresponding
to the leaving variable replaced by d.
Furniture Example
Product | Hours | Metal | Wood | Profit |
---|---|---|---|---|
Bookcase | 3 | 1 | 4 | 19 |
Desk | 2 | 1 | 3 | 13 |
Chair | 1 | 1 | 3 | 12 |
Bed frame | 2 | 1 | 4 | 17 |
Total | 225 | 117 | 420 | Max |
After two steps of the revised Simplex Method:
X1 X3 X7 [ 3 1 0] [0.5] [2] B = [ 1 1 0] d= [0.5] a= [1] 2 [ 4 3 1] [0.5] [4] X7 leaves and X4 enters. X1 X3 X7 X1 X3 X4 [ 3 1 0] [1 0 0.5] [3 1 2] B = [ 1 1 0] [0 1 0.5] = [1 1 1] 3 [ 4 3 1] [0 0 0.5] [4 3 4]
B0= I= initial basis from slack variables. B1= E1 B2= E1 * E2 : : Bk= E1 * E2 * ... * Ek
This is called an eta-factorization of Bk.
Solving yT Bk = CBT is equivalent to:
(... ((yT E1) E2) ... ) Ek = CBT
Example:
(((yT E1) E2) E3) E4 = CBT
These systems of equations are easy to solve because Ei is an eta matrix.
For example:
[ 1 0 d1 0] [X1] [b1] [ 0 1 d2 0] [X2]=[b2] [ 0 0 d3 0] [X3] [b3] [ 0 0 d4 1] [X4] [b4]
To solve:
In general:
Eta matrix with column e= [d1 d2 d3 ... dn]T..
To Solve E * x = b:
Let s be the number of non-zero entries in column e.
This process involves one division, s-1 multiplications, and s-1 subtractions.
Back to the furniture example:
A= [3 2 1 2 1 0 0] b= [225] [1 1 1 1 0 1 0] [117] [4 3 3 4 0 0 1] [420] c= [19 13 12 17 0 0 0]T HB=[X5 X6 X7]T B0= I, x* = [225 117 420]T, CB=[0 0 0]T
Step 1.1: yT * B0= CBT => y = [0 0 0]T Step 1.2: Look for yT AN < CNT: [0 0 0 0] < [19 13 12 17] True for all non-basic variables. Choose X3 to enter.
Step 1.3: Choose the pivot row: B0 * d = a = [1 1 3]T so d= [1 1 3]T. 225 - t >= 0 t <= 225 117 - t >= 0 t <= 117 (*) tightest 420 -3t >= 0 t <= 420/3= 140 X6 leaves. X5= 225 - 117= 108 X3= 117 X7= 420 - 3(117)= 69 B1= I * E1 where E1 = X5 X3 X7 [ 1 1 0] [ 0 1 0] [ 0 3 1]
Iteration #2: Step 2.1: yT B1= CBT => B1T y = CB HB=[X5 X3 X7]T [ 1 0 0] [y1] [ 0] [ 1 1 3] [y2] = [12] [ 0 0 1] [y3] [ 0] y3=0, y1=0, y2= 12- y1 -3y3= 12. y= [0 12 0]T Step 2.2: Look for yT AN < CNT: X1 X2 X4 X6 AN= [ 3 2 2 0] [ 1 1 1 1] [ 4 3 4 0] yT AN = [12 12 12 12] < [19 13 17 0] Any variable except X6 can enter. Let X1 enter.
Step 2.3: Find the pivot row. Solve B1 d = a where a= [3 1 4 ]T [ 1 1 0] [d1] [ 3] [ 0 1 0] [d2] = [ 1] [ 0 3 1] [d3] [ 4] d2= 1, d1= 3-d2=2, d3=4-3d2=1 d=[2 1 1]T Basis var. X5: 108 - 2t >= 0, t <= 54 (*) Basis var. X3: 117 - t >= 0, t <=117 Basis var. X7: 69 - t >= 0, t <= 69 X5 leaves. X1= 54 X3= 117-54= 63 X7= 69-54= 15 HB=[X1 X3 X7]T B2= E1 * E2 where E1 = E2 = [ 1 1 0] [ 2 0 0] [ 0 1 0] [ 1 1 0] [ 0 3 1] [ 1 0 1]
Iteration #3: Step 3.1: E2T * E1T * y= CB HB=[X1 X3 X7]T First, E2T z = CB [ 2 1 1] [z1] [19] [ 0 1 0] [z2]= [12] [ 0 0 1] [z3] [ 0] z= [7/2 12 0]T Next, E1T y = z [ 1 0 0] [y1] [7/2] [ 1 1 3] [y2] = [ 12] [ 0 0 1] [y3] [ 0] y=[7/2 17/2 0]T Step 3.2: Look for yT AN < CNT: X2 X4 X5 X6 [7/2 17/2 0] [ 2 2 1 0] [ 1 1 0 1] [ 3 4 0 0] = [15.5 15.5 7/2 17/2] < [13 17 0 0] X4 enters.
Step 3.3: Find the pivot row. Solve B2 d = E1 * E2 d = [2 1 4 ]T Solve E1 f = a : [ 1 1 0] [f1] [ 2] [ 0 1 0] [f2]= [ 1] [ 0 3 1] [f3] [ 4] f2=1, f1=2-f2= 1, f3= 4 -3f2= 1. f= [1 1 1]T Solve E2 d = f : [ 2 0 0] [d1] = [ 1] [ 1 1 0] [d2] = [ 1] [ 1 0 1] [d3] = [ 1] d1= 1/2, d2= 1/2, d3= 1/2. Basis var. X1: 54 - 0.5 t >= 0, t <=108 Basis var. X3: 63 - 0.5 t >= 0, t <=126 Basis var. X7: 15 - 0.5 t >= 0, t <= 30 (*) X4 enters, X7 leaves. X1= 54 -15 = 39 X3= 63 -15 = 48 X4= 30 E3= [1 0 0.5] [0 1 0.5] [0 0 0.5]
Iteration #4: Step 4.1: yT B3= CBT => E3T * E2T * E1T y= CB HB=[X1 X3 X4]T E3T w = CB [1 0 0 ] [w1] [19] [0 1 0 ] [w2] = [12] [0.5 0.5 0.5] [w3] [ 7] w1= 19, w2= 12, w3= 3. w= [19 12 3]T E2T z = w [ 2 1 1] [z1] [19] [ 0 1 0] [z2]= [12] [ 0 0 1] [z3] [ 3] z2= 12, z3= 3, z1= 2. z= [2 12 3]T Next, E1T y = z [ 1 0 0] [y1] [ 2] [ 1 1 3] [y2] = [ 12] [ 0 0 1] [y3] [ 3] y1= 2, y3=3, y2= 12 -y1 -3y3= 12 -2 -9= 1 y=[2 1 3]T
Step 4.2: Look for yT AN < CNT: X2 X5 X6 X7 [2 1 3] [ 2 1 0 0] [ 1 0 1 0] [ 3 0 0 1] = [14 2 1 3] < [13 0 0 0 ] STOP: Solution is optimal.
The dictionaries to check correctness: After 2 pivots: X1 = 54 - 0.50 X2 - 0.50 X4 - 0.50 X5 + 0.50 X6 X3 = 63 - 0.50 X2 - 0.50 X4 + 0.50 X5 - 1.50 X6 X7 = 15 + 0.50 X2 - 0.50 X4 + 0.50 X5 + 2.50 X6 ------------------------------------------------- z= 1782 - 2.50 X2 + 1.50 X4 - 3.50 X5 - 8.50 X6 X4 enters. X7 leaves. z = 1782 After 3 pivots: X1 = 39 - 1 X2 - 1 X5 - 2 X6 + 1 X7 X3 = 48 - 1 X2 + 0 X5 - 4 X6 + 1 X7 X4 = 30 + 1 X2 + 1 X5 + 5 X6 - 2 X7 ------------------------------------------------- z= 1827 - 1 X2 - 2 X5 - 1 X6 - 3 X7 The optimal solution: 1827 X1 = 39 X2 = 0 X3 = 48 X4 = 30 X5 = 0 X6 = 0 X7 = 0