0% found this document useful (0 votes)
3 views73 pages

ch04

The document discusses the simplex method for solving linear programming problems, introduced by George Dantzig in 1947, emphasizing its algebraic and geometric concepts. It details the iterative process of finding optimal solutions through adjacent corner-point feasible (CPF) solutions and includes examples of setting up the simplex method, defining key terminologies, and performing optimality tests. The document also explains the algebra involved in the simplex method, including the initialization of basic feasible solutions and the use of slack variables.

Uploaded by

charlie.lai0811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views73 pages

ch04

The document discusses the simplex method for solving linear programming problems, introduced by George Dantzig in 1947, emphasizing its algebraic and geometric concepts. It details the iterative process of finding optimal solutions through adjacent corner-point feasible (CPF) solutions and includes examples of setting up the simplex method, defining key terminologies, and performing optimality tests. The document also explains the algebra involved in the simplex method, including the initialization of basic feasible solutions and the use of slack variables.

Uploaded by

charlie.lai0811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Chi-Kong Ng, SEEM2420, Dept.

of SEEM, CUHK 4:1

Chapter 4.

Solving Linear Programming Problems by


the Simplex Method
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:2

4.1. Introduction
• The simplex method is an efficient algorithm developed by George
Dantzig in 1947.
• It is widely programmed in powerful OR software for solving
quantitative decision making problem in business.
• The simplex method is an algebraic procedure while its underlying
concepts are geometric.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:3

4.2. The Geometric Interpretation of the


Simplex Method
• For any LP problem with n decision variables, two CPF solutions
are adjacent to each other if they share (n − 1) constraint
boundaries. The two adjacent CPF solutions are connected by
a line segment (called an edge of the feasible region) that lies on
these same shared constraint boundaries.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:4

• Relationship Between Optimal Solutions and CPF Solutions:


Consider any LP problem with feasible solutions and a bounded
feasible region. The problem must possess CPF solutions and at
least one optimal solution. Furthermore, the best CPF solution
must be an optimal solution. Thus, if a problem has exactly one
optimal solution, it must be a CPF solution. If the problem has
multiple optimal solutions, at least two must be CPF solutions.
• Optimality Test:
Consider any LP problem that possesses at least one optimal
solution. If a CPF solution has no adjacent CPF solutions that are
better (as measured by Z), then it must be an optimal solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:5

4.2.1. Solving the Prototype Example


x2

3x1+2x2=18
x1=4

(2,6)
Max Z = 3x1 + 5x2 (0,6) 2x2=12
Z=30 1 2 Z=36
s.t. x1 ≤ 4 (1)
2x2 ≤ 12 (2)
3x1 + 2x2 ≤ 18 (3) (4,3)
Feasible
x1 ≥ 0, x2 ≥ 0 Region
Z=27

0
(0,0) (4,0) x1
Z=0 Z=12
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:6

Initialization (Iteration 0):


Choose (0, 0) as the initial CPF solution to examine.

Optimality Test:
Adjacent CPF solutions are better
=⇒ (0, 0) is NOT an optimal solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:7

Iteration 1:
• Considering the two edges of the feasible region that emanate from
(0, 0), choose to move along the edge that leads up the x2 axis.
(With an objective function of Z = 3x1 + 5x2, moving up the x2
axis increases Z at a faster rate than moving along the x1 axis.)
• Stop at the first new constraint boundary: 2x2 = 12.
• Solve for the intersection of the new set of constraint boundaries:
(0, 6).

Optimality Test:
An adjacent CPF solution is better
=⇒ (0, 6) is NOT an optimal solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:8

Iteration 2:
• Considering the two edges of the feasible region that emanate from
(0, 6), choose to move along the edge that increases Z.
• Stop at the first new constraint boundary encountered when moving
in that direction: 3x1 + 2x2 = 18.
• Solve for the intersection of the new set of constraint boundaries:
(2, 6).

Optimality Test:
None of the adjacent CPF solutions are better
=⇒ (2, 6) is an optimal solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:9

4.2.2. The Key Solution Concepts


• The simplex method focuses only on CPF solutions.
• It is an iterative algorithm with the following structure:
Start
Set up to start iteration,
including finding an initial CPF
Initialization solution.

Yes Perform the optimality test to


Optimal? determine whether the current
CPF solution optimal or not.
No
Perform an iteration to find a
Iteration
better CPF solution

End
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:10

• Use the origin as the initial CPF solution if possible.


• Given a CPF solution, it is computationally quicker to gather
information about its adjacent CPF solution than about other CPF
solutions.
• After the current CPF solution is identified, the simplex method
examines each of the edges of the feasible region that emanates
from this CPF solution.
• A positive rate of improvement in Z implies that the adjacent
CPF solution is better than the current CPF solution. Thus, the
optimality test consists simply of checking whether some edges give
a positive rate of improvement in Z. If none do, the current CPF
solution is optimal.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:11

4.3. Setting Up the Simplex Method


4.3.1. Terminologies
Slack Variable:
• A slack variable is the unused or slack amount of certain resource.
• A (≤) functional inequality i can be converted to an equivalent
equality constraint by introducing a slack variable si, where si ≥ 0.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:12

• Prototype Example:
Let si be the slack variable for the constraint i (i = 1, 2, 3).

x1 + s1 = 4
x1 ≤ 4 ⇐⇒
s1 ≥ 0

2x2 + s2 = 12
2x2 ≤ 12 ⇐⇒
s2 ≥ 0

3x1 + 2x2 + s3 = 18
3x1 + 2x2 ≤ 18 ⇐⇒
s3 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:13

Augmented Form of the Model:


Max Z = 3x1 + 5x2
s.t. x1 + s1 = 4 (1)
2x2 + s2 = 12 (2)
3x1 + 2x2 + s3 = 18 (3)
xj ≥ 0 (j = 1, 2), si ≥ 0 (i = 1, 2, 3)

Augmented Solution:
• An augmented solution is a solution for the original variables (the
decision variables) that has been augmented by the corresponding
values of the slack variables.
• (x1, x2) = (3, 2) is a solution of the original model;
(x1, x2, s1, s2, s3) = (3, 2, 1, 8, 5) is the corresponding augmented
solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:14

Basic Solution:
• A basic solution is an augmented corner-point solution.
• (x1, x2) = (4, 6) is a corner-point infeasible solution of the original
model;
(x1, x2, s1, s2, s3) = (4, 6, 0, 0, −6) is the corresponding augmented
solution (a basic solution).

Basic Feasible (BF) Solution:


• A basic feasible solution is an augmented CPF solution.
• (x1, x2) = (0, 6) is a CPF solution of the original model;
(x1, x2, s1, s2, s3) = (0, 6, 4, 0, 6) is the corresponding augmented
solution (a basic feasible solution).
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:15

4.3.2. Properties of a Basic Solution


• Degree of freedom in solving the system
= number of variables − number of equations
• Each variable of a basic solution is designated as either a basic
variable or a non-basic variable.
• Number of basic variable
= number of functional constraints (now equations).
• Number of non-basic variable
= number of variables (including decision variables and slack
variables) − number of equations
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:16

• The non-basic variables are set equal to zero.

• The values of the basic variables are obtained as the simultaneous


solution of the system of equations.

• The set of basic variables is called the basis.


• If the basic variables satisfy the non-negativity constraints, the
basic solution is a BF solution.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:17

4.3.3. Canonical Form of the Model


The augmented form of the LP problem can be rewritten as follows:
Max Z
s.t. Z − 3x1 − 5x2 = 0 (0)
x1 + s1 = 4 (1)
2x2 + s2 = 12 (2)
3x1 + 2x2 + s3 = 18 (3)
xj ≥ 0 (j = 1, 2), si ≥ 0 (i = 1, 2, 3)
For the sake of simplicity, it is rewritten as the following canonical form:
Z − 3x1 − 5x2 = 0 (0)
x1 + s1 = 4 (1)
2x2 + s2 = 12 (2)
3x1 + 2x2 + s3 = 18 (3)
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:18

4.4. The Algebra of the Simplex Method


Initialization (Iteration 0)
• Set x1 and x2 be the non-basic variables (the variables set equal to
zero) and the other variables are set to be the basic variables.
• Then, from the following equations (1) to (3) (the augmented form
of the functional constraints):
x1 + s1 = 4 (1)
2x2 + s2 = 12 (2)
3x1 + 2x2 + s3 = 18 (3)
we obtain the values of the basic variables (s1, s2, s3) = (4, 12, 18)
and hence we have the initial BF solution (x1, x2, s1, s2, s3) =
(0, 0, 4, 12, 18).
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:19

Optimality Test
• At the initial BF solution, Z = 3x1 + 5x2 = 0.
• Obviously, increasing the values of x1 or x2 can bring an improve-
ment to Z. So, the current BF solution is NOT optimal.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:20

Iteration 1
1. Determining Where to Go
• Choose the non-basic variable with the largest rate of improvement
in Z.
• Increasing this non-basic variable from zero will convert it to a basic
variable for the next BF solution. It is called the entering (basic)
variable for iteration 1.
• Prototype Example:
Objective function: Z = 3x1 + 5x2
Rate of improvement in Z by increasing x1 = 3
Rate of improvement in Z by increasing x2 = 5
Thus, we should choose x2.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:21

2. Determining Where to Stop


• Increasing x2 increases Z, so we want to go as far as possible without
leaving the feasible region.
• Minimum Ratio Test:
To identify the maximum possible improvement we can make with
which we still inside the feasible region.
Non-basic variable: x1 = 0
(1): Independent of x2 (Ignore)
(2): s2 = 12 − 2x2 ≥ 0 =⇒ x2 ≤ 12/2 = 6
(3): s3 = 18 − 2x2 ≥ 0 =⇒ x2 ≤ 18/2 = 9
These implies, x2 ≤ 6. Therefore, we set x2 = 6.
When x2 = 6, eq.(2) gives s2 = 0 and leaves the basis.
(s2 is called the leaving (basic) variable for iteration 1.)
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:22

3. Solving for the New BF Solution


• The purpose of step 3 is to convert the system of equations to the
canonical form. The solution can then be read easily.
• By elementary row operations, we solve the system of equations for
Z, x2, s1, s3:
New eq.(2) = eq.(2) / 2
x2 + (1/2)s2 = 6
New eq.(0) = eq.(0) + 5 × new eq.(2)
Z − 3x1 + (5/2)s2 = 30
New eq.(1) = eq.(1)
x1 + s1 = 4
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:23

New eq.(3) = eq.(3) − 2 × new eq.(2)


3x1 − s2 + s3 = 6
The resulting canonical form of the model is:
Z − 3x1 + (5/2)s2 = 30 (0)
x1 + s1 = 4 (1)
x2 + (1/2)s2 = 6 (2)
3x1 − s2 + s3 = 6 (3)

• Since x1 and s2 are non-basic variables, thus x1 = 0 and s2 = 0


and hence the new BF solution, (x1, x2, s1, s2, s3) = (0, 6, 4, 0, 6),
which yields Z = 30.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:24

Optimality Test
• The current eq.(0) gives the current objective function:
Z = 30 + 3x1 − (5/2)s2

• Since x1 has a positive coefficient, increasing x1 would lead to an


adjacent BF solution that is better than the current BF solution,
so the current BF solution is NOT optimal.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:25

Iteration 2
1. Determining Where to Go
Now, Z = 30 + 3x1 − (5/2)s2, Z can be increased by increasing x1,
but not s2. Therefore, we choose x1 as the entering variable.

2. Determining Where to Stop (Minimum Ratio Test)


Non-basic Variable: s2 = 0
(1): s1 = 4 − x1 ≥ 0 =⇒ x1 ≤ 4
(2): Independent of x1 (Ignore)
(3): s3 = 6 − 3x1 ≥ 0 =⇒ x1 ≤ 6/3 = 2
By the minimum ratio test, we conclude that we should choose s3 as
the leaving variable and should set x1 = 2.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:26

3. Solving for the New BF Solution


New eq.(3) = eq.(3) / 3
x1 − (1/3)s2 + (1/3)s3 = 2
New eq.(0) = eq.(0) + 3 × new eq.(3)
Z + (3/2)s2 + s3 = 36
New eq.(1) = eq.(1) − new eq.(3)
s1 + (1/3)s2 − (1/3)s3 = 2
New eq.(2) = eq.(2)
x2 + (1/2)s2 = 6
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:27

The resulting canonical form of the model is:


Z + (3/2)s2 + s3 = 36 (0)
s1 + (1/3)s2 − (1/3)s3 = 2 (1)
x2 + (1/2)s2 = 6 (2)
x1 − (1/3)s2 + (1/3)s3 = 2 (3)
The new BF solution is (x1, x2, s1, s2, s3) = (2, 6, 2, 0, 0) and the
corresponding Z = 36.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:28

Optimality Test
• Since increasing the non-basic variables (s2 and s3) would not
increase Z, the current BF solution is optimal.
• The optimal BF solution is (x∗1 , x∗2 , s∗1 , s∗2 , s∗3 ) = (2, 6, 2, 0, 0), which
implies the optimal solution to the original problem is (x∗1, x∗2 ) =
(2, 6) and the corresponding optimal value Z ∗ = 36.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:29

4.5. The Simplex Method in Tabular Form


• The tabular form of the simplex method (simplex tableau) records
only the essential information:
◦ the coefficients of the variables
◦ the constants on the right-hand sides of the equations
◦ the basic variable appearing in each equation.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:30

Initialization (Iteration 0)
BV Z x1 x2 s1 s2 s3 RHS
Z 1 −3 −5 0 0 0 0
s1 0 1 0 1 0 0 4
s2 0 0 2 0 1 0 12
s3 0 3 2 0 0 1 18

Optimality Test
• The current BF solution is optimal if and only if every coefficient
in row 0 is non-negative.
• Now, the coefficients of both x1 and x2 in row 0 are negative,
therefore the current BF solution is NOT optimal.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:31

Iteration 1
1. Determining the Entering Variable (Determining Where to Go)
• Select the non-basic variable with the “most negative” coefficient.
• The column below this coefficient is called the pivot column.

BV Z x1 x2 s1 s2 s3 RHS
Z 1 −3 −5 0 0 0 0
s1 0 1 0 1 0 0 4
s2 0 0 2 0 1 0 12
s3 0 3 2 0 0 1 18
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:32

2. Determining the Leaving Variable by the Minimum Ratio Test


(Determining Where to Stop)
• Pick up the strictly positive coefficient in the pivot column and
then calculate “RHS / value of pivot column’s element”.
• Choose the variable with the minimum value of the ratio as the
leaving variable. The row is called the pivot row .

BV Z x1 x2 s1 s2 s3 RHS Ratio
Z 1 −3 −5 0 0 0 0
s1 0 1 0 1 0 0 4
s2 0 0 2 0 1 0 12 12/2 = 6 ←
s3 0 3 2 0 0 1 18 18/2 = 9
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:33

3. Solving for the New BF Solution


• Create a coefficient 1 for the entering variable in the pivot row by
dividing the row by the pivot element.
• Create a coefficient 0 for the entering variable in all rows except
the pivot row by adding a suitable multiple of the pivot row.
BV Z x1 x2 s1 s2 s3 RHS
Z 1 −3 0 0 5/2 0 30
s1 0 1 0 1 0 0 4
x2 0 0 1 0 1/2 0 6
s3 0 3 0 0 −1 1 6

Optimality Test
The coefficient of x1 in row 0 is negative, therefore the current BF
solution is NOT optimal.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:34

Iteration 2
BV Z x1 x2 s1 s2 s3 RHS Ratio
Z 1 −3 0 0 5/2 0 30
s1 0 1 0 1 0 0 4 4/1 = 4
x2 0 0 1 0 1/2 0 6
s3 0 3 0 0 −1 1 6 6/3 = 2

BV Z x1 x2 s1 s2 s3 RHS
Z 1 0 0 0 3/2 1 36
s1 0 0 0 1 1/3 −1/3 2
x2 0 0 1 0 1/2 0 6
x1 0 1 0 0 −1/3 1/3 2
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:35

Optimality Test
• Since none of the coefficients in row 0 are negative, the current BF
solution is optimal.
• The optimal BF solution is (x∗1 , x∗2 , s∗1 , s∗2 , s∗3 ) = (2, 6, 2, 0, 0), which
implies the optimal solution to the original problem is (x∗1, x∗2 ) =
(2, 6) and the corresponding Z ∗ = 36.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:36

Exercise 4.1. Solve the following LP problem by the simplex method in


tabular form:
Max Z = 60x1 + 30x2 + 20x3
s.t. 8x1 + 6x2 + x3 ≤ 48 (1)
8x1 + 4x2 + 3x3 ≤ 40 (2)
4x1 + 3x2 + x3 ≤ 16 (3)
x2 ≤ 5 (4)
xj ≥ 0 (j = 1, 2, 3)
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:37

4.6. Tie Breaking in the Simplex Method


• You may have noticed that we did not say what to do if the
various choice rules of the simplex method do not lead to a clear-cut
decision, because of either ties or other similar ambiguities.
• We discuss these details now.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:38

4.6.1. Tie for the Entering (Basic) Variable


General Rule:
Entering variable = the (non-basic) variable that have the most
negative coefficient in row 0.

Question:
How to choose an entering variable when two or more non-basic
variables are tied for having the most negative coefficient in row 0?

Answer:
Choose arbitrarily.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:39

4.6.2. Tie for the Leaving (Basic) Variable —


Degeneracy
General Rule:
Leaving variable = the basic variable in the row that wins the
minimum ratio test.

Question:
How to choose a leaving variable when two or more rows have the
same minimum ratio?

Answer:
Choose arbitrarily and change the choice of the variable in the case
of having loop.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:40

How to spot a degenerate LP problem?


An LP problem is degenerate if it has at least one BF solution in
which a basic variable is equal to zero. In other words, an LP problem
is degenerate if it has at least one constraint with a zero RHS.

What will occur when a degenerate LP problem is solved by the simplex


method?
It is possible for a sequence of pivots like the following to occur:
Initial: BF solution 1 with Z = 10
After first pivot: BF solution 2 with Z = 10
After second pivot: BF solution 3 with Z = 10
After third pivot: BF solution 1 with Z = 10
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:41

Example 4.2.
Max Z = 0.75x1 − 20x2 + 0.5x3 − 6x4
s.t. 0.25x1 − 8x2 − x3 + 9x4 ≤ 0 (1)
0.50x1 − 12x2 − 0.5x3 + 3x4 ≤ 0 (2)
x3 ≤ 1 (3)
xj ≥ 0 (j = 1, 2, 3, 4)
Let si be the slack variable for the constraint i (i = 1, 2, 3).
The augmented form of the problem:
Max Z = 0.75x1 − 20x2 + 0.5x3 − 6x4
s.t. 0.25x1 − 8x2 − x3 + 9x4 + s1 = 0 (1)
0.50x1 − 12x2 − 0.5x3 + 3x4 + s2 = 0 (2)
x3 + s3 = 1 (3)
xj ≥ 0 (j = 1, 2, 3, 4), si ≥ 0 (i = 1, 2, 3)
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:42

ITERATION 0
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z -0.750 20.000 -0.500 6.000 0.000 0.000 0.000 0.000
1 s1 0.250 -8.000 -1.000 9.000 1.000 0.000 0.000 0.000 0
2 s2 0.500 -12.000 -0.500 3.000 0.000 1.000 0.000 0.000 0
3 s3 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000 ---

ITERATION 1
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z 0.000 -4.000 -3.500 33.000 3.000 0.000 0.000 0.000
1 x1 1.000 -32.000 -4.000 36.000 4.000 0.000 0.000 0.000
2 s2 0.000 4.000 1.500 -15.000 -2.000 1.000 0.000 0.000
3 s3 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000

ITERATION 2
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z 0.000 0.000 -2.000 18.000 1.000 1.000 0.000 0.000
1 x1 1.000 0.000 8.000 -84.000 -12.000 8.000 0.000 0.000 0
2 x2 0.000 1.000 0.375 -3.750 -0.500 0.250 0.000 0.000 0
3 s3 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000 1

ITERATION 3
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z 0.250 0.000 0.000 -3.000 -2.000 3.000 0.000 0.000
1 x3 0.125 0.000 1.000 -10.500 -1.500 1.000 0.000 0.000 ---
2 x2 -0.047 1.000 0.000 0.188 0.062 -0.125 0.000 0.000 0
3 s3 -0.125 0.000 0.000 10.500 1.500 -1.000 1.000 1.000 0.095
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:43

ITERATION 4
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z -0.500 16.000 0.000 0.000 -1.000 1.000 0.000 0.000
1 x3 -2.500 56.000 1.000 0.000 2.000 -6.000 0.000 0.000 0
2 x4 -0.250 5.333 0.000 1.000 0.333 -0.667 0.000 0.000 0
3 s3 2.500 -56.000 0.000 0.000 -2.000 6.000 1.000 1.000 ---

ITERATION 5
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z -1.750 44.000 0.500 0.000 0.000 -2.000 0.000 0.000
1 s1 -1.250 28.000 0.500 0.000 1.000 -3.000 0.000 0.000
2 x4 0.167 -4.000 -0.167 1.000 0.000 0.333 0.000 0.000
3 s3 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000

ITERATION 6
ROW BV x1 x2 x3 x4 s1 s2 s3 RHS RATIO
0 Z -0.750 20.000 -0.500 6.000 0.000 0.000 0.000 0.000
1 s1 0.250 -8.000 -1.000 9.000 1.000 0.000 0.000 0.000
2 s2 0.500 -12.000 -0.500 3.000 0.000 1.000 0.000 0.000
3 s3 0.000 0.000 1.000 0.000 0.000 0.000 1.000 1.000

The simplex tableau of Iteration 0 is identical to Iteration 6. Cycling!


Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:44

4.6.3. No Leaving Basic Variable — Unbounded Z


How to spot an unbounded LP problem?
When a variable with a negative coefficient in row 0 has a non-positive
coefficient in each constraint, the LP problem is unbounded in Z.

What will occur if an LP problem is unbounded in Z?


The objective function can be increased indefinitely.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:45

Exercise 4.3. Solve the following LP problem by the graphical method


and by the simplex method in tabular form:
Max Z = 2x2
s.t. x1 − x2 ≤ 1 (1)
−x1 + x2 ≤ 4 (2)
x1 ≥ 0, x2 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:46

4.6.4. Multiple Optimal Solutions


How to spot an LP problem has multiple optimal solutions?
If there is a non-basic variable with a zero coefficient in row 0 of the
optimal tableau, the LP problem has multiple optimal solutions.

What will occur when an LP problem has multiple optimal solutions?


If x∗1, . . . , x∗p are p (≥ 2) optimal extreme points of the LP problem,
then p
X
x∗ = ki x∗i,
i=1
p
X
where ki = 1 and ki ≥ 0 (i = 1, . . . , p), are optimal solutions to
i=1
the LP problem.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:47

Exercise 4.4. Solve the following LP problem by the graphical method


and by the simplex method in tabular form:
Max Z = −3x1 + 6x2
s.t. −x1 + 2x2 ≤ 2 (1)
3x1 + 4x2 ≤ 24 (2)
x1 ≥ 0, x2 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:48

Exercise 4.5. Solve the following LP problem by the graphical method


and by the simplex method in tabular form:
Max Z = −3x1 + 6x2
s.t. −x1 + 2x2 ≤ 2 (1)
x1 ≥ 0, x2 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:49

4.7. Adapting to Other Model Forms


4.7.1. Minimization Problems
Note that
n
X n
X
Min Z = cj xj ⇐⇒ Max Z̄ = −Z = (−cj )xj
j=1 j=1
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:50

Example 4.6. Consider the following problem:


Min Z = 2x1 − 3x2
s.t. x1 + x2 ≤ 4 (1)
x1 − x2 ≤ 6 (2)
x1 ≥ 0, x2 ≥ 0
Let Z̄ = −Z. Then, we have
Max Z̄ = −2x1 + 3x2
s.t. x1 + x2 ≤ 4 (1)
x1 − x2 ≤ 6 (2)
x1 ≥ 0, x2 ≥ 0
Now, we can solve it by the simplex method.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:51

4.7.2. Non-positive Decision Variables


Note that

x̄j = −xj
xj ≤ 0 ⇐⇒
x̄j ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:52

Example 4.7. Consider the following problem:


Max Z = −2x1 − 3x2
s.t. x1 − x2 ≤ 4 (1)
x1 + x2 ≤ 6 (2)
x1 ≥ 0, x2 ≤ 0
Let x̄2 = −x2 ≥ 0. Then, we have
Max Z = −2x1 + 3x̄2
s.t. x1 + x̄2 ≤ 4 (1)
x1 − x̄2 ≤ 6 (2)
x1 ≥ 0, x̄2 ≥ 0
Now, we can solve it by the simplex method.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:53

4.7.3. Variables that are Unrestricted in Sign


Note that
xj = x′j − x′′j

xj (unrestricted) ⇐⇒
x′j ≥ 0, x′′j ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:54

Example 4.8. Consider the following problem:


Max Z = −2x1 + 3x2
s.t. x1 + x2 ≤ 4 (1)
−x1 + x2 ≤ 6 (2)
x2 ≥ 0
Let x1 = x′1 − x′′1 , where x′1 ≥ 0 and x′′1 ≥ 0. Then, we have
Max Z = −2x′1 + 2x′′1 + 3x2
s.t. x′1 − x′′1 + x2 ≤ 4 (1)
−x′1 + x′′1 + x2 ≤ 6 (2)
x′1 ≥ 0, x′′1 ≥ 0, x2 ≥ 0
Now, we can solve it by the simplex method.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:55

4.7.4. Negative Right-Hand Sides


Case 1
x1 − 2x2 ≥ −3 ⇐⇒ −x1 + 2x2 ≤ 3 (standard form)

Case 2
x1 − 2x2 ≤ −3 ⇐⇒ −x1 + 2x2 ≥ 3 (nonstandard form)
See Section 4.8.

Case 3
x1 − 2x2 = −3 ⇐⇒ −x1 + 2x2 = 3 (nonstandard form)
See Section 4.8.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:56

4.7.5. Functional Constraints in = or ≥ Forms


For a problem with (=) and/or (≥) functional constraints, adding
slack variables to the problem are insufficient because we cannot identify
an initial basic feasible solution easily.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:57

Example 4.9. Consider the following LP problem:


Max Z = −0.4x1 − 0.5x2
s.t. 0.3x1 + 0.1x2 ≤ 2.7 (1)
0.5x1 + 0.5x2 = 6.0 (2)
0.6x1 + 0.4x2 ≥ 6.0 (3)
x1 ≥ 0, x2 ≥ 0
Let s1 (≥ 0) be the slack variable for constraint 1.
An augmented form of the problem:
Max Z = −0.4x1 − 0.5x2
s.t. 0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 = 6.0 (2)
0.6x1 + 0.4x2 ≥ 6.0 (3)
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:58

This augmented form has THREE problems:


1. Constraint 3 is NOT an equation.
2. We cannot identify an initial basic (feasible) variable from con-
straint 2.
3. We cannot identify an initial basic (feasible) variable from con-
straint 3.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:59

Excess Variable / Surplus Variable


• An excess variable (or called a surplus variable) is the excess
(surplus) amount of certain resource.
• A (≥) functional inequality i can be converted to an equivalent
equality constraint by subtracting an excess variable ei from the
ith constraint and adding the sign restriction ei ≥ 0.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:60

Example 4.9 (Continued).


Let e3 be the excess variable for the constraint 3.

0.6x1 + 0.4x2 − e3 = 6
0.6x1 + 0.4x2 ≥ 6 ⇐⇒
e3 ≥ 0.
An augmented form of the problem:
Max Z = −0.4x1 − 0.5x2
s.t. 0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0
However, we still cannot identify basic variables from constraints 2
and 3.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:61

Artificial Variable and Artificial Variable Technique


Artificial Variable:
An artificial variable is a variable created by us and are not real
variable.
Example 4.9 (Continued).
Let ai be the artificial variable for the constraint i (i = 2, 3).

0.5x1 + 0.5x2 + a2 = 6
0.5x1 + 0.5x2 = 6 ⇐⇒
a2 = 0

0.6x1 + 0.4x2 − e3 + a3 = 6
0.6x1 + 0.4x2 − e3 = 6 ⇐⇒
a3 = 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:62

Artificial-variable technique:
1. Introduce a non-negative artificial variable to the constraint that
needs an initial basic variable.
2. Reduce the values of the artificial variables by some techniques (see
Section 4.8) at each iteration until all of them become zero.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:63

Example 4.9 (Continued).


An augmented form of the problem:
Max Z = −0.4x1 − 0.5x2
s.t. 0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 + a2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 + a3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0, a2 ≥ 0, a3 ≥ 0
Now, we have an initial basic feasible solution:
(x1, x2, e3, s1 , a2, a3) = (0, 0, 0, 2.7, 6, 6).
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:64

4.8. Big-M (Simplex) Method


Idea:
By penalizing the artificial variables in the objective function to force
the artificial variables to become zeros.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:65

Algorithm:
1. Let M → ∞ (a huge positive number).
2. Penalize the problem by subtracting the terms M ai (for all i) from
the objective function.
3. Convert the penalized problem to the canonical form by elementary
row operations.
4. Solve the penalized problem by the simplex method.
5. If ai = 0 (for all i) in the optimal simplex tableau, then the final
basic feasible solution is optimal, otherwise, the original LP problem
is infeasible.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:66

Example 4.9 (Continued).


Max Z = −0.4x1 − 0.5x2
s.t. 0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 + a2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 + a3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0, a2 ≥ 0, a3 ≥ 0
Let M → ∞.
Consider the following big-M problem:
Max Z = −0.4x1 − 0.5x2 − M a2 − M a3
s.t. 0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 + a2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 + a3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0, a2 ≥ 0, a3 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:67

The big-M problem can be rewritten as follows:


Max Z
s.t. Z + 0.4x1 + 0.5x2 + M a2 + M a3 = 0.0 (0)
0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 + a2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 + a3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0, a2 ≥ 0, a3 ≥ 0
Since eq.(0) − M × eq.(2) − M × eq.(3) gives:
Z+ 0.4x1 + 0.5x2 + Ma2 + Ma3 = 0
−M) 0.5x1 + 0.5x2 + a2 = 6
−M) 0.6x1 + 0.4x2 − e3 + a3 = 6
Z + (−1.1M + 0.4)x1 + (−0.9M + 0.5)x2 + Me3 = −12M
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:68

Thus, the big-M problem can be rewritten as follows:


Max Z
s.t. Z + (−1.1M + 0.4)x1 + (−0.9M + 0.5)x2 + Me3 = −12M (0)
0.3x1 + 0.1x2 + s1 = 2.7 (1)
0.5x1 + 0.5x2 + a2 = 6.0 (2)
0.6x1 + 0.4x2 − e3 + a3 = 6.0 (3)
x1 ≥ 0, x2 ≥ 0, e3 ≥ 0, s1 ≥ 0, a2 ≥ 0, a3 ≥ 0

Then, the big-M problem can be rewritten as the simplex tableau (in
canonical form):
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:69

Iteration 0
BV Z x1 x2 e3 s1 a2 a3 RHS Ratio
−1.1M −0.9M M −12M
Z 1 +0.4 +0.5 0 0 0
s1 0 0.3 0.1 0 1 0 0 2.7 2.7/0.3 = 9
a2 0 0.5 0.5 0 0 1 0 6.0 6/0.5 = 12
a3 0 0.6 0.4 −1 0 0 1 6.0 6/0.6 = 10

Iteration 1
BV Z x1 x2 e3 s1 a2 a3 RHS Ratio
−16M/30 M 11M/3 −21M/10
Z 1 0 +11/30 −4/3 0 0 −36/10
x1 0 1 1/3 0 10/3 0 0 9 27
a2 0 0 1/3 0 −5/3 1 0 3/2 4.5
a3 0 0 1/5 −1 −2 0 1 3/5 3
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:70

Iteration 2
BV Z x1 x2 e3 s1 a2 a3 RHS Ratio
−10M/6 −5M/3 16M/6 −5M/10
Z 1 0 0 +11/6 +7/3 0 −11/6 −47/10
x1 0 1 0 5/3 20/3 0 −5/3 8 4.8
a2 0 0 0 5/3 5/3 1 −5/3 1/2 0.3
x2 0 0 1 −5 −10 0 5 3

Iteration 3
BV Z x1 x2 e3 s1 a2 a3 RHS
M M
Z 1 0 0 0 1/2 −11/10 −21/4
x1 0 1 0 0 5 −1 0 15/2
e3 0 0 0 1 1 3/5 −1 3/10
x2 0 0 1 0 −5 3 0 9/2
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:71

Optimal Solution and Optimal Value


x∗ = (x∗1 , x∗2) = (15/2, 9/2) with Z ∗ = −21/4.
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:72

Exercise 4.10. Solve the following LP problem by the graphical method


and by the Big-M method:
Max Z = 2x1 + 3x2
s.t. (1/2)x1 + (1/4)x2 ≤ 4 (1)
x1 + 3x2 ≥ 20 (2)
x1 + x2 = 10 (3)
x1 ≥ 0, x2 ≥ 0
Chi-Kong Ng, SEEM2420, Dept. of SEEM, CUHK 4:73

Special Case: Infeasible / No Feasible Solutions


If any artificial variable is positive in the optimal Big-M tableau, the
original LP problem has no feasible solution.
Exercise 4.11. Solve the following LP problem by the graphical method
and by the Big-M method:
Max Z = 2x1 + 3x2
s.t. (1/2)x1 + (1/4)x2 ≤ 4 (1)
x1 + 3x2 ≥ 36 (2)
x1 + x2 = 10 (3)
x1 ≥ 0, x2 ≥ 0

You might also like