Setting Up the Simplex Tableau
Setting Up the Simplex Tableau
Z -3x1 - 5x2
x1
+ x3
2x2
+ x4
3x1 + 2x2
=
0
=
4
=
12
+ x5 =
18
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Select 2 (degrees of freedom) nonbasic variables: x1 and x2 (origin)
Initial BF solution: (x1, x2, x3, x4, x5) = (0,0,4,12,18)
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Select Entering Basic Variable
Choose variable with negative coefficient having largest absolute value
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Pivot Column
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12/2 = 6
x5
(3)
0
3
2
0
0
1
18/2 = 9
Pivot Column
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Pivot Number
Pivot Column
Pivot Row
Use Gaussian Elimination
1. Divide the Pivot Row by the Pivot Number (use new row for following steps)
2. For other rows, transform Pivot Column to leaving basic variable column
Iterations of the Simplex Method in Tabular Form
0
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Z
(0)
1
x3
(1)
0
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
Iterations of the Simplex Method in Tabular Form
0
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Select 2 (degrees of freedom) nonbasic variables: x1 and x4
BF solution: (x1, x2, x3, x4, x5) = (0,6,4,0,6)
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4/1 = 4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6/3 = 2
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Use Gaussian Elimination
1. Divide the Pivot Row by the Pivot Number (use new row for following steps)
2. For other rows, transform Pivot Column to leaving basic variable column
Iterations of the Simplex Method in Tabular Form
1
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Z
(0)
1
x3
(1)
0
x2
(2)
0
x1
(3)
0
1
0
0
-1/3
1/3
2
Iterations of the Simplex Method in Tabular Form
1
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Z
(0)
1
0
0
0
3/2
1
36
x3
(1)
0
0
0
1
1/3
-1/3
2
x2
(2)
0
0
1
0
1/2
0
6
x1
(3)
0
1
0
0
-1/3
1/3
2
Iterations of the Simplex Method in Tabular Form
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
0
0
0
3/2
1
36
x3
(1)
0
0
0
1
1/3
-1/3
2
x2
(2)
0
0
1
0
1/2
0
6
x1
(3)
0
1
0
0
-1/3
1/3
2
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Tie-Breaking for Entering Basic Variable
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-3
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Choice of entering basic variable is arbitrary –
Simplex Method will eventually reach the optimal solution
Tie-Breaking for Leaving Basic Variable (Degeneracy)
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12/2 = 6
x5
(3)
0
3
3
0
0
1
18/3 = 6
Might encounter degeneracy (one or more BF solutions equal to zero) if there are
redundant constraints (a BF solution with more than n constraints passing through it)
Rules to avoid “looping”, but very rare case...choice of leaving basic variable is arbitrary
No Leaving Basic Variable – Unbounded Z
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
Right
Side
Z
(0)
1
-3
-5
0
0
x3
(1)
0
1
0
1
4
No candidates for leaving basic variable –
Entering basic variable could be increased indefinitely without giving negative values
to any current basic variables
Conclude that Z is unbounded
Multiple Optimal Solutions
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
0
0
0
0
1
18
x1
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
0
3
1
-1
6
x2
(3)
0
0
1
-3/2
0
1/2
3
Final tableau has one or more nonbasic variable with a coefficient of zero in row (0)
To determine other endpoint of optimal region, consider nonbasic variable with zero
coefficient as pivot column
Simplex Method Definitions
Slack Variables – Added to convert functional inequality constraints to
equivalent equality constraints
Augmented Solution – Solution for the original variables that is
augmented by the slack variables
Basic Solution – Augmented corner-point solution
Basic Feasible (BF) Solution – Augmented CPF solution
Degrees of Freedom – Number of variables – number of equations
(3,2) ĺ (3,2,1,8,5)
5–3=2
Number of variables that are set equal to zero
Nonbasic Variables – Variables that are set equal to zero
Basic Variables – Variables that are not set equal to zero
Z -3x1 - 5x2
x1
+ x3
2x2
+ x4
3x1 + 2x2
=
0
=
4
=
12
+ x5 =
18
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Select 2 (degrees of freedom) nonbasic variables: x1 and x2 (origin)
Initial BF solution: (x1, x2, x3, x4, x5) = (0,0,4,12,18)
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Select Entering Basic Variable
Choose variable with negative coefficient having largest absolute value
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Pivot Column
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12/2 = 6
x5
(3)
0
3
2
0
0
1
18/2 = 9
Pivot Column
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Pivot Number
Pivot Column
Pivot Row
Use Gaussian Elimination
1. Divide the Pivot Row by the Pivot Number (use new row for following steps)
2. For other rows, transform Pivot Column to leaving basic variable column
Iterations of the Simplex Method in Tabular Form
0
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Z
(0)
1
x3
(1)
0
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
Iterations of the Simplex Method in Tabular Form
0
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Select 2 (degrees of freedom) nonbasic variables: x1 and x4
BF solution: (x1, x2, x3, x4, x5) = (0,6,4,0,6)
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4/1 = 4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6/3 = 2
Select Leaving Basic Variable
1. Select coefficient in pivot column > 0
2. Divide Right Side value by this coefficient
3. Select row with smallest ratio
Iterations of the Simplex Method in Tabular Form
1
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Use Gaussian Elimination
1. Divide the Pivot Row by the Pivot Number (use new row for following steps)
2. For other rows, transform Pivot Column to leaving basic variable column
Iterations of the Simplex Method in Tabular Form
1
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Z
(0)
1
x3
(1)
0
x2
(2)
0
x1
(3)
0
1
0
0
-1/3
1/3
2
Iterations of the Simplex Method in Tabular Form
1
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
0
0
5/2
0
30
x3
(1)
0
1
0
1
0
0
4
x2
(2)
0
0
1
0
1/2
0
6
x5
(3)
0
3
0
0
-1
1
6
Z
(0)
1
0
0
0
3/2
1
36
x3
(1)
0
0
0
1
1/3
-1/3
2
x2
(2)
0
0
1
0
1/2
0
6
x1
(3)
0
1
0
0
-1/3
1/3
2
Iterations of the Simplex Method in Tabular Form
2
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
0
0
0
3/2
1
36
x3
(1)
0
0
0
1
1/3
-1/3
2
x2
(2)
0
0
1
0
1/2
0
6
x1
(3)
0
1
0
0
-1/3
1/3
2
Optimality Test: Are all coefficients in row (0) 0?
If yes, then STOP – optimal solution
If no, then continue algorithm
Tie-Breaking for Entering Basic Variable
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-3
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12
x5
(3)
0
3
2
0
0
1
18
Choice of entering basic variable is arbitrary –
Simplex Method will eventually reach the optimal solution
Tie-Breaking for Leaving Basic Variable (Degeneracy)
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
-3
-5
0
0
0
0
x3
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
2
0
1
0
12/2 = 6
x5
(3)
0
3
3
0
0
1
18/3 = 6
Might encounter degeneracy (one or more BF solutions equal to zero) if there are
redundant constraints (a BF solution with more than n constraints passing through it)
Rules to avoid “looping”, but very rare case...choice of leaving basic variable is arbitrary
No Leaving Basic Variable – Unbounded Z
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
Right
Side
Z
(0)
1
-3
-5
0
0
x3
(1)
0
1
0
1
4
No candidates for leaving basic variable –
Entering basic variable could be increased indefinitely without giving negative values
to any current basic variables
Conclude that Z is unbounded
Multiple Optimal Solutions
Coefficient of:
Basic
Var
Eq.
Z
x1
x2
x3
x4
x5
Right
Side
Z
(0)
1
0
0
0
0
1
18
x1
(1)
0
1
0
1
0
0
4
x4
(2)
0
0
0
3
1
-1
6
x2
(3)
0
0
1
-3/2
0
1/2
3
Final tableau has one or more nonbasic variable with a coefficient of zero in row (0)
To determine other endpoint of optimal region, consider nonbasic variable with zero
coefficient as pivot column
Simplex Method Definitions
Slack Variables – Added to convert functional inequality constraints to
equivalent equality constraints
Augmented Solution – Solution for the original variables that is
augmented by the slack variables
Basic Solution – Augmented corner-point solution
Basic Feasible (BF) Solution – Augmented CPF solution
Degrees of Freedom – Number of variables – number of equations
(3,2) ĺ (3,2,1,8,5)
5–3=2
Number of variables that are set equal to zero
Nonbasic Variables – Variables that are set equal to zero
Basic Variables – Variables that are not set equal to zero