Title: Simplex Method
1Simplex Method
By Jeffrey Bivin Lake Zurich High School
Last Updated October 11, 2005
2The Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
- x1 gt 0
- x2 gt 0
- x3 gt 0
Jeff Bivin -- LZHS
3Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 s1 4
Jeff Bivin -- LZHS
4Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4
Jeff Bivin -- LZHS
5Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4
Jeff Bivin -- LZHS
6Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4
Jeff Bivin -- LZHS
7Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4 x1 x2 s2 1
Jeff Bivin -- LZHS
8Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4 x1 x2 s2 1
Jeff Bivin -- LZHS
9Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4 x1 x2 s2 1 x2 s3
2
Jeff Bivin -- LZHS
10Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4 x1 x2 s2 1 x3 s3
2
Jeff Bivin -- LZHS
11Re-writing the Constraints
- x1 2x2 x3 lt 4
- x1 x2 gt 1 x3 gt 2
x1 2x2 x3 s1 4 x1 x2 s2 1 x3 s3
2
Jeff Bivin -- LZHS
12Function to minimize
We use a negative z because we want to minimize
Jeff Bivin -- LZHS
13Function to minimize
Re-writing
2x1 x2 x3 z 0
Jeff Bivin -- LZHS
14Initial Tableau
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
15Initial Tableau
contraints
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
16Initial Tableau
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
function
Jeff Bivin -- LZHS
17Initial Tableau
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
18Initial Tableau Analysis
Jeff Bivin -- LZHS
19A negative basic variable in s2leads us to use
column x1 as the pivot column.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
20A negative basic variable in s2leads us to use
column x1 as the pivot column.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
s2 is a basic variable because it has only one
non-zero element in the column
Jeff Bivin -- LZHS
21A negative basic variable in s1leads us to use
column x1 as the pivot column.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
2 1 1 0 0 0 1 0
We use Column x1 as the pivot column because the
1 in column x1 is the left most positive number
in the row with the -1 value (negative basic
variable).
Jeff Bivin -- LZHS
22Divide the value column by the pivot column.This
adds an additional column at the right.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4 4
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
231 is the lowest non-negative quotient.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4 4
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
241 is the lowest non-negative quotient.Therefore,
the 1 in column x1 is determined to be the
pivot point.
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4 4
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
25Determine the row operationsrow1 row1
row2row2 row2row3 row3row4 row4 2 x
row2
x1 x2 x3 s1 s2 s3 -z Values
1 2 1 1 0 0 0 4 4
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
2 1 1 0 0 0 1 0
Jeff Bivin -- LZHS
26Perform the row operations to determine Tableau 2
x1 x2 x3 s1 s2 s3 -z Values
r1r1-r2 0 1 1 1 1 0 0 3
r2 r2 1 1 0 0 -1 0 0 1
r3r3 0 0 1 0 0 -1 0 2
r4r4-2r2 0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
272nd Tableau Analysis
Jeff Bivin -- LZHS
28 A negative basic variable in s3leads us to use
column x3 as the pivot column.
x1 x2 x3 s1 s2 s3 -z Values
0 1 1 1 1 0 0 3
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
29 Divide the value column by the pivot
column.This adds an additional column at the
right.
x1 x2 x3 s1 s2 s3 -z Values
0 1 1 1 1 0 0 3 3
1 1 0 0 -1 0 0 1 ??
0 0 1 0 0 -1 0 2 2
0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
30 2 is the lowest non-negative quotient.
x1 x2 x3 s1 s2 s3 -z Values
0 1 1 1 1 0 0 3 3
1 1 0 0 -1 0 0 1 ??
0 0 1 0 0 -1 0 2 2
0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
31 1000 is the lowest non-negative
quotient.Therefore, 4 is determined to be the
pivot point.
x1 x2 x3 s1 s2 s3 -z Values
0 1 1 1 1 0 0 3 3
1 1 0 0 -1 0 0 1 ??
0 0 1 0 0 -1 0 2 2
0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
32Determine the row operationsrow1 row1
row3row2 row2row3 row3 row4 row4 row3
x1 x2 x3 s1 s2 s3 -z Values
0 1 1 1 1 0 0 3
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
0 -1 1 0 2 0 1 -2
Jeff Bivin -- LZHS
33Perform the row operations to determine Tableau 3
x1 x2 x3 s1 s2 s3 -z Values
r1r1-r3 0 1 0 1 1 1 0 1
r2r2 1 1 0 0 -1 0 0 1
r3r3 0 0 1 0 0 -1 0 2
r4r4-r3 0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
343rd Tableau Analysis
Jeff Bivin -- LZHS
35All basic variable are positive.But, we have a
negative value in the bottom row.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
36This leads us to use column x2 as the pivot
column.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
37 Divide the value column by the pivot
column.This adds an additional column at the
right.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1 1
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
38We have two lowest non-negative quotients.
Therefore, we may choose which to use.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1 1
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
39We have two lowest non-negative quotients.
Therefore, we may choose which to use. Lets
use the first row.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1 1
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
40Using the first row, 1 is determined to be the
pivot point.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1 1
1 1 0 0 -1 0 0 1 1
0 0 1 0 0 -1 0 2 ??
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
41 Determine the row operationsrow1 row1 row2
row2 row1row 3 row3row4 row4 row1
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 1 0 0 -1 0 0 1
0 0 1 0 0 -1 0 2
0 -1 0 0 2 1 1 -4
Jeff Bivin -- LZHS
42Perform the row operations to determine Tableau 4
x1 x2 x3 s1 s2 s3 -z Values
r1r1 0 1 0 1 1 1 0 1
r2r2-r1 1 0 0 -1 -2 -1 0 0
r3r3 0 0 1 0 0 -1 0 2
r4r4r1 0 0 0 1 3 2 1 -3
Jeff Bivin -- LZHS
434th Tableau Analysis
Jeff Bivin -- LZHS
44Basic Variables x1, x2, and x3 are all positive
and the bottom row has all positive variable
coefficients.
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
45Basic Variables x1, x2, and x3 are all positive
and the bottom row has all positive variable
coefficients.
Process Complete
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
Jeff Bivin -- LZHS
46Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
Jeff Bivin -- LZHS
47Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
x1 0 / 1 0
Jeff Bivin -- LZHS
48Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
x2 1 / 1 1
Jeff Bivin -- LZHS
49Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
x3 2 / 1 2
Jeff Bivin -- LZHS
50Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
s1 0
Non-basic Variables 0
Jeff Bivin -- LZHS
51Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
s2 0
Non-basic Variables 0
Jeff Bivin -- LZHS
52Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
s3 0
Non-basic Variables 0
Jeff Bivin -- LZHS
53Determine the Solutions
x1 x2 x3 s1 s2 s3 -z Values
0 1 0 1 1 1 0 1
1 0 0 -1 -2 -1 0 0
0 0 1 0 0 -1 0 2
0 0 0 1 3 2 1 -3
z -(-3 / 1) 3
Jeff Bivin -- LZHS
54Results
- x1 0
- x2 1
- x3 2
- s1 0
- s2 0
- s3 0
- z 3
Jeff Bivin -- LZHS