Download as pdf or txt
Download as pdf or txt
You are on page 1of 77

SEHS2331

Engineering Mathematics

Chapter 2
Linear Programming:
The Simplex Method

1
Linear Programming (LP)

• Standard Maximization LP Problems


– Simplex Method
• Standard Minimization LP Problems
– Primal and Dual Problems
– Fundamental Theorem of Duality
• Nonstandard LP Problems
– Big M Method

2
Linear Programming (LP) Problem

A standard maximization LP problem is one in which

1. The objective function is to be maximized.

2. All the variables involved in the problem are nonnegative.

3. All other linear constraints may be written so that the


expression involving the variables is less than or equal to a
nonnegative constant.

3
The Simplex Method
• The simplex method is an iterative procedure.

• Beginning at a vertex of the feasible region S, each iteration


brings us to another vertex of S with an improved value of the
objective function.

• The iteration ends when the optimal solution is reached.

4
The Simplex Method
1. Set up the initial simplex tableau.

2. Determine whether the optimal solution has been reached


by examining all entries in the last row.
a. If all the entries are nonnegative, the optimal solution has been
reached. Proceed to step 4.
b. If there are one or more negative entries, the optimal solution has
not been reached. Proceed to step 3.

3. Perform the pivot operation. Return to step 2.

4. Determine the optimal solution(s).

5
Example 1
• Ace Novelty wishes to produce two types of souvenirs: type‐A
will result in a profit of $1.00, and type‐B in a profit of $1.20.
• To manufacture a type‐A souvenir requires 2 minutes on
machine I and 1 minute on machine II.
• A type‐B souvenir requires 1 minute on machine I and 3
minutes on machine II.
• There are 3 hours available on machine I and 5 hours available
on machine II.
• How many souvenirs of each type should Ace make in order to
maximize its profit?

6
Example 1
Solution
• Let’s first tabulate the given information:
Type-A Type-B Time Available
Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

• Let x be the number of type‐A souvenirs and y the number of type‐B


souvenirs to be made.
• Maximize the objective function
6
z  x  1.2 y or equivalently, z  x  y
5
subject to constraints: 2 x  y  180
x  3 y  300
x, y  0

7
Example 1
Solution
Step 1. Set up the initial simplex tableau.
– First, introduce the slack variables s1 and s2 into the
inequalities and turn these into equations, getting

2 x  y  180 2 x  y  s1  180
x  3 y  300 x  3y  s2  300

• Next, rewrite the objective function in the form

6
zx y0
5

8
Example 1, page 206
Example 1
Solution
• Placing the restated objective function below the system of
equations of the constraints we get
2x  y  s1  180
x  3y  s2  300
6
-x  y  z  0
5
• Thus, the initial tableau associated with this system is
Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180
s2 1 3 0 1 300
z-row  z –1 – 6/5 0 0 0
9
Solution
Step 2. Determine whether the optimal solution has been reached.
– Since there are negative entries in the last row (z‐row) of
the tableau, the initial solution is not optimal.

Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180
s2 1 3 0 1 300
z-row  z –1 – 6/5 0 0 0

10
Example 2, page 208
Solution
Step 3.Perform the pivot operation.
– Since the entry ‐6/5 is the most negative entry in the last
row of the tableau, the second column in the tableau is
the pivot column.

Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180
s2 1 3 0 1 300
z –1 – 6/5 0 0 0
Pivot column

11
Example 2, page 208
Solution
Step 3.Perform the pivot operation.
– Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
– We see that the ratio 300/3 = 100 is less than the ratio
180/1 = 180, so row 2 is the pivot row (why choose minimum?).

Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180 180  180


1
Pivot row s2 1 3 0 1 300 300  100
3
z –1 – 6/5 0 0 0
Minimum ratio
Pivot column guarantees all
Variable y enters to become basic and constraints are
s2 leaves to become non-basic variable satisfied
12
Solution
Step 3.Perform the pivot operation.
– The entry 3 lying in the pivot column and the pivot row is
the pivot element. Convert the pivot element into a 1.
Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180
s2 1 3* 0 1 300
z –1 – 6/5 0 0 0

Basic x y s1 s2 Constant
variable

s1
1R
3 2 y 1/3 1 0 1/3 100
z

13
Solution
Step 3.Perform the pivot operation.
– Use elementary row operations to convert the pivot
column into a unit column.
Basic x y s1 s2 Constant
variable

s1 2 1 1 0 180
s2 1 3* 0 1 300
z –1 – 6/5 0 0 0
Basic x y s1 s2 Constant
variable

R1  R2 s1 5/3 0 1 -1/3 80
y 1/3 1 0 1/3 100
R3  56 R2 z –3/5 0 0 2/5 120
14
Solution
Step 3.Perform the pivot operation.
– The last row of the tableau contains a negative number,
so an optimal solution has not been reached. Therefore,
we repeat the iteration step.
– Since the entry – 3/5 is the most negative entry in the
last row of the tableau, the first column in the tableau is
now the pivot column.
Basic x y s1 s2 Constant
variable

s1 5/3 0 1 -1/3 80
y 1/3 1 0 1/3 100
z –3/5 0 0 2/5 120

Pivot column
15
Example 2, page 208
Solution
Step 3.Perform the pivot operation.
– Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
– We see that the ratio 80/(5/3) = 48 is less than the ratio
100/(1/3) = 300, so row 1 is the pivot row now.

Basic x y s1 s2 Constant
variable

Pivot row s1 5/3 0 1 -1/3 80 80


5/3  48
y 1/3 1 0 1/3 100 100
 300
1/3
z –3/5 0 0 2/5 120
Pivot column
Variable x enters to become basic and
s1 leaves to become non-basic variable 16
Solution
Step 3.Perform the pivot operation.
– The entry 5/3 lying in the pivot column and the pivot row
is the pivot element.
– Convert the pivot element into a 1.
Basic x y s1 s2 Constant
variable

s1 5/3* 0 1 -1/3 80
y 1/3 1 0 1/3 100
z –3/5 0 0 2/5 120
Basic x y s1 s2 Constant
variable
3 R1
5 x 1 0 3/5 -1/5 48
y
z
17
Solution
Step 3.Perform the pivot operation.
– Use elementary row operations to convert the pivot
column into a unit column.
Basic x y s1 s2 Constant
variable

s1 5/3* 0 1 -1/3 80
y 1/3 1 0 1/3 100
z –3/5 0 0 2/5 120

Basic x y s1 s2 Constant
variable

x 1 0 3/5 –1/5 48
R2  1 R1 y 0 1 –1/5 2/5 84
3
R3 3
 R1 z 0 0 9/25 7/25 148.8
5
18
Solution
Step 3.Perform the pivot operation.
– The last row of the tableau contains no negative
numbers, so an optimal solution has been reached.

Basic x y s1 s2 Constant
variable

x 1 0 3/5 –1/5 48
y 0 1 –1/5 2/5 84
z 0 0 9/25 7/25 148.8

19
Example 2, page 208
Solution
Step 4. Determine the optimal solution.
– The non‐basic variables (more than one non‐zero entries in the
column) s1 and s2 are free variables, we could simply set s1 = s2 = 0.
– the basic variables (only one non‐zero entry in the column) are x and y.
• The optimal value for x is 48.
• The optimal value for y is 84.
• The optimal value for z is 148.8.
– Thus, the firm will maximize profits at $148.80 by producing 48 type‐A
souvenirs and 84 type‐B souvenirs.

Basic x y s1 s2 Constant
variable

x 1 0 3/5 –1/5 48
y 0 1 –1/5 2/5 84
z 0 0 9/25 7/25 148.8

20
Example 2, page 208
Summary steps for example 1
Basic x y s1 s2 Constant Basic
variable s1 = 180; s2 = 300
s1 2 1 1 0 180
Non-basic
s2 1 3* 0 1 300 x = 0; y = 0;
z –1 – 6/5 0 0 0
Basic x y s1 s2 Constant Basic
variable
s1 = 80; y = 100
s1 5/3* 0 1 -1/3 80
Non-basic
y 1/3 1 0 1/3 100 x = 0; s2 = 0;
z –3/5 0 0 2/5 120
Basic x y s1 s2 Constant
variable Basic
x = 48; y = 84
x 1 0 3/5 –1/5 48
y 0 1 –1/5 2/5 84 Non-basic
s1 = 0; s2 = 0;
z 0 0 9/25 7/25 148.8 21
Simplex Method: Minimization LP Problems

• In the last section we developed the simplex method to solve


linear programming (LP) problems that satisfy three
conditions:
1. The objective function is to be maximized.
2. All the variables involved are nonnegative.
3. Each linear constraint may be written so that the expression
involving the variables is less than or equal to a nonnegative
constant.
• We will now see how the simplex method can be used to
solve minimization LP problems that meet the second and
third conditions listed above.
22
Example 2
• Solve the following linear programming problem:

minimize C  2 x  3 y
subject to 5 x  4 y  32
x  2 y  10
x, y  0

• This problem involves the minimization of the objective


function and so is not a standard maximization problem.
• Note, however, that all the other conditions for a standard
maximization hold true.

23
Example 1, page 226
Example 2
• We can use the simplex method to solve this problem by
converting the objective function from minimizing C to its
equivalent of maximizing z = – C.
• Thus, the restated linear programming problem is
maximize z  2 x  3 y
subject to 5 x  4 y  32
x  2 y  10
x, y  0

• This problem can now be solved using the simplex method as


discussed before.

24
Example 1, page 226
Solution
Step 1. Set up the initial simplex tableau.
– Turn the constraints into equations adding to them the
slack variables s1 and s2 . Also rearrange the objective
function and place it below the constraints:
– Write the coefficients of the system in a tableau:
5 x  4 y  s1  32
x  2y  s2  10
2 x  3 y z 0
Basic x y s1 s2 Constant
variable

s1 5 4 1 0 32
s2 1 2 0 1 10
z –2 –3 0 0 0

Example 1, page 226 25


Solution
Step 2. Determine whether the optimal solution has been reached.
– Since there are negative entries in the last row of the
tableau, the initial solution is not optimal.

Basic x y s1 s2 Constant
variable

s1 5 4 1 0 32
s2 1 2 0 1 10
z –2 –3 0 0 0

26
Example 1, page 226
Solution
Step 3. Perform the pivot operation.
– Since the entry ‐3 is the most negative entry in the last
row of the tableau, the second column in the tableau is
the pivot column.

Basic x y s1 s2 Constant
variable

s1 5 4 1 0 32
s2 1 2 0 1 10
z –2 –3 0 0 0
Pivot column

27
Example 1, page 226
Solution
Step 3. Perform the pivot operation.
– Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
– We see that the ratio 10/2 = 5 is less than the ratio 32/4
= 8, so row 2 is the pivot row (choose minimum ratio again!!).
Basic x y s1 s2 Constant
variable
32 8
s1 5 4 1 0 32 4
Pivot row s2 1 2 0 1 10 10 5
2
z –2 –3 0 0 0
Pivot column

Variable y enters to become basic and


s2 leaves to become non-basic variable
28
Example 1, page 226
Solution
Step 3. Perform the pivot operation.
– Convert the pivot element into a 1.

Basic x y s1 s2 Constant
variable

s1 5 4 1 0 32
s2 1 2* 0 1 10
z –2 –3 0 0 0

Basic x y s1 s2 Constant
variable

s1
1 R2
2 y 1/2 1 0 1/2 5
z

29
Solution
Step 3. Perform the pivot operation.
– Use elementary row operations to convert the pivot
column into a unit column.
Basic x y s1 s2 Constant
variable

s1 5 4 1 0 32
s2 1 2* 0 1 10
z –2 –3 0 0 0

Basic x y s1 s2 Constant
variable
R1  4 R2 s1 3 0 1 –2 12
y 1/2 1 0 1/2 5
R3  3R2 z –1/2 0 0 3/2 15

30
Solution
Step 3. Perform the pivot operation.
– The last row of the tableau contains a negative number,
so an optimal solution has not been reached. Therefore,
we repeat the iteration step.
– Since the entry –1/2 is the most negative entry in the last
row of the tableau, the first column in the tableau is now
the pivot column.

Basic x y s1 s2 Constant
variable

s1 3 0 1 –2 12
y 1/2 1 0 1/2 5
z –1/2 0 0 3/2 15

Pivot column

31
Solution
Step 3. Perform the pivot operation.
– Divide each positive number of the pivot column into the
corresponding entry in the column of constants and
compare the ratios thus obtained.
– We see that the ratio 12/3 = 4 is less than the ratio
5/(1/2) = 10, so row 1 is now the pivot row.

x y s1 s2 Constant
12  4
Pivot row 3 0 1 –2 12 3
1/2 1 0 1/2 5 5  10
1/2
–1/2 0 0 3/2 15
Pivot column
Variable x enters to become basic and
s1 leaves to become non-basic variable
32
Example 1, page 226
Solution
Step 3. Perform the pivot operation.
– The entry 3 lying in the pivot column and the pivot row is
the pivot element.
– Convert the pivot element into a 1.
Basic x y s1 s2 Constant
variable

s1 3* 0 1 –2 12
y 1/2 1 0 1/2 5
z –1/2 0 0 3/2 15
Basic x y s1 s2 Constant
variable
1R
3 1 x 1 0 1/3 –2/3 4
y
z
33
Solution
Step 3. Perform the pivot operation.
– Use elementary row operations to convert the pivot
column into a unit column.
Basic x y s1 s2 Constant
variable

s1 3* 0 1 –2 12
y 1/2 1 0 1/2 5
z –1/2 0 0 3/2 15

Basic x y s1 s2 Constant
variable

x 1 0 1/3 –2/3 4
R2  12 R1 y 0 1 –1/6 5/6 3
R3  12 R1 z 0 0 1/6 7/6 17

34
Solution
Step 3. Perform the pivot operation.
– The last row of the tableau contains no negative
numbers, so an optimal solution has been reached.

Basic x y s1 s2 Constant
variable

x 1 0 1/3 –2/3 4
y 0 1 –1/6 5/6 3
z 0 0 1/6 7/6 17

35
Example 1, page 226
Solution
Step 4. Determine the optimal solution.
• The non‐basic variables (more than one non‐zero entries in the column)
s1 and s2 are non‐basic variables, we could simply set s1 = s2 = 0.
• the basic variables (only one non‐zero entry in the column) are x and y.
– The optimal value for x is 4
– The optimal value for y is 3.
– The optimal value for z is 17, which means that the
minimized value for C = –z is –17.
Basic x y s1 s2 Constant
variable

x 1 0 1/3 –2/3 4
y 0 1 –1/6 5/6 3
z 0 0 1/6 7/6 17

36
Summary steps for example 2
Basic x y s1 s2 Constant Basic
variable s1 = 32; s2 = 10
s1 5 4 1 0 32
Non-basic
s2 1 2* 0 1 10 x = 0; y = 0;
z –2 –3 0 0 0
Basic x y s1 s2 Constant Basic
variable
s1 = 12; y = 5
s1 3* 0 1 –2 12
Non-basic
y 1/2 1 0 1/2 5 x = 0; s2 = 0;
z –1/2 0 0 3/2 15
Basic x y s1 s2 Constant Basic
variable
x = 4; y = 3
x 1 0 1/3 –2/3 4
y 0 1 –1/6 5/6 3 Non-basic
s1 = 0; s2 = 0;
z 0 0 1/6 7/6 17
37
Summary for pivot operation
• Maximization
– The selection of the leaving (basic) variable is the most negative
coefficient and the entering (non‐basic) variable is having the smallest
non‐negative ratio. The maximum z is attained when all the z‐row
coefficients are non‐negative.

• Minimization
– [option 1] Transform the minimization into maximization problem. The
pivot operation is the same as maximization problem.
– [option 2] As max z = ‐ min(‐z), the selection of the leaving (basic)
variable is the most positive coefficient and the entering (non‐basic)
variable is having the smallest non‐negative ratio. The minimum z is
attained when all the z‐row coefficients are non‐positive.
38
The Dual Problem
Another special class of linear programming (LP)
problems we encounter in practical applications is
characterized by the following conditions:

1. The objective function is to be minimized.


2. All the variables involved are nonnegative.
3. All other linear constraints may be written so that
the expression involving the variables is greater
than or equal to a nonnegative constant.

39
The Dual Problem
In solving this kind of linear programming (LP)
problems, it helps to note that each maximization LP
problem is associated with a minimization LP problem,
and vice versa.

The given problem is called the primal problem, and


the related problem is called the dual problem.

40
Example 3
Write the dual problem associated with this problem:
minimize C  6x  8 y
subject to 40 x  10 y  2400
10 x  15 y  2100 Primal
Problem
5 x  15 y  1500
x, y  0

We first write down a tableau for the primal problem:


x y Constant
40 10 2400
10 15 2100
5 15 1500
6 8
41
Example 2, page 228
Example 3
Next, we interchange the columns and rows of the tableau and
head the three columns of the resulting array with the three
variables u, v, and w, obtaining
x y Constant
40 10 2400
10 15 2100
5 15 1500
6 8

u v w Constant
40 10 5 6
10 15 15 8
2400 2100 1500

42
Example 2, page 228
Example 3
Consider the resulting tableau as if it were the initial simplex
tableau for a maximization LP problem.
From it we can reconstruct the required dual problem:

u v w Constant
40 10 5 6
10 15 15 8
2400 2100 1500

maximize z  2400u  2100v  1500 w


subject to 40u  10v  5w  6 Dual
10u  15v  15w  8 Problem
u , v, w  0

43
Example 2, page 228
The Fundamental Theorem of Duality
• A primal problem has a solution if and only if the
corresponding dual problem has a solution.

• Furthermore, if a solution exists, then:


a. The objective functions of both the primal and the dual
problem attain the same optimal value.
b. The optimal solution to the primal problem appears under
the slack variables in the last row of the final simplex
tableau associated with the dual problem.

44
Example 3
• Complete the solution of the problem from our last example:

minimize C  6x  8 y
subject to 40 x  10 y  2400
Primal
10 x  15 y  2100
Problem
5 x  15 y  1500
x, y  0

maximize z  2400u  2100v  1500w


subject to 40u  10v  5w  6 Dual
10u  15v  15w  8 Problem
u , v, w  0

45
Example 3, page 229
Solution
• The dual problem associated with the given primal problem is
a maximization LP problem.
• Thus, we can proceed with the simplex method.
• First, we introduce to the system of equations the slack
variables x and y, and restate the inequalities as equations,
obtaining
40u  10v  5w  x 6
10u  15v  15w y 8
2400u  2100v  1500 w z0

Basic u v w x y Constant
variable

x 40 10 5 1 0 6
y 10 15 15 0 1 8
z –2400 –2100 –1500 0 0 0
46
Example 3, page 229
Solution
• Continue with the simplex iterative method until a final
tableau is obtained with the solution for the problem:
Basic u v w x y Constant
variable

u 1 0 –3/20 3/100 –1/50 1/50


v 0 1 11/10 –1/50 2/25 13/25
z 0 0 450 30 120 1140

Solution for the


primal problem

• The fundamental theorem of duality tells us that the solution


to the primal problem is x = 30 and y = 120, with a minimum
value for C of 1140.

47
Example 3, page 229
Nonstandard LP Problems
• A nonstandard LP problem is one that does not fit any of the
two categories of problems we have studied so far:

– Maximization LP problem:
1. The objective function is to be maximized.
2. All the variables involved in the LP problem are nonnegative.
3. All other linear constraints may be written so that the expression
involving the variables is less than or equal to a nonnegative
constant.

– Minimization LP problem:
1. The objective function is to be minimized.
2. All the variables involved in the LP problem are nonnegative.
3. All other linear constraints may be written so that the expression
involving the variables is greater than or equal to a nonnegative
constant.
48
Big M Method
In this section, another version of the simplex method
is presented that will solve nonstandard problems
including both maximization and minimization LP
problems with any combination of ≤, ≥, = constraints

49
Example 4
Maximize z = 2x1 + x2
subject to x1 + x2 < 10 x1 + x2 + s1 = 10
–x1 + x2 > 2 –x1 + x2 – s2 = 2
x1 , x2 > 0

To form equations, we introduce a slack variable s1 ( ) and


surplus variable s2 ( ) to constraints.

50
Example 4
We now express the linear programming problem as a system of
equations:
x1 + x2 + s1 = 10
–x1 + x2 – s2 =2
–2x1 – x2 +z=0
x1, x2, s1, s2 > 0

Basic x1 x2 s1 s2 Constant
s1 1 1 1 0 10
s2 1 1 0 1 2
z 2 1 0 0 0

51
Example 4
Basic x1 x2 s1 s2 Constant
s1 1 1 1 0 10
s2 1 1 0 1 2
z 2 1 0 0 0

Initial basic solution: Non‐basic variables: x1 = x2 = 0


Basic variables: s1= 10, s2 = ‐2
Initial objective function value: z = 0

The basic solution is not feasible if any of the variables


(excluding z) are negative. Hence the solution is not feasible
because the surplus variable s2 is negative. 52
Artificial Variables

In order to use the simplex method on problems with mixed


constraints, a new artificial variable is introduced. This variable
has no physical meaning in the original problem and is
introduced solely for the purpose of obtaining a basic feasible
solution so that we can apply the simplex method.
An artificial variable is a variable introduced into each equation
that has a surplus variable. To ensure that we consider only
basic feasible solutions, an artificial variable is required to
satisfy the nonnegative constraint. But the optimal solution
should not include any artificial variable.

53
Example 4
An artificial variable A1 is introduced into the equation involving
the surplus variable s2:
x1 + x2 – s2 + A1 = 2
To prevent an artificial variable from becoming part of an optimal
solution to the original problem, a very large “penalty” is
introduced into the objective function. This penalty is created by
choosing a positive constant M so large that the value of the
artificial variable is forced to be ZERO in any final optimal solution
of the original problem. Hence this is known as Big M method. We
add the term –MA1 to the objective function:
z = 2x1 + x2 – MA1

54
Example 4

Original problem Big M method

Maximize z = 2x1 + x2 Max z = 2x1 + x2 ‐ MA1


subject to x1 + x2 < 10 s.t. x1 + x 2 + s1 = 10
–x1 + x2 > 2 –x1 + x2 – s2 + A1 = 2
x 1, x 2 > 0 x1, x2, s1, s2, A1 > 0

55
Big M Method:
Form the Modified Problem
• If any problem constraints have negative constants on the right side,
multiply both sides by ‐1 to obtain a constraint with a nonnegative
constant. Remember to reverse the direction of the inequality if the
constraint is an inequality.
• Introduce a slack variable for each “≤” constraint.
• Introduce a surplus variable and an artificial variable in each ≥
constraint.
• Introduce an artificial variable in each “=“ constraint.
• For each artificial variable Aj , add –MAj to the maximization objective
function. But add “+MAj“ for minimization objective function.
• Use the same constant M for all artificial variables.

56
The initial system for the modified problem is
x1 + x2 + s1 = 10
–x1 + x2 – s2 + A1 =2
–2x1 – x2 + MA1 + z = 0
x1, x2, s1, s2, A1 > 0

Then, the initial simplex tableau for the modified problem.

Basic x1 x2 s1 s2 A1 Constant
s1 1 1 1 0 0 10
s2 1 1 0 1 1 2
z 2 1 0 0 M 0

57
Basic x1 x2 s1 s2 A1 Constant
s1 1 1 1 0 0 10
s2 1 1 0 1 1 2
z 2 1 0 0 M 0

The initial simplex tableau from our example does not satisfy
the requirement that all variables are nonnegative since the
basic solution is not feasible (s2 = ‐2).
To use the simplex method, we must first use row operations to
transform the tableau into the one that satisfies all initial
simplex tableau requirements. We need to replace s2 as a basic
variable by something else with a positive coefficient. We
choose A1. This is not the pivot column (most negative in last
row) in simplex method.
58
We want to use A1 as a basic variable instead of s2. We proceed
to eliminate M from the A1 column using row operations:
x1 x2 s1 s2 A1 Constant
1 1 1 0 0 10
1 1 0 1 1 2
2 1 0 0 M 0

Basic x1 x2 s1 s2 A1 Constant
s1 1 1 1 0 0 10
A1 1 1 0 1 1 2
z M 2 M 1 0 M 0 2M

Initial basic solution: Non‐basic variables: x1 = x2 = s2 = 0


Basic variables: s1= 10, A1 = 2
Initial objective function value: z = 2M
The basic solution is now feasible (z can be negative) 59
We now continue with the usual simplex process, using pivot
operations and keep in mind that M is unspecified, but a very
large positive number.

Basic x1 x2 s1 s2 A1 Constant ratio


s1 1 1 1 0 0 10 10
 10
1
2
A1 1 1 0 1 1 2 1
2

z M 2 M 1 0 M 0 2M

In this example, M – 2 and M are positive, and –M – 1 is


negative. The first pivot column is column 2 and the first pivot
row is row 2.

60
After pivot operation, we have
x1 x2 s1 s2 A1 Constant
R1  R2 2 0 1 1 -1 8
-1 1 0 -1 1 2
R3   M  1 R2 -3 0 0 -1 M +1 2

Basic x1 x2 s1 s2 A1 Constant ratio


8
s1 2 0 1 1 -1 8 2
4
x2 -1 1 0 -1 1 2 
z -3 0 0 -1 M +1 2

61
Then pivot on the first row, first column, we obtain:

Basic x1 x2 s1 s2 A1 Constant
s1 2 0 1 1 -1 8
x2 -1 1 0 -1 1 2
z -3 0 0 -1 M +1 2

Basic x1 x2 s1 s2 A1 Constant
1
R1 s1 1 0 1/2 1/2 -1/2 4
2
x2
z

62
Then pivot on the first row, first column, we obtain:

Basic x1 x2 s1 s2 A1 Constant
s1 2 0 1 1 -1 8
x2 -1 1 0 -1 1 2
z -3 0 0 -1 M +1 2

Basic x1 x2 s1 s2 A1 Constant
x1 1 0 1/2 1/2 −1/2 4
R2  R1 x2 0 1 1/2 −1/2 1/2 6
R3  3R1 z 0 0 3/2 1/2 M −1/2 14

63
Thus, we obtain:

Basic x1 x2 s1 s2 A1 Constant
x1 1 0 1/2 1/2 −1/2 4
x2 0 1 1/2 −1/2 1/2 6
z 0 0 3/2 1/2 M −1/2 14

The last row coefficients are all nonnegative and the artificial
variables is non‐basic variable, we have the optimal solution:
Optimal basic solution: Non‐basic variables: s1 = s2 = A1 = 0
Basic variables: x1 = 4, x2 = 6
Optimal objective function value: z = 14
64
Summary steps for example 4
Basic x1 x2 s1 s2 A1 Constant
s1 1 1 1 0 0 10
s2 1 1 0 1 1 2
z 2 1 0 0 M 0

Basic x1 x2 s1 s2 A1 Constant
s1 1 1 1 0 0 10
A1 1 1* 0 1 1 2
z M 2 M 1 0 M 0 2M

65
Summary steps for example 4
Basic x1 x2 s1 s2 A1 Constant
s1 2* 0 1 1 -1 8
x2 -1 1 0 -1 1 2
z -3 0 0 -1 M+1 2

Basic x1 x2 s1 s2 A1 Constant
x1 1 0 1/2 1/2 −1/2 4
x2 0 1 1/2 −1/2 1/2 6
z 0 0 3/2 1/2 M −1/2 14

66
Example 5
Minimize z = 2x1 + 5x2
subject to 3x1 + x2 < 10
x1 + 2x2 > 10
x1, x2 > 0

To form an equations, we introduce a slack variable s1 , surplus variable s2 and


artificial variable A1 to constraints.

Minimize z = 2x1 + 5x2 + M A1


subject to 3x1 + x2 + s1 = 10
x1 + 2x2 – s2 + A1 = 10
x1, x2 , s1 , s2 , A1 > 0
67
Minimize z = 2x1 + 5x2 + M A1
subject to 3x1 + x2 + s1 = 10
x1 + 2x2 – s2 + A1 = 10
x 1, x 2 , s 1 , s 2 , A 1 > 0

Basic x1 x2 s1 s2 A1 Constant
s1 3 1 1 0 0 10
s2 1 2 0 -1 1 10
z −2 −5 0 0 -M 0

Basic x1 x2 s1 s2 A1 Constant
s1 3 1 1 0 0 10

MR2  R3 A1 1 2 0 -1 1 10
z M−2 2M−5 0 -M 0 10M

68
Minimization problem:
The selection of the entering (basic) variable is the most positive coefficient and the
leaving (non-basic) variable is having the smallest non-negative ratio.

In this example, we choose x2 to become basic in the first iteration.

Basic x1 x2 s1 s2 A1 Constant ratio


s1 3 1 1 0 0 10 10
 10
1
A1 1 2 0 -1 1 10 10
1
5

z M−2 2M−5 0 -M 0 10M

When checking the ratio, we choose the artificial variable A1 to leave the Basic
and become non-basic variable.

69
Basic x1 x2 s1 s2 A1 Constant
s1 3 1 1 0 0 10
A1 1 2 0 -1 1 10
z M−2 2M−5 0 -M 0 10M

Basic x1 x2 s1 s2 A1 Constant
s1
1
R2 x2 0.5 1 0 -0.5 0.5 5
2
z

70
Basic x1 x2 s1 s2 A1 Constant
s1 3 1 1 0 0 10
A1 1 2 0 -1 1 10
z M−2 2M−5 0 -M 0 10M

Basic x1 x2 s1 s2 A1 Constant
R1  R2 s1 2.5 0 1 0.5 -0.5 5
x2 0.5 1 0 -0.5 0.5 5
R3   2 M  5  R2 z 0.5 0 0 -2.5 2.5-M 25

71
Now, we choose x1 to become basic variable in the second iteration .

Basic x1 x2 s1 s2 A1 Constant ratio


s1 2.5 0 1 0.5 -0.5 5 5
2.5
2
5
x2 0.5 1 0 -0.5 0.5 5 0.5
 10

z 0.5 0 0 -2.5 2.5-M 25

When checking the ratio, we choose the slack variable s1 to leave the Basic and
become non-basic variable.

72
Basic x1 x2 s1 s2 A1 Constant
s1 2.5 0 1 0.5 -0.5 5
x2 0.5 1 0 -0.5 0.5 5
z 0.5 0 0 -2.5 2.5-M 25

Basic x1 x2 s1 s2 A1 Constant
1
2.5
R1 x1 1 0 0.4 0.2 -0.2 2
x2
z

73
Basic x1 x2 s1 s2 A1 Constant
s1 2.5 0 1 0.5 -0.5 5
x2 0.5 1 0 -0.5 0.5 5
z 0.5 0 0 -2.5 2.5-M 25

Basic x1 x2 s1 s2 A1 Constant
x1 1 0 0.4 0.2 -0.2 2
R2  0.5 R1 x2 0 1 -0.2 -0.6 0.6 4
R3  0.5 R1 z 0 0 -0.2 -2.6 2.6-M 24

The last row coefficients are all non‐positive and the artificial variables is non‐
basic variable, we have the optimal solution:
Optimal solution: Non‐basic variables: s1 = s2 = A1 = 0
Basic variables: x1 = 2, x2 = 4
74
Optimal objective function value: z = 24
Summary steps for example 5
Basic x1 x2 s1 s2 A1 Constant
s1 3 1 1 0 0 10
A1 1 2 0 -1 1 10
z M−2 2M−5 0 -M 0 10M

Basic x1 x2 s1 s2 A1 Constant
s1 2.5 0 1 0.5 -0.5 5
x2 0.5 1 0 -0.5 0.5 5
z 0.5 0 0 -2.5 2.5-M 25

Basic x1 x2 s1 s2 A1 Constant
x1 1 0 0.4 0.2 -0.2 2
x2 0 1 -0.2 -0.6 0.6 4
z 0 0 -0.2 -2.6 2.6-M 24 75
Big M Method: Summary
1. Form the preliminary simplex tableau for the modified
problem.
2. Use row operations to eliminate the M in the bottom row
of the initial simplex tableau in the columns corresponding
to the artificial variables. The resulting tableau is the initial
simplex tableau.
3. Solve the modified problem by applying the simplex method
to the initial simplex tableau found in the second step.

76
Big M Method: Summary
(continued)
4. Special cases:
(i) if the modified problem has no optimal solution, the
original problem has no optimal solution.
(ii) if all artificial variables are zero in the optimal solution to
the modified problem, delete the artificial variables to
find an optimal solution to the original problem
(iii) if any artificial variables are nonzero in the optimal
solution, the original problem has no optimal solution.

77

You might also like