Math 340 Assignment #1 Solutions class.

advertisement
Math 340 Assignment #1 Solutions
class.
Due Wednesday January 27, 2016 at the beginning of
1. The three inequalities −x + 2y ≤ −2, 2x + y ≥ 1, −3x + y ≥ −4 have no solution x, y with
x, y ≥ 0:
We first transform the inequalities to standard form −x+2y ≤ −2, −2x−y ≤ −1, +3x−y ≤ 4.
Then apply Phase One:
x1
x2
x3
w
= −2 +x −2y
= −1 +2x +y
= 4 −3x +y
=
+x0
+x0
+x0
−x0
Fake pivot to feasibility, x0 enters and x1 leaves.
x0
x2
x3
w
= 2
−x +2y
= 1
+x +3y
= 6 −4x +3y
= −2 +x +y
+x1
+x1
+x1
−x1
(I used Anstee’s rule with x before y) x enters and x3 leaves.
x0
x2
x
w
= 1/2
= 5/2
= 3/2
= −1/2
+(1/4)x3
−(1/4)x3
−(1/4)x3
−(1/4)x3
+(5/4)y
+(15/4)y
+(3/4)y
−(5/4)y
+(3/4)x1
+(5/4)x1
+(1/4)x1
−(3/4)x1
We are at optimality with w = −1/2. Thus we cannot drive x0 to 0. Using the magic
coefficients, the negatives of the coefficients of the slack variables x1 , x2 , x3 , namely 43 , 0, 14 we
apply these to the three inequalities:
1
3
(−x + 2y ≤ −2) + 0(−2x − y ≤ −1) + (+3x − y ≤ 4)
4
4
to get the contradiction to y ≥ 0:
−1
.
2
Thus the three inequalities only yield solutions with y < 0.
(5/4)y ≤
2. We can read off the optimal dual solution as the negative of the coefficients of the slack
variables (alternatively as cTB B −1 ) and so (0, 1, 0). We can verify that this solution is optimal
to the dual by checking if this dual solution is feasible, if the primal solution is feasible, and
then checking that they have the same values for their respective objective functions. We
appeal to Weak Duality as our proof that we have optimality.
3. The dual of an LP in standard inequality form can be defined as follows:
max
(primal)LP :
c·x
Ax ≤ b
x≥0
min
dual LP :
b·y
A y≥c
y≥0
T
where A is an m × n matrix, c is n × 1, b is m × 1, x is n × 1, y is m × 1. Note how inequalities
in the primal become variables in the dual and how variables in the primal correspond to
inequalities in the dual. In particular the dual of
LP 1 max
x1 +2x2 +3x3
4x1 +5x2 +6x3 ≤ 7
8x1 +9x2 +10x3 ≤ 11
x1 , x2 , x3 ≥ 0
is
LP 2 min 7y1 +11y2
4y1 +8y2 ≥ 1
5y1 +9y2 ≥ 2
6y1 +10y2 ≥ 3
y1 , y2 ≥ 0
a) First we transform LP3 into standard inequality form and call in LP7. We must replace the
equality by two inequalities and substitute x2 = x02 − x002 where x02 , x002 ≥ 0.
LP 7 max
+4x02
−7x02
+7x02
+2x02
−4x002
+7x002 ≤
6
−7x002 ≤ −6
5
−2x002 ≤
x1 , x02 , x002 ≥ 0
6z1 −6zx2
3z1 −3z2
−7z1 +7z2
7z1 −7z2
+5z3
+6x3 ≥
2
+2z3 ≥
4
−2z3 ≥ −4
z1 , z2 , z3 ≥ 0
2x1
3x1
−3x1
6x1
The dual of an LP7 is:
LP 8 min
Now we can see that LP8 equivalent to LP4 by combining the last two inequalities into the
equivalent equality −7z1 + 7z2 + 2z3 = 4 and using the variable substitutions z1 − z2 = y1
and z3 = y2 so that y1 is unconstrained and y2 ≥ 0.
In general our transformations may have affected the value of the objective function when we
replace z by −z (going from a min to a max) or when we delete a constant. But this does
not occur in this problem.
b) We proceed as above transforming LP5 into LP9
LP 9 max a · x +b · y0 −b · y00
Ax +By0 −By00 ≤ c
−Ax −By0 +By00 ≤ −c
Cx +Dy0 −Dy00 ≤ d
x, y0 , y00 ≥ 0
The dual LP10 is
LP 10 min
c · z0
A T z0
B T z0
−B T z0
−c · z00
−AT z00
−B T z00
+B T z00
+d · t
+C T t ≥ a
+DT t ≥ b
−DT t ≥ −b
z0 , z00 , t ≥ 0
We can see that LP10 can be obtained from LP6 by realizing that the inequalities B T z0 −
B T z00 +DT t ≥ b and −B T z0 +B T z00 −DT t ≥ −b yields the equalities B T z0 −B T z00 +DT t = b
and then we replace z0 − z00 = z and have that each variable in z is free.
4. We say a set C of points in Rn is convex
segment joining x and y are in C. Thus C
λ ∈ (0, 1). then λx + (1 − λ)y ∈ C. Let A
Show that
F = {x ∈ Rn
if for every pair x, y ∈ C, all points on the line
is a convex set if for every pair x, y ∈ C and any
be an m × n matrix and b a given vector in Rm .
: Ax ≤ b,
x ≥ 0}
is a convex set. When you begin to think of this problem you should understand that λa +
(1 − λ)b for λ ∈ [0, 1] is a weighted average of a and b and the set {λu + (1 − λ)v : λ ∈
[0, 1]} = {v + λ(u − v) : λ ∈ [0, 1]} is the line segment joining u and v.
We check that for λ ∈ [0, 1], that λ ≥ 0 and (1 − λ) ≥ 0. Let x.y ∈ F . Then we have Ax ≤ b,
x ≥ 0, Ay ≤ b and y ≥ 0.
We note that if u, v are vectors and c ≥ 0 a scalar, then if u ≥ v, we have cu ≥ cv. You
can check entry by entry to see this. Now x ≥ 0 implies λx ≥ λ0 = 0 and y ≥ 0 implies
(1 − λ)y ≥ (1 − λ)0 = 0. Then λx + (1 − λ)y ≥ 0. Also Ax ≤ b implies A(λx) = λ(Ax) ≤ λb
and Ay ≤ b implies A((1 − λ)y) = (1 − λ)(Ay) ≤ (1 − λ)b. Then we obtain
A(λx + (1 − λ)y) = A(λx) + A((1 − λ)y) ≤ λb + (1 − λ)b = b
We now conclude (λx + (1 − λ)y ∈ F and so F is convex.
5. Consider an LP: max c · x such that Ax ≤ b and x ≥ 0. Assume the LP has two optimal
solutions u and v. Show that for any choice of λ ∈ [0, 1] (i.e. 0 ≤ λ ≤ 1), that λu + (1 − λ)v
is also an optimal solution.
By the previous question, λu + (1 − λ)v is a feasible solution to the LP. Since u and v are
both optimal, then c · u = c · v. We compute
c · (λu + (1 − λ)v) = λc · u + (1 − λ)c · v = (λ + (1 − λ))c · u = c · u
using c · u = c · v. We conclude that λu + (1 − λ)v is an optimal solution since it is feasible
and has the appropriate value of the objective function.
6. Consider an LP: max c · x such that Ax ≤ b and x ≥ 0. Assume the LP is unbounded
namely there is a parametrized set of feasible solutions z(t) = y + tu for some choice of y, u
where
lim c · z(t) = ∞
t→∞
(this is what our simplex algorithm spits out.) Show that this means Au ≤ 0 and c · u > 0.
To show that u ≥ 0 assume that it is not true that u ≥ 0 and hence assume that there is
some index j such that the jth entry of u is strictly negative, namely uj < 0. But if we let
yj denote the jth entry of y then the jth entry of z(t) is yj + tuj . We note that yj + tuj < 0
for t > −yj /uj . This is a contradiction to the assertion z(t) ≥ 0 for all t ≥ 0. We conclude
u ≥ 0.
Similarly we can do the same to prove Au ≤ 0. In particular Az(t) = A(y + tu) = Ay + tAu.
Thus Az(t) ≤ b implies (b − Ay) + t(−Au) ≥ 0. As before if we assume Au ≤ 0 is not true
and hence assume −Au ≥ 0 is not true, we will obtain a contradiction. Now if −Au ≥ 0 is
not true then one of the inequalities is violated. We follow the above argument with b − Ay
now replacing y and −Au replacing u. As a result of the contradiction we conclude that
Au ≤ 0.
We are asked to show that limt→∞ c · z(t) → ∞ if and only if c · u > 0. We can tackle this
more directly. We note c · z(t) = c · (y + tu) = c · y + tc · u. We have that c · y is a constant.
Thus
lim c · z(t) = c · y + c · u lim t
t→∞
t→∞
Thus the limit is ∞ if and only if and only if c · u > 0. I’m using what you know about
limt→∞ (a + tb) = ∞.
Additionally we are asked to show that if there is a feasible solution z to an LP {max c · x
such that Ax ≤ b and x ≥ 0}, and a vector v with v ≥ 0, Av ≤ 0 and c · v > 0, then the
LP is unbounded.
Our hypothesis also ensures Az ≤ b and z ≥ 0. We now set w(t) = z + tv. We verify that
w(t) is feasible for t ≥ 0.
A(w(t)) = A(z + tv) = Az + tAv ≤ b + 0 = b
since Az ≤ b and Av ≤ 0 and so tAv ≤ 0 for t ≥ 0. Similarly w(t) = z + tv ≥ 0 since z ≥ 0
and v ≥ 0 so tv ≥ 0 for t ≥ 0. Finally
lim c · w(t) = lim c · z + t(c · v) = c · x + c · v lim t = ∞
t→∞
t→∞
t→∞
using c · v > 0.
Comment: It would have been helpful to avoid using z since it might be confused with z, the
objective function. But this doesn’t change the mathematics.
Download