




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Homework Problem Set # 7 with solutions for the class Linear Programs & Network Flows
Typology: Exercises
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Homework 7 Due: October 14, 2016
State the optimal solution and optimal value of the objective function.
minimize 2x 1 + x 2
x 1 + 2x 2 ≤ 4
x 1 + x 2 = 3
x 1 , x 2 ≥ 0
Solution: First we introduce a slack variable (x 3 ) to the first constraint to put the formu-
lation in standard form. Then we add an artificial variable a 1 to the second constraint, and
add M a 1 to the objective function. This gives us the following Big-M formulation:
minimize 2x 1 + x 2 + M a 1
subject to x 1 + 2x 2 + x 3 = 4
x 1 + x 2 + a 1 = 3
x 1 , x 2 , x 3 , a 1 ≥ 0
The initial tableau (after adjusting row 0 to make a 1 basic) and optimal tableau are shown
below. Since this is a minimization problem, we will pivot on positive values in row 0, and
stop when all values in row zero are non-positive. Recall that you may also multiply row 0
by -1, and pivot on negative values.
Initial tableau:
x 1 x 2 x 3 a 1 RHS
M -2 M -1 0 0 3 M
1 2 1 0 4
1 1 0 1 3
After two iterations you obtain a feasible solution (where a 1 = 0)
x 1 x 2 x 3 a 1 RHS
0 0 -1 3-M 5
0 1 1 -1 1
1 0 -1 2 2
Based on the optimal tableau, we see that the optimal solution (x 1 , x 2 ) = (2, 1).
maximize 4x 1 + 2x 2 + x 3
subject to x 1 + 3x 2 + x 3 = 10
2 x 1 − 4 x 2 + x 4 = 5
x 1 , x 2 , x 3 , x 4 ≥ 0
Homework 7 Due: October 14, 2016
(a) Use the Simplex algorithm to find the optimal solution. Hint: no artificial variables are
needed.
Solution: After adding row 1 to the objective function row, we obtain a feasible basis
with x 3 and x 4 as basic variables.
B.V. x 1 x 2 x 3 x 4 RHS
z -3 1 0 0 10
x 3 1 3 1 0 10
x 4 2 -4 0 1 5
After two iterations of the Simplex method we end up with the following optimal
tableau:
B.V. x 1 x 2 x 3 x 4 RHS
z 0 0 1 1 25
x 2 0 1
1 5
1 10
3 2 x 1 1 0
2 5
3 10
11 2
(b) Suppose the objective coefficient of x 3 is changed from 1 to 1 + δ. For what range of δ does
the current optimal solution remain optimal?
Solution: First we observe that x 3 is non-basic, so changing its cost only affects the
reduced cost of variable x 3. If the coefficient of x 3 becomes 1 + δ, then the coefficient
of x 3 in row 0 of the optimal tableau becomes 1 − δ, meaning we must have 1 − δ ≥ 0
for the optimal basis to not change, or equivalently, δ ≤ 1.
(c) Suppose the objective coefficient of x 2 is changed from 2 to 2 + δ. For what range of δ does
the current optimal solution remain optimal?
Solution: We see that x 2 is basic. If the coefficient of x 2 becomes 2 + δ, then the
coefficient of x 2 in the objective value row becomes 0 − δ. The corresponding tableau
is then:
B.V. x 1 x 2 x 3 x 4 RHS
z 0 0 − δ 1 1 25
x 2 0 1
1 5 −^
1 10
3 2 x 1 1 0
2 5
3 10
11 2
To correct the objective row of the tableau we need to make the reduced cost of the
basic variable x 2 zero again. We do this by adding δ times the first row (corresponding
to x 2 ).
B.V. x 1 x 2 x 3 x 4 RHS
z 0 0 1 +
1 5
δ 1 −
1 10
δ 25 +
3 2
δ
x 2 0 1
1 5 −^
1 10
3 2 x 1 1 0
2 5
3 10
11 2
We observe that for each unit of δ the objective function value goes up by
3 2
δ. Next,
Homework 7 Due: October 14, 2016
B.V. x 1 x 2 x 3 e 1 s 2 a 1 a 3 RHS
z 0 −M −
1 2
1 2
5 2
1 2
a 1 0
1 2
1 2
x 1 1
1 2
1 2
1 2
a 3 0
1 2
1 2
1 2
We choose x 2 as the entering variable and a 1 as the leaving variable. This gives us the
following tableau:
B.V. x 1 x 2 x 3 e 1 s 2 a 1 a 3 RHS
z 0 0 −
1 2 M^ −^
5 2 −M^ −^1 0 2 M^ + 1^0 −M^ + 2
x 2 0 1 0 -2 − 1 2 0 0
x 1 1 0 −
1 2
a 3 0 0
1 2 1 0 -1^1
We choose e 1 as the entering variable and a 3 as the leaving variable. This gives us the
following tableau:
B.V. x 1 x 2 x 3 e 2 s 2 a 1 a 3 RHS
z 0 0 -2 0 0 M M + 1 3
x 2 0 1 1 0 − 1 0 2 2
x 1 1 0 -1 0 1 0 -1 1
e 1 0 0
1 2 1 0 -1^1
Next, we take x 3 to be the entering variable and x 2 to be the leaving variable. This
gives the tableau:
B.V. x 1 x 2 x 3 e 2 s 2 a 1 a 3 RHS
z 0 2 0 0 − 2 M M + 5 7
x 3 0 1 1 0 − 1 0 2 2
x 1 1 1 0 0 0 0 1 3
e 1 0 −
1 2
1 2
We choose s 2 as entering variable and e 1 as the leaving variable. This gives the following
tableau:
B.V. x 1 x 2 x 3 e 2 s 2 a 1 a 3 RHS
z 0 0 0 4 0 M − 4 M + 5 7
x 3 0 0 1 2 0 -2 2 2
x 1 1 1 0 0 0 0 1 3
s 2 0 − 1 0 2 1 -2 0 0
This tableau and the corresponding solution (x 1 , x 2 , x 3 ) = (3, 0 , 2) is optimal, since all
reduced cost are positive.
(b) Suppose the objective coefficient of x 2 is changed to 1 + δ. For what range of δ does the
current solution remain optimal?
Homework 7 Due: October 14, 2016
Solution: Since x 2 is non-basic, changing its reduced cost only affects the reduced
cost of x 2 itself. For a change of δ, the new reduced cost is 0 − δ. For the basis and the
solution to remain optimal, we require that 0 − δ ≥ 0. So the solution remains optimal
for δ ≤ 0.
(c) Suppose the objective coefficient of x 3 is changed to 2 + δ. For what range of δ does the
current solution remain optimal?
Solution: After changing the objective coefficient of x 3 , we obtain the following opti-
mal tableau:
B.V. x 1 x 2 x 3 e 2 s 2 a 1 a 3 RHS
z 0 0 0 − δ 4 0 M − 4 M + 5 7
x 3 0 0 1 2 0 -2 2 2
x 1 1 1 0 0 0 0 1 3
s 2 0 − 1 0 2 1 -2 0 0
To ensure that x 3 has zero reduced cost, we add the first row to the objective function
row to obtain:
B.V. x 1 x 2 x 3 e 2 s 2 a 1 a 3 RHS
z 0 0 0 4 + 2δ 0 M − 4 − 2 δ M + 5 + 2δ 7
x 3 0 0 1 2 0 -2 2 2
x 1 1 1 0 0 0 0 1 3
s 2 0 − 1 0 2 1 -2 0 0
To ensure that the reduced cost remain non-negative, we require the following:
4 + 2δ ≥ 0 ⇒ δ ≥ − 2
M − 4 − 2 δ ≥ 0 ⇒ δ ≤
1 2
M + 5 + 2δ ≥ 0 ⇒ δ ≥ −
1 2 M^ −^
5 2 =^ −∞
− 2 ≤ δ ≤ ∞
(d) Suppose the right hand side of the second constraint is changed to −4 + ∆. For what range
of ∆ does the current basis remain optimal? And what is the shadow price?
Solution: Note that we flipped the sign of the inequality, so we need analyze the case
that we change the right hand side to 4 − ∆. The new right hand side vector can be
split into the following:
4 − δ
3
Homework 7 Due: October 14, 2016
In, addition we observe from the column of a 3 that:
Since we are only adding multiples of other rows to the objective function row, this is
equivalent to: 0
——
0
0
1
Hence, our basic variables are given by:
For the solution to remain optimal the basic variables have to remain non-negative.
Therefore, we know that ∆ ≥ −1. In addition, we see that the optimal objective value
increases by 5 units for each unit of ∆. Hence, the shadow price is 5.
Solution:
(a) If the Type 1 candy bar profit is ≤ 6 then the current basis remains optimal. So if the
new profit was 7 cents we would need to resolve the problem.
(b) If the Type 2 candy bar profit is between 5 and 15 then the current basis remains
optimal. So if the new profit was 13 cents the current solution would remain optimal:
(x 1 , x 2 , x 3 ) = (0, 25 , 25), this corresponds to a profit of 450.
(c) If the amount of available sugar (b 1 ) is in the following range 100/ 3 ≤ b 1 ≤ 100 then
the current basis remains optimal.
(d) First note that 60 oz of sugar is within the range found in part c so you do not need to
resolve. In particular δ = 10. The new profit is 300+4δ = 340. The new RHS values are
25 + 1. 5 δ and 25 − 0. 5 δ, since δ = 10, these become 40 and 20: (x 1 , x 2 , x 3 ) = (0, 20 , 40).
For the last part of this question, 30 oz is outside the range so we cannot answer
without resolving.
Homework 7 Due: October 14, 2016
Solution:
(a) Since x 1 is a basic variable, we add δ times the first row to the objective function row.
Since the reduced cost need to remain non-positive for a minimization problem, we
require that − 5 −
3 20
δ ≤ 0 and − 7
1 2
1 40
δ ≤ 0. This means that −
100 3
≤ δ ≤ 300. Thus, 50 3
≤ c 1 ≤ 350.
(b) By adding δ times the column of a 1 (without the M ) to the right hand side, we obtain
that the right hand side is equal to:
320 + 5δ
——
3 .6 +
3 20
δ
1 40
δ
To ensure that the solution remain feasible, the right hand side has to be non-negative.
This requires that − 24 ≤ δ ≤ 56. That is, 4 ≤ b 1 ≤ 84.
Observe that 40 is within the range, so the current basis remains optimal. Plugging in
δ = 12 gives us (x 1 , x 2 ) = (5. 4 , 1 .1) and an objective function value of 320+5×12 = 380.