OPERATIONS RESEARCH

OPERATIONS RESEARCH
Michał Kulej
Business Information Systems
The development of the potential and academic programmes of Wrocław University of
Technology
Project co-financed by European Union within European Social Fund
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
1 / 37
Solving Linear Programming Problems - The Simplex Method
Preview of the Simplex Method
Standard Form of an LPP
Before the simplex algorithm can be used to solve any linear
programming problem (LPP), it must be converted into an equivalent
standard form of LPP in which all constraints are equations and all
variables are non-negative.:
max(min)z = c1 x1 + c2 x2 + · · · + cn xn
a11 x1 + a12 x2 + · · · + a1n xn = b1
...
am1 x1 + am2 x2 + · · · + amn xn = bm
xi ≥ 0, i = 1, . . . , n
The system equations(constraints) can be written much more
concisely in matrix form as follows: Ax = b , x ≥ 0. We assume, the
rank of matrix A equals m.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
2 / 37
Solving Linear Programming Problems - The Simplex Method
Preview of the Simplex Method
Converted a Linear Problem to the Standard Form
1
We convert (≤) constraint ai1 x1 + ai2 x2 + · · · + ain xn ≤ bi to an
equality constraint by adding a slack variable si to the left-hand
side of the constraint and adding the sign restriction si ≥ 0:
ai1 x1 + ai2 x2 + · · · + ain xn + si = bi , si ≥ 0.
2
We convert (≥) constraint ai1 x1 + ai2 x2 + · · · + ain xn ≥ bi to an
equality constraint by subtracting a surplus variable si from the
left-hand side of the constraint and adding the sign restriction
si ≥ 0: ai1 x1 + ai2 x2 + · · · + ain xn − si = bi , si ≥ 0.
3
(Dealing with unrestricted variables) If variable xi can take
negative values or nonnegative values we use the substitution:
xi = ui − vi and add two nonnegative constraints ui ≥ 0, vi ≥ 0.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
3 / 37
Solving Linear Programming Problems - The Simplex Method
Preview of the Simplex Method
Example
max z = 2x1 + 3x2 − x3
x1 − 2x2 ≤ 5
x2 + 3x3 ≥ 3
x1 + x2 − 2x3 = 20
x1 , x2 ≥ 0
After converting constraints 1 and 2 we receive:
max z = 2x1 + 3x2 − x3
x1 − 2x2 + s1 = 5
x2 + 3x3 − s2 = 3
x1 + x2 − 2x3 = 20
x1 , x2 , s1 , s2 ≥ 0
Next we make the substitution x3 = u3 − v3 and get the standard form
of the problem:
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
4 / 37
Solving Linear Programming Problems - The Simplex Method
Preview of the Simplex Method
Standard Form of the Problem
max z = 2x1 + 3x2 − u3 + v3
x1 − 2x2 + s1 = 5
x2 + 3u3 + 3v3 − s2 = 3
x1 + x2 − 2u3 + 2v3 = 20
x1 , x2 , s1 , s2 , u3 , v3 ≥ 0
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
5 / 37
Solving Linear Programming Problems - The Simplex Method
Converting from Graphical to Algebraic Method
Graphical Method:
1
Graph all constraints, including nonnegativity restrictions Solution space consists of infinity of feasible solution.
2
Identify feasible corner points (extreme points) of the solution
space - Candidates for the optimum solution are given by a finite
number of corner points.
3
Use the objective function to determine optimum corner point from
among all the candidates.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
6 / 37
Solving Linear Programming Problems - The Simplex Method
Converting from Graphical to Algebraic Method
Algebraic Method:
1
Represent the solution space by m equations in n varable and
restrict all variables to nonnegative values, m ≤ n - The system
has infinity of feasible solution.
2
Determine the feasible basic solution of the equations Candidates for optimal solution are given by a finite number of
basic feasible solutions.
3
Use the objective function to determine the optimum basic feasible
solution from among all the candidates.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
7 / 37
Solving Linear Programming Problems - The Simplex Method
Converting from Graphical to Algebraic Method
Algebraic Determination of Corner Points
Definition
Consider a set of equation Ax = b , if we set n − m variables to zero
and than solve the m equations for remaining m variables, the resulting
solution, if unique, is called a basic solution and must correspond to a
corner point (extreme point) of the solution space. The zero n − m
variables are known as nonbasic variables (NBV) and the remaining m
variables are called basic variables(BV).
Remarks The set of columns of matrix A that correspondes to basic
variables is linearly independent set of vectors. This set is called basis
and will be denoted by B.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
8 / 37
Solving Linear Programming Problems - The Simplex Method
Converting from Graphical to Algebraic Method
Basic Solutions - Examples
Find a few basic solution to the following system of two equations with
four variables:
x1 + x2 + 2x4 = 3
2x1 − x2 − x3 + 4x4 = 1
We begin by choosing as a basic variables BV = {x1 , x2 } and
nonbasic variables NBV = {x3 , x4 }. Taking x3 = x4 = 0 we obtain the
following linear system:
x1 + x2 = 3
2x1 − x2 = 1
The equations provide the unique (feasible) basic solution: x1 = 34 ,
x2 = 1 32 , x3 = 0, x4 = 0. Taking as a basic variable BV = {x2 , x3 } and
set nonbasic variables NBV = {x1 , x4 } equal to zero x1 = x4 = 0, we
receive the (unfeasible) basic solution : x1 = 0, x2 = 3, x3 = −4,
x4 = 0. But we can not choose variables {x1 , x4 } as a basic variables
because in this case the system equations is iconsistent(has no
solutions)!
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
9 / 37
Solving Linear Programming Problems - The Simplex Method
Converting from Graphical to Algebraic Method
Adjacent Basic Solution
Definition
For any linear programming problem with m constraints, two basic
feasible solutions are called adjacent if their sets of basic variables
have m − 1 basic variables in common.
For example, two basic solution of above example
X1 = (x1 = 34 , x2 = 35 , x3 = 0, x4 = 0)(feasible basic solution - FBS) and
X2 = (x1 = 0, x2 = 3, x3 = −4, x4 = 0)(infeasible basic solution - IBS)
are adjacent.
Definition
Any basic solution to Ax = b in which all variables are non-negative is
a feasible basic solution(FBS).
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
10 / 37
Solving Linear Programming Problems - The Simplex Method
The Key Concept of the Simplex Method
Property
For any LPP there is a unique extreme point(corner point) of the
feasible region corresponding to each basic feasible solution. Also,
there is at least one feasible basic solution (FBS) corresponding to
each extreme point of the feasible region.
Theorem
The feasible region of any LPP is a convex set. Also, if the LPP has an
optimal solution, there must be an extreme point (and also FBS) of
feasible region that is optimal.
From above facts we see that in searching for an optimal solution to
LPP we need only find the best basic feasible solution(largest Z - value
in max problem or smallest Z - value in min problem) to Ax = b .
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
11 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Step 1-Initialization: Find the initial Feasible Basic Solution(FBS) to
the problem (this solution will be called current FBS).
Step 2 - Optimality test: Is the current basic FBS optimal? If no than
go to the Iteration. If yes then stop.
Step 3 Iteration: Perform an iteration to find an adjacent FBS to the
current one that has larger (not less)Z - value(for the max
problem) and smaller Z value(for the min problem).
Return to Step 2 using the new FBS as a current FBS.
There are three elements that must be determined in the simplex
algorithm:
1
Finding the initial FBS.
2
Cheking if current FBS is optimal? (Optimality test).
3
Transition from current basic feasible solution to the better
adjacent FBS.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
12 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Example Problem
Solve the following problem:
x2
max z = 4x1 + 3x2
x1 + x2 ≤ 40
2x1 + x2 ≤ 60
x1 , x2 ≥ 0
D
40
C
20
B
A
10
Michał Kulej (Wrocł Univ. of Techn.)
20
30
OPERATIONS RESEARCH
40
x1
BIS
13 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Simplex Method - Example
We convert the model to standard form adding two slack variables
s1 , s2 :
max z = 4x1 + 3x2
s1
+x1
+x2 = 40
s2 +2x1 +x2 = 60
x1 , x2 , s1 , s2 ≥ 0
The above model is said to be in basic (canonical) form. We can obtain
the first FBS with
BV = {s1 , s2 }, NBV = {x1 , x2 }
The initial feasible basic solution is
X 1 = (s1 = 40, s2 = 60, x1 = 0, x2 = 0) with objective value Z = 0.
This FBS corresponds to the corner point A of the feasible region
ABCD.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
14 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Tableau Form of Simplex Calculation
We express this model in equation form as follows:
−4x1 −3x2 = 0
s1
+x1
+x2
= 40
s2 +2x1 +x2
= 60
x1 , x2 , s1 , s2 ≥ 0
Z
(1)
The row 0 of above system is equation for objective function
Z − 4x1 − 3x2 = 0. There are not basic variables in the objective
function. This system equation is represented in simplex tableau as
follows:
cB BV s1 s2 x1 x2 Solution
0 s1 1 0 1
1
40
0 s2 0 1 2
1
60
Z
0 0 −4 −3
0
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
15 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Computational Details of the Simplex Iteration
The last row of simplex tableau contains so called optimality
coefficients(except for first and last column) of the variables. We
choose the nonbasic variable x1 with the most negative coefficient in
row Z (ties may be broken in arbitrary fasion)- this variable is called
entering variable. And this variable we want to inroduce as a basic
variable in the new adjacent FBS. Since each unit by which we
increase x1 increases objective function value Z by 4,(for x1 only 3),
we would like to make x1 as large as possible. We see, from the
second equation of (1), that maximal value for x1 equals
x1 = 40/1 = 40 and from third equation of (1) we get maximal value
equals x1 = 60/2 = 30 . We choose minimum of these values
(x1 = 30) it means that basic variable s2 will be nonbasic variable in
the new adjacent FBS. This variable is called leaving basic variable.
The new basic variables are BV = {s1 , x1 }. In the simplex tableau we
add the new column and element 2 in column x1 (entering variable) and
row s2 (leaving variable) is taking in square.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
16 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
First Simplex Tableau
cB BV
0 s1
0 s~2
Z
s1 s2 x~1 x2
1 0 1
1 40 40/1 = 40
0 1 2
1 60 60/2 = 30
0 0 −4 −3 0
Now we are solving the system equations (1) with basic variables
s1 , x2 . The process is based on Gauss-Jordan row operations. It
identifies the entering variable column as the pivot column and the
leaving variable row as the pivot row. The intersection of the pivot
column and pivot row is the pivot element (element 2 ). The
Gauss-Jordan computations needed to produce the new basic solution
include two types:
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
17 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
Gauss-Jordan Row Operations
1
Pivot row
a. Replace the leaving variable in the BV column with
the entering variable.
b. New pivot row = Current pivot row ÷ Pivot element
2
All other rows, including Z :
New row = (Current row) - (Its pivot column coefficient)× (New
pivot row)
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
18 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
The New(Second) Simplex Tableau
cB BV
0 s~1
4 x1
z
s1
s2
x1
1 −0.5 0
0
0.5 1
0
2
0
x~2
0.5
0.5
−1
10 10/0.5 = 20
30 30/0.5 = 60
120
The basic feasible solution is: X 2 = (s1 = 10, x1 = 30, s2 = 0, x2 = 0)
with objective function value Z = 120. This solution corresponds to
extreme (corner point) B of the feasible region. The solution X 2 is not
optimal - coefficient of variable x2 in Z - row is negative (so x2 will be
entering variable in the next iteration).
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
19 / 37
Solving Linear Programming Problems - The Simplex Method
The Essence of Simplex Method
The Final (Optimal) Simplex Tableau
So we have obtained the entering variable x2 and the leaving variable
s1 . The new basic variables are BV = {x2 , x1 }. We use the
Gauss-Jordan row operations with the pivot element 0.5 . These
computations produce the following simplex tableau:
cB BV
3 x2
4 x1
z
s1 s2 x1 x2
2 −1 0 1 20
−1 1 1 0 20
2
1 0 0 140
Now we have the FBS X 3 = (x2 = 20, x1 = 20, s1 = 0, s2 = 0) with
Z = 140. We find that this solution is optimal because none of the
coefficients in row-Z is negative, so the algorithm is finished. The
feasible basic solution X 3 corresponds to the extreme point C.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
20 / 37
Solving Linear Programming Problems - The Simplex Method
UNBOUNDED SOLUTION
Example
In some linear programming problems, the values of the variables may
be increased indefinitely without violating any of the constraints meaning that the feasible region is unbounded in at least one variable.
As a result, the Z value may increase(maximization case) or
decrease(minimization case) indefinitely.The following example shows
how unboundedness can be recognized in the simplex tableau.
max z = 2x1 + x2 + x3
s1
+3x1 − x2 = 60
s2 +x1 − 2x2 + 2x3 = 10
x1 , x2 , x3 , s1 , s2 ≥ 0
The first simplex tableau (BV={s1 , s2 })is as follows:
cB BV
0 s1
0 s2
Z
Michał Kulej (Wrocł Univ. of Techn.)
s1 s2 x1 x2 x3 FBS
1 0 3 −1 0
60
0 1 1 −2 2
10
0 0 −2 −1 −1
0
OPERATIONS RESEARCH
BIS
21 / 37
Solving Linear Programming Problems - The Simplex Method
UNBOUNDED SOLUTION
Recognizing Unboundedness in the Simplex Tableau
We see that both x1 and x2 have negative Z - row coefficients. Hence
either one can improve the solution. If we take x2 as entering variable
we see that all the constraint coefficients under x2 are negative or zero.
This means that there is no leaving variable and that x2 can be
increased indefinitely without violating any of the constraints. Because
each unit increase in x2 will increase Z by 1, an infinite increase in x2
leads to an infinite increase in Z .
If there exist a variable with negative coefficient in Z - row of simplex
tableau and all the constraint coefficients under this variable are negative or zero than the objective function of LPP is unbounded.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
22 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm
The Simplex Algorithm
Step 1.(Initialization) The LPP must be expressed in basic(canonical)
form:
max(min)Z = c1 x1 + c2 x2 + · · · + cn xn
x1
+a1m+1 xm+1 + · · · + a1n xn = b1
x2
+a2m+1 xm+1 + · · · + a2n xn = b2
...
xm +a2m+1 xm+1 + · · · + a2n xn = bm
xi ≥ 0, i = 1, . . . , n,
where the variables x1 , . . . , xm are basic variables (BV = {x1 , . . . , xm }),
the variables xm+1 , xm+2 , . . . , xn are nonbasic variable
(NBV = {xm+1 , xm+2 , . . . , xn },) and bi ≥ 0, i = 1, . . . m(m < n).
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
23 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm
The Simplex Algorithm
Step 2.(The starting simplex tableau)
cB
c1
c2
...
cm
BV
x1
x2
...
xm
Z
x1
1
0
...
0
0
x2
0
1
...
0
0
where:
ck =
...
...
...
...
...
...
m
X
xm
0
0
...
1
0
xm+1
a1m+1
a2m+1
...
amm+1
−c m+1
...
...
...
...
...
...
xn Solution
a1n
b1
a2n
b2
,
...
...
amn
bm
−c n
b0
ci aik − ck , k = 1, . . . , n
(2)
i=1
b0 =
m
X
ci bi
(3)
i=1
The numbers c i are called optimality coefficients.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
24 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm
The Simplex Algorithm
Step 3. If all optimality coefficients c 1 , . . . , c n (all the Z - row cefficients)
are nonnegative then STOP - the current basic solution is optimal solution. Else, go to step 4.
Step 4. If there exist nonbasic variable with negative optimality coefficient and all coefficients of the column of simplex tableau for this variable are nonpositive then STOP - the objective function is unbounded.
Else, go to step 5.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
25 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm
The Simplex Algorithm
Step 5. Select the entering variable xp . In maximization (minimization) problem it is the nonbasic variable having the most negative(positive) optimality coefficient (coefficient in the Z - row). Ties in
minimum(maximum) operation are broken arbitrary. Select the leaving
variable xr . It is a basic variable xr for which the following condition is
satisfied:
br
bi
= min
aip >0 aip
arp
The variable xr will be nonbasic variable in the next FBS .
Step 6. Apply the Gauss-Jordan row operations with pivot element arp .
Go back to step 3.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
26 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm - an Example
Example
Solve the folowing problem by simplex algorithm:
max Z = 2x1 + x2 + x3
3x1 + x2 + x3 ≤ 60
x1 − x2 + 2x3 ≤ 10
x1 + x2 − x3 ≤ 20
x1 , x2 , x3 ≥ 0
First we covert the problem to standard form and canonical form:
max Z = 2x1 + x2 + x3
s1
+3x1 + x2 + x3 = 60
s2
+x1 − x2 + 2x3 = 10
s3 +x1 + x2 − x3 = 20
x1 , x2 , x3 , s1 , s2 , s3 ≥ 0
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
27 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm - an Example
The Initial Simplex Tableau
Next we construct the first simplex tableau:
cB BV
0 s1
0 s~2
0 s3
Z
s1 s2 s3 ~x1 x2 x3
1 0 0 3
1
1 60 60/3 = 20
0 1 0 1 −1 2 10 10/1 = 10
0 0 1 1
1 −1 20 20/1 = 20
0 0 0 −2 −1 −1 0
Remarks It is easy to compute the optimality coefficients using
formula(2). For example for the variable x1 we receive :
c 1 = 0 ∗ 3 + 0 ∗ 1 + 0 ∗ 1 − 2 = −2. If there are no basic variable in the
objective function, then we have c i = −ci , i = 1, . . . , n in the first
simplex tableau.
The entering variable and leaving variable are x1 and s2 respectively
so taking as the pivot element 1 . The new simplex tableau can be
computed by using the Gauss-Jordan row operations:
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
28 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm - an Example
The Second Simplex Tableau
cB BV
0 s1
2 x1
0 s~3
Z
s1 s2 s3 x1 x~2 x3
1 −3 0 0 4 −5 30 30/4 = 7.5
0 1 0 1 −1 2 10
−
0 −1 1 0 2 −3 10 10/2 = 5
0 2 0 0 −3 3 20
It is easy to computate the Z - row coefficients using the formula (2).
For example, the x2 optimality coefficient is computed as follows:
0 ∗ 4 + 2 ∗ (−1) + 0 ∗ 2 − 1 = −3. The objective function value (b0 ) is:
0 ∗ 30 + 2 ∗ 10 + 0 ∗ 10 = 20. The next iterations are given by the
following simplex tableaus:
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
29 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm - an Example
The Next Simplex Tableaus
cB BV
0 s~1
2 x1
1 x2
Z
cB BV
1 x3
2 x~1
1 x2
Z
x~3
s1
s2
s3 x1 x2
1
−1 −2 0 0
1
10 10/1 = 10
0
0.5 0.5 1 0 0.5 15 15/0.5 = 30
0 −0.5 0.5 0 1 −1.5 5
−
0 −0.5 0.5 0 0 −1.5 35
s1
s~2
s3
x1 x2 x3
1
−1 −2
0 0 1
−0.5 1
1.5 1 0 0
1.5 −2 −2.5 0 1 0
1.5 −1 −1.5 0 0 0
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
10
−
10 10/1 = 10
20
−
50
BIS
30 / 37
Solving Linear Programming Problems - The Simplex Method
The Simplex Algorithm - an Example
The Final(Optimal) Simplex Tableau
cB BV
1 x3
0 s2
1 x2
Z
s1
s~2
s3
x1 x2 x3 Solution
0.5 0 −0.5 1 0 1
20
−0.5 1 1.5 1 0 0
10
0.5 0 0.5 2 1 0
40
1
0
0
1 0 0
60
The last simplex tableau contains the optimal solution: x3 = 20,
s2 = 10, x2 = 40, x1 = 0, s1 = 0, s2 = 0 with optimal value of objective
function Z = 60. This tableau is called optimal tableau.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
31 / 37
Solving Linear Programming Problems - The Simplex Method
Multiple Optimal Solutions
Example
100
x2
max Z = 2x1 + 2x2
2x1 + x2 ≤ 100
x1 + x2 ≤ 80
x1 ≤ 40
x1 ≥ 0
x2 ≥ 0
(0,80)
80
z=160
(20,60)
60
40
20
z=40
10
Michał Kulej (Wrocł Univ. of Techn.)
z=0
20
30
40
50
60
OPERATIONS RESEARCH
70
80
x1
BIS
32 / 37
Solving Linear Programming Problems - The Simplex Method
Multiple Optimal Solutions
Recognizing the Multiple (or Alternative)Optima in the
Optimal Simplex Tableau of the Problem
cB BV
0 s~1
2 x2
0 s3
Z
s1 s2 s3
1 −1 0
0 1
0
0 0
1
0 2
0
x~1
1
1
1
0
x2
0 20 20/1 = 20
1 80 80/1 = 80
0 40 40/1 = 40
0 160
The optimal basic solution is
X opt = (x1 , x2 , s1 , s2 , s3 ) = (0, 80, 20, 0, 40) with Z = 169. This optimal
FBS coincides with extreme (corner point) point X 1 = (0, 80) on the
picture.
If there is a nonbasic variable which has its optimality coefficient equals
zero in the optimal simplex tableau then the alternative optima exist.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
33 / 37
Solving Linear Programming Problems - The Simplex Method
Multiple Optimal Solutions
Alternative Optimal Basic Solution
Nonbasic variable x1 has a zero coefficient in Z -row of optimal simplex
tableau. Taking the variable x1 as the entering variable and making the
simplex iteration (with leaving variable s1 ) we obtain the following
optimal simplex tableau:
cB BV
2 x1
2 x2
0 s3
Z
s1 s2 s3 x1 x2 Solution
1 −1 0 1 0
20
−1 2 0 0 1
60
−1 1 1 0 0
20
0
2 0 0 0
160
This iteration gives us the new optimal fesible basic solution x1 = 20,
x2 = 60, s3 = 20, s1 = s2 = 0and Z = 160 which coincides with point
X 2 = (20, 60). The simplex method determines only two optimal basic
solution (corner points).
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
34 / 37
Solving Linear Programming Problems - The Simplex Method
Multiple Optimal Solutions
All Optimal Solutions
Each optimal solution X = (x1 , x2 ) can be determine as linear combination of points X 1 and X 2 :
X
= t ∗ X 1 + (1 − t) ∗ X 2 ,
x1 = 0t + 20(1 − t),
x2 = 80t + 60(1 − t), where t ∈ [0, 1].
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
35 / 37
Solving Linear Programming Problems - The Simplex Method
Using the Simplex Algorithm to Solve Minimization Problem
Minimization Problem
Simple modifications are needed to solve minimization problem: If all
nonbasic variables in Z - row in simplex tableau have nonpositive coefficients, then current FBS is optimal. If any nonbasic variable in Z row has positive coefficient, choose the variable with the most positive
coefficient in Z - row of simplex tableau as entering variable. (Another
way is to multiply the objective function equation by (-1) and solve maximization problem.)
We illustrate the method by solving the following linear problem:
min Z = −3x1 + x2
3x1 + x2 ≤ 6
−x1 + 2x2 ≤ 1
x1 , x2 ≥ 0
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
36 / 37
Solving Linear Programming Problems - The Simplex Method
Using the Simplex Algorithm to Solve Minimization Problem
The First and Second(Optimal) Simplex Tableaus
min Z = −3x1 + x2
s1
+3x1 + x2 = 6
s2 −x1 + 2x2 = 1
x1 , x2 ≥ 0
cB BV
0 s~1
0 s2
Z
3 x1
0 s2
Z
s1 s2 x~1 x2
1
0 3
1
6 6/3 = 2
0
1 −1 2
1 −
0
0 3 −1 0
1/3 0 1 1/3 2
1/3 1 0 7/3 3
−1 0 0 −2 −6
The last simplex tableau is optimal: all coefficients of Z row are
nonpositive. The optimal solution is: x1 = 2, x2 = 0, s1 = 0, s2 = 3.
The minimal objective function value is Z = −6.
Michał Kulej (Wrocł Univ. of Techn.)
OPERATIONS RESEARCH
BIS
37 / 37