You are on page 1of 28

Lecture 9

▪ Lecture 4 HW
▪ Module A
• 1, 3, 5, 7, 9, 20, 25

Lecture 9 1
Lecture 4 HW
▪ Maximization problem
• Complete the following tableau.
• From the tableau, what is the basic feasible solution?
• Is it optimal? If not, solve an optiaml solution by the simplex method.

3 4 5 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2

120 0.1 0.25 0 1 0


650 0.5 0.75 1 0 0.25
𝑧𝑗
𝑐𝑗 − 𝑧𝑗

Lecture 9 2
HW Solution

3 4 5 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2

0 𝑠1 120 0.1 0.25 0 1 0


5 𝑥3 650 0.5 0.75 1 0 0.25
𝑧𝑗 3250 2.5 3.75 5 0 1.25
𝑐𝑗 − 𝑧𝑗 0.5 0.25 0 0 -1.25

From the tableau, what is the basic feasible solution?


The basic feasible solution is 𝑥1, 𝑥2, 𝑥3, 𝑠1 , 𝑠2 = (0, 0, 650, 120, 0)

Is it optimal? If not, solve an optiaml solution by the simplex method.


It is not optimal, because we find positive values of 𝑐𝑗 − 𝑧𝑗 .

Lecture 9 3
3 4 5 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2
0 𝑠1 120 0.1 0.25 0 1 0 1200
5 𝑥3 650 0.5 0.75 1 0 0.25 1300
𝑧𝑗 3250 2.5 3.75 5 0 1.25
𝑐𝑗 − 𝑧𝑗 0.5 0.25 0 0 -1.25

The first Iteration:


3 4 5 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2
3 𝑥1 1200 1 2.5 0 10 0
5 𝑥3 50 0 -0.5 1 -5 0.25
𝑧𝑗 3850 3 5 5 5 1.25
𝑐𝑗 − 𝑧𝑗 0 -1 0 -5 -1.25

This is the optimal simplex tableau. The optimal solution is


𝑥1, 𝑥2, 𝑥3) = (1200, 0, 50 . The optimal objective function value is
Z = 3850.
Lecture 9 4
Module A

Lecture 9 5
Problem 1
10 2 6 0 0 0
Basic 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3
𝑐𝑗 Variable Quan.
10 𝑥1 10 1 10 -2 1 -1/2 0
2 𝑥2 40 0 1 2 0 1/2 0
0 𝑠3 30 0 0 8 -3 3/2 1
𝑧𝑗 420 10 2 16 2 4 0

𝑐𝑗 − 𝑧𝑗 0 0 -10 -2 -4 0

a. What is the solution given in this tableau?


The given solution is 𝑥1 , 𝑥2 ,𝑥3 ) = (10,40, 0 .

b. Is the solution in this tableau optimal? Why?


It is optimal because all 𝑐𝑗 − 𝑧𝑗 ≤ 0.

Lecture 9 6
Problem 1
c. What does 𝑥3 equal in this tableau? 𝑠2 ?
In this tableau, 𝑥3 = 𝑠1 = 𝑠2 =0.
d. Write out the original objective function for the LP
model, using only decision variables.
It is 10𝑥1 + 2𝑥2 + 6𝑥3 .
e. How many constraints are in the LP model?
There are 3 constraints.

f. Explain briefly why it would have been difficult to solve


this problem graphically.
There are 3 decision variables (𝑥1, 𝑥2, 𝑥3) , so it is difficult to draw the graphs
in the three dimensional space.

Lecture 9 7
Problem 3
60 50 45 50 0 0 0 0
Basic Quantit
𝑐𝑗 Variable y 𝑥1 𝑥2 𝑥3 𝑥4 𝑠1 𝑠2 𝑠3 𝑠4

0 𝑠1 20 0 1 0 0 1 0 0 0
50 𝑥4 15 0 0 0 1 0 1 0 0
60 𝑥1 12 1 ½ 0 0 0 0 1/10 0
0 𝑠4 45 0 0 8 6 0 -6 0 1
𝑧𝑗 1470 60 30 0 50 0 50 6 0
𝑐𝑗 − 𝑧𝑗 0 20 45 0 0 -50 -6 0

a. Is this a maximization or a minimization problem?


It is a maximization problem, because the table computes 𝑐𝑗 − 𝑧𝑗 .

b. What are the values of the decision variables in this tableau?


The values are 𝑥1, 𝑥2, 𝑥3, 𝑥4 = (12, 0, 0, 15).

Lecture 9 8
Problem 3

c. What are the values of the slack variables in this tableau?


The values are (𝑠1 , 𝑠2 , 𝑠3 , 𝑠4) = (20, 0, 0, 45).

d. What does the 𝑐𝑗 − 𝑧𝑗 value of 20 in the 𝑥2 column means?


It means that the net increase of objective function by increasing one unit of
𝑥2 is 20.

e. Is this solution optimal? Why? If not, determine the optimal solution.


The solution is not optimal because we have positive 𝑐𝑗 −𝑧𝑗 values.

Lecture 9 9
We apply the simplex method to the following tableau.
60 50 45 50 0 0 0 0
Basic Quantit
𝑐𝑗 Variable y 𝑥1 𝑥2 𝑥3 𝑥4 𝑠1 𝑠2 𝑠3 𝑠4

0 𝑠1 20 0 1 0 0 1 0 0 0
50 𝑥4 15 0 0 0 1 0 1 0 0
60 𝑥1 12 1 ½ 0 0 0 0 1/10 0
0 𝑠4 45 0 0 8 6 0 -6 0 1
𝑧𝑗 1470 60 30 0 50 0 50 6 0
𝑐𝑗 − 𝑧𝑗 0 20 45 0 0 -50 -6 0

The first iteration:


60 50 45 50 0 0 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑥4 𝑠1 𝑠2 𝑠3 𝑠4

0 𝑠1 20 0 1 0 0 1 0 0 0
50 𝑥4 15 0 0 0 1 0 1 0 0
60 𝑥1 12 1 ½ 0 0 0 0 1/10 0
45 𝑥3 45/8 0 0 1 3/4 0 -3/4 0 1/8
𝑧𝑗 1723.13 60 30 45 83.75 0 16.25 6 5.625
𝑐𝑗 − 𝑧𝑗 0 20 0 -33.75 0 -16.25 -6 -5.625

Lecture 9 10
The second iteration:
Basic 60 50 45 50 0 0 0 0
Variabl Quantit
𝑐𝑗 e y 𝑥1 𝑥2 𝑥3 𝑥4 𝑠1 𝑠2 𝑠3 𝑠4
50 𝑥2 20 0 1 0 0 1 0 0 0
50 𝑥4 15 0 0 0 1 0 1 0 0
60 𝑥1 2 1 0 0 0 -1/2 0 1/10 0
45 𝑥3 45/8 0 0 1 3/4 0 -3/4 0 1/8
𝑧𝑗 2123.1 60 50 45 83.75 20 16.25 6 5.625
3
𝑐𝑗 − 𝑧𝑗 0 0 0 -33.75 -20 -16.25 -6 -5.625

This table is the optimal simplex tableau because all the values of 𝑐𝑗 −
45
𝑧𝑗 ≤ 0. The optimal solution is 𝑥1, 𝑥2, 𝑥3, 𝑥4 = 2, 20, 8
, 15 𝑤𝑖𝑡ℎ 𝑍 =
2123.13.

Lecture 9 11
Problem 5
4 6 0 0 M
Basic Quantit
𝑐𝑗 Variable y 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1

M 𝐴1 2 0 1/2 -1 1/2 1
4 𝑥1 6 1 1/2 0 -1/2 0
𝑧𝑗 24+2M 4 M/2+2 -M M/2-2 M
𝑧𝑗 − 𝑐𝑗 0 M/2-4 -M M/2-2 0

a. Is this a maximization or a minimization problem? Why?


It is a minimization problem, because the table computes 𝑧𝑗 − 𝑐𝑗 .

b. What are the values of the decision variables in this tableau?


The values are 𝑥1 , 𝑥2 ) = (6, 0 .

Lecture 9 12
Problem 5
c. Were any the constraints in this problem originally equations? Why?
There are two surplus variables and two constraints. So both equations
are inequality constraints.

d. What is the value of 𝑠2 in this tableau?


Its value is zero because it is one of non-basic variables.

e. Is this solution optimal? Why? If not, complete the next iteration and
indicate if it is optimal.
The solution is not optimal because we have positive 𝑧𝑗 −𝑐𝑗 values.

Lecture 9 13
We update the following tableau.
4 6 0 0 M
Basic Quantit
𝑐𝑗 Variable y 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1

M 𝐴1 2 0 1/2 -1 1/2 1
4 𝑥1 6 1 1/2 0 -1/2 0
𝑧𝑗 24+2M 4 M/2+2 -M M/2-2 M
𝑧𝑗 − 𝑐𝑗 0 M/2-4 -M M/2-2 0

The next iteration:


4 6 0 0
Basic Quantit
𝑐𝑗 Variable y 𝑥1 𝑥2 𝑠1 𝑠2

0 𝑠2 4 0 1 -2 1
4 𝑥1 8 1 1 -1 0
𝑧𝑗 32 4 4 -4 0
𝑧𝑗 − 𝑐𝑗 0 -2 -4 0

The above is the optimal simplex tableau.

Lecture 9 14
Problem 7
▪ Cereal Company
Vitamin A Vitamin B Cost
Oats 8/ounce 1/ounce $0.05/ounce
Rice 6 2 0.03
Min. require. 48 12

▪ Problem
• How many ounces of oats and rice to meet the
minimum vitamin requirements while minimizing
cost.
▪ Formulate a LP and solve it using the
simplex method.

Lecture 9 15
Problem 7
There are two decision variables:
▪ 𝑥1 : ounces of oats.
▪ 𝑥2 : ounces of rice.

The linear programming formulation is given by


Minimize Z = $0.05𝑥1 + 0.03𝑥2
Subject to 8𝑥1 + 6𝑥2 ≥ 48 (Vitamin A)
1𝑥1 + 2𝑥2 ≥ 12 (Vitamin B)
𝑥1, 𝑥2 ≥ 0

Lecture 9 16
Problem 7
The standard form of the problem is
Minimize Z = $0.05𝑥1 + 0.03𝑥2 + 0𝑠1 + 0𝑠2 + 𝑀𝐴1 + 𝑀𝐴2
Subject to 8𝑥1 + 6𝑥2 − 𝑠1 + 𝐴1 = 48
1𝑥1 + 2𝑥2 − 𝑠2 + 𝐴2 = 12
𝑥1, 𝑥2 , 𝑠1 , 𝑠2, 𝐴1 , 𝐴2 ≥ 0

The initial basic variables are 𝐴1 , 𝐴2 = 48,12 .

Lecture 9 17
The initial simplex tableau is
Basic 0.05 0.03 0 0 M M
Variabl Quant
𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 𝐴2
𝑐𝑗 e ity
M 𝐴1 48 8 6 -1 0 1 0
M 𝐴2 12 1 2 0 -1 0 1
𝑧𝑗 60M 9M 8M -M -M M M
𝑧𝑗 − 𝑐𝑗 9M-0.05 8M-0.03 -M -M 0 0

The second simplex tableau is


Basic 0.05 0.03 0 0 M
Variab
𝑥1 𝑥2 𝑠1 𝑠2 𝐴2
𝑐𝑗 le Quantity
0.05 𝑥1 6 1 3/4 -1/8 0 0
M 𝐴2 6 0 5/4 1/8 -1 1
𝑧𝑗 6M+0.3 0.05 5M/4+0.15/4 M/8-0.05/8 -M M
𝑧𝑗 − 𝑐𝑗 0 5M/4+0.0075 M/8-0.05/8 -M 0

Lecture 9 18
The third simplex tableau is
Basic 0.05 0.03 0 0
Variabl
𝑥1 𝑥2 𝑠1 𝑠2
𝑐𝑗 e Quantity
0.05 𝑥1 12/5 1 0 -1/5 3/5
0.03 𝑥2 24/5 0 1 1/10 -4/5
𝑧𝑗 0.264 0.05 0.03 -0.007 0.006
𝑧𝑗 − 𝑐𝑗 0 0 -0.007 0.006

The fourth simplex tableau is


Basic 0.05 0.03 0 0
Variabl
𝑥1 𝑥2 𝑠1 𝑠2
𝑐𝑗 e Quantity
0 𝑠2 4 5/3 0 -1/3 1
0.03 𝑥2 8 4/3 1 -1/6 0
𝑧𝑗 0.24 0.04 0.03 -0.005 0
𝑧𝑗 − 𝑐𝑗 -0.01 0 -0.005 0

The optimal solution is 𝑥1, 𝑥2 = 0, 8 . The optimal objective function


value is 0.24.

Lecture 9 19
Problem 9
There are two decision variables:
▪ 𝑥1 : number of product 1 to produce.
▪ 𝑥2 : number of product 2 to produce.

The linear programming formulation is given by


Maximize Z = $6𝑥1 + 4𝑥2
Subject to 10𝑥1 + 10𝑥2 ≤100 (Line 1)
7𝑥1 + 3𝑥2 ≤ 42 (Line 2)
𝑥1, 𝑥2 ≥ 0

Lecture 9 20
Problem 9
The standard form of the problem is
Maximize Z = $6𝑥1 + 4𝑥2 + 0𝑠1 + 0𝑠2
Subject to 10𝑥1 + 10𝑥2 + 𝑠1 = 100
7𝑥1 + 3𝑥2 + 𝑠2 = 42
𝑥1, 𝑥2 , 𝑠1 , 𝑠2 ≥ 0

The initial basic variables are 𝑠1 , 𝑠2 = 100,42 .

Lecture 9 21
The initial simplex tableau is
Basic 6 4 0 0
Variabl Quant
𝑥1 𝑥2 𝑠1 𝑠2
𝑐𝑗 e ity
0 𝑠1 100 10 10 1 0
0 𝑠2 42 7 3 0 1
𝑧𝑗 0 0 0 0 0
𝑐𝑗 − 𝑧𝑗 6 4 0 0

The second simplex tableau is


Basic 6 4 0 0
Variabl Quant
𝑥1 𝑥2 𝑠1 𝑠2
𝑐𝑗 e ity
0 𝑠1 40 0 40/7 1 -10/7
6 𝑥1 6 1 3/7 0 1/7
𝑧𝑗 36 6 18/7 0 6/7
𝑐𝑗 − 𝑧𝑗 0 1.4286 0 -6/7

Lecture 9 22
The optimal simplex tableau is
Basic 6 4 0 0
Variabl Quant
𝑥1 𝑥2 𝑠1 𝑠2
𝑐𝑗 e ity
4 𝑥2 7 0 1 7/40 -1/4
6 𝑥1 3 1 0 -3/40 1/4
𝑧𝑗 46 6 4 1/4 1/2
𝑐𝑗 − 𝑧𝑗 0 0 -1/4 -1/2

The optimal solution is 𝑥1, 𝑥2 = 3, 7 with Z=46.

Lecture 9 23
Problem 20
1 2 -1 0 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3

2 𝑥2 10 0 1 ¼ ¼ 0 0
0 𝑠2 20 0 0 -3/4 ¾ 1 -1/2
1 𝑥1 10 1 0 1 -1/2 0 ½
𝑧𝑗 30 1 2 3/2 0 0 ½
𝑐𝑗 − 𝑧𝑗 0 0 -5/2 0 0 -1/2

a. Is this a maximization or a minimization problem? Why?


This is a maximization problem, because the table computes 𝑐𝑗 − 𝑧𝑗 .

b. What is the solution given in this tableau?


The solution is 𝑥1 , 𝑥2, 𝑥3, 𝑠1 , 𝑠2 , 𝑠3 = 10, 10, 0, 0, 20, 0 .

Lecture 9 24
Problem 20
c. Write out the original objective function using only decision variables.
The objective function is 𝑍 = 𝑥1 + 2𝑥2 − 𝑥3.

d. How many constraints are in the LP model?


There are 3 constraints.

e. Were any of the constraints originally equations? Why?


There were NO equations because we have three slack variables. If there
were one equation, we might have one slack variable missing in the table.

Lecture 9 25
h. Indentify the alternative solution.
1 2 -1 0 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3

2 𝑥2 10 0 1 ¼ ¼ 0 0
0 𝑠2 20 0 0 -3/4 ¾ 1 -1/2
1 𝑥1 10 1 0 1 -1/2 0 ½
𝑧𝑗 30 1 2 3/2 0 0 ½
𝑐𝑗 − 𝑧𝑗 0 0 -5/2 0 0 -1/2

1 2 -1 0 0 0
Basic
𝑐𝑗 Variable Quantity 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝑠3

2 𝑥2 10/3 0 1 1/2 0 -1/3 1/6


0 𝑠1 80/3 0 0 -1 1 4/3 -2/3
1 𝑥1 70/3 1 0 1/2 0 2/3 1/6
𝑧𝑗 30 1 2 3/2 0 0 ½
𝑐𝑗 − 𝑧𝑗 0 0 -5/2 0 0 -1/2

70 10 80
The alternative solution is 𝑥1, 𝑥2, 𝑥3, 𝑠1 , 𝑠2 , 𝑠3 = , , 0, , 0, 0 .
3 3 3

Lecture 9 26
Problem 25
The standard form of the LP is Maximize Z = $6𝑥1 + 2𝑥2 + 12𝑥3
Subject to 4𝑥1 + 𝑥2 + 3𝑥3 + 𝑠1 =24
2𝑥1 + 6𝑥2 + 3𝑥3 + 𝑠2 = 30
𝑥1, 𝑥2, 𝑠1 , 𝑠2 ≥ 0

Initial tableau.
6 2 12 0 0
Basic Quantit
𝑥1 𝑥2 𝑥3 𝑠1 𝑠2
𝑐𝑗 Variable y
0 𝑠1 24 4 1 3 1 0
0 𝑠2 30 2 6 3 0 1
𝑧𝑗 0 0 0 0 0 0
𝑐𝑗 − 𝑧𝑗 6 2 12 0 0

Lecture 9 27
Problem 25

The first iteration and the optimal simplex table:


6 2 12 0 0
Basic Quantit
𝑥1 𝑥2 𝑥3 𝑠1 𝑠2
𝑐𝑗 Variable y
12 𝑥3 8 4/3 1/3 1 1/3 0
0 𝑠2 6 -2 5 0 -1 1
𝑧𝑗 96 16 4 12 4 0
𝑐𝑗 − 𝑧𝑗 -10 -2 0 -4 0

The optimal solution is given by (𝑥1, 𝑥2, 𝑥3) = (0,0,8) and (𝑠1 , 𝑠2 ) = 0,6 .
The optimal objective function value Z=96.

Lecture 9 28

You might also like