INDE 513 hw1 Sol
INDE 513 hw1 Sol
INDE 513 hw1 Sol
Problem 1 Problem
1.2 from the textbook.
m
P
(1.2a) Let f (x) =
fi (x). Since function fi , i = 1, 2, . . . , m are convex we have
i=1
m
X
fi (x + (1 )y)
i=1
m
X
fi (x) + (1 )
i=1
m
X
i=1
m
P
fi (x) is convex by
i=1
part (a). We need to show that f (x) is also piecewise linear. Each piecewise linear function fi (x)
can be expressed as
fi (x) = max (a0ji x + bji ).
ji =1,...,ni
Then,
f (x) =
m
X
fi (x)
i=1
m
X
i=1
ji =1,...,ni
max
k=1,...,n1 n2 nm
ak 0 x + bk
where the max is over all n1 n2 nm possible combinations, and ak is the sum of aji for
one such combination, and bk is the sum of bji for that combination. Therefore f (x) is piecewise
linear.
It is easier to see with just two functions. Consider two piecewise linear functions; f1 has n1 = 2
and f2 has n2 = 3. See Figure 1 to illustrate the six combinations with breakpoints.
Problem 2 Problem 1.5 from the textbook.
Consider the following linear program with absolute values
(ORIG)
minimize
subject to
c0 x + d 0 y
Ax + By b
yi = |xi | , i.
minimize
subject to
c0 x + d 0 z
Ax + Bz b
xi zi , i
xi zi , i.
and
(B)
minimize
subject to
c0 x + c0 x + d 0 x + + d 0 x
Ax+ Ax + Bx+ + Bx b
x+ , x 0. (Assume x+ x = 0.)
(1.5b) Let (x, y) be a feasible solution to (ORIG). Then let z = y, and (x, z) is feasible to (A).
2
Also, c0 x+d0 y = c0 x+d0 z so the cost functions are equal, and hence if (x, y) is optimal to (ORIG),
its counterpart (x, z) is optimal to (A). Similarly, let x+ = max(x, 0) and x = max(x, 0). Then
if (x, y) is a feasible solution to (ORIG), (x+ , x ) is feasible to (B). Their cost functions are also
equal, so if (ORIG) is feasible, then all three formulations are feasible and have the same optimal
cost.
Suppose (ORIG) is infeasible. If (A) has a feasible solution (x, z) then xi zi and xi zi , and
thus |xi | zi . Thus, Ax + B|x| Ax + Bz b (with B 0). This means that letting z = y
would provide a feasible solution to (ORIG), however (ORIG) is infeasible, so (A) must also be
infeasible. Similarly, (B) is infeasible if (ORIG) is infeasible. Hence, the three formulations are
equivalent.
(1.5c) As a counterexample, consider the following problem:
minimize
subject to
x
y 1
y = |x|
The constraint y 1 is the same as y 1, and graphing shows that the feasible region is
disconnected (nonconvex). Also, x = 1 is a locally optimal solution (small and feasible changes
in x cannot improve the objective), but the optimal objective is (unbounded below), and no
global optimal solution exists.
Another problem with a nonconvex feasible region is:
minimize 2x1 x2 subject to 3x1 + 3x2 + 2|x1 | 2|x2 | 10.
The point (0, 10) is a local optimum, but the problem is unbounded; the objective function
as x1 +. See Figure 2.
Problem 3 Problem 1.6 from the textbook.
As in Section 1.3, consider a rocket that travels along a straight path, and let xt , vt and at be the
position, velocity, and acceleration, respectively, of the rocket at time t. The acceleration at is
under our control, as it is determined by rocket thrust.
The first alternative is to minimize the total fuel spent, which can be formulated as:
minimize
TP
1
zt
t=0
subject to
xt+1 = xt + vt
vt+1 = vt + at
at zt
at zt
x0 = 0
v0 = 0
xT = 1
vT = 0.
3
for
for
for
for
t = 0, 1, . . . , T
t = 0, 1, . . . , T
t = 0, 1, . . . , T
t = 0, 1, . . . , T
1
1
1
1
The second alternative is to minimize the maximum thrust required, which can be formulated as:
minimize
subject to
z
xt+1 = xt + vt
vt+1 = vt + at
at z
at z
x0 = 0
v0 = 0
xT = 1
vT = 0.
for
for
for
for
t = 0, 1, . . . , T
t = 0, 1, . . . , T
t = 0, 1, . . . , T
t = 0, 1, . . . , T
1
1
1
1
min c0 x
Ax = b
x 0.
4
Suppose x is an optimal solution of P (A, b, c). Now consider the following modification of P (A, b, c).
min c0 x
Ax = b
x 0.
P (A, b, c)
Note that the only difference between the above two problems is in their objective functions. Suppose x is an optimal solution of P (A, b, c). Let be the angle between vectors (
c c) and (
x x).
0
Explain why is at least 90 . (Hint: recall from undergraduate courses how the inner product of
two vectors relates to the angle between them.)
We are given that x is optimal to P (A, b, c) and x is optimal to P (A, b, c). Because the constraints
are identical, we know that x is feasible to P (A, b, c). Therefore,
c0 x c0 x.
(1)
(2)
Wed
15
Thu Fri
19
14
Sat Sun
16
11
Formulate a linear program that will minimize the total cost of employing postal workers satisfying
the above demand. (In practice, your formulation should be an integer program but you can ignore
that for now.)
Let xi be the number of workers starting work on the ith day (assume Monday is the first, Tuesday
is the second,..., Sunday is the 7th). The following table is a way to visualize the shifts worked by
someone starting on the ith day.
Day
Mon Tue
Mon.shift
x1
x1
Tues.shift
x2
Wed.shift
Thurs.shift x4
Fri.shift
x5
x5
Sat.shift
x6
x6
Sun.shift
x7
x7
Wed
x1
x2
x3
x6
x7
Thu Fri
x1
x1
x2
x2
x3
x3
x4
x4
x5
Sat Sun
x2
x3
x4
x5
x6
x7
x3
x4
x5
x6
x7
The constraints ensure that demand is met each day of the week:
x1 + x4 + x5 + x6 + x7
x1 + x2 + x5 + x6 + x7
x1 + x2 + x3 + x6 + x7
x1 + x2 + x3 + x4 + x7
x1 + x2 + x3 + x4 + x5
x2 + x3 + x4 + x5 + x6
x3 + x4 + x5 + x6 + x7
xi
17
13
15
19
14
16
11
0, i = 1, 2, , 7
1
3
0
0.
!$#
%&'"()*#
%&'"*#
%"'&*#
!"#
%+'&*#
The feasible region for this problem is shown in Figure 3. The optimal value of this problem is 3
and is attained at x1 = 3, x2 = 0. Therefore, for c = (1, 0, 1), the optimal value of the original
linear program is also 3 and the optimal solution set is the singleton {(3, 0, 0)}.
Now, when c = (0, 1, 0), the original linear program reduces to
minimize x2
x1 + x2
x1 + 2x2
x1
x2
1
3
0
0.
The feasible region for this problem is also as in Figure 3. The optimal value of this problem is
0 and is attained at all points of the form (x1 , 0) with 1 x1 3. Therefore, the optimal value
of the original problem is also 0 and the optimal solution set is {x R3 |1 x1 3, x2 = 0, x3 0}.
On the other hand, when c = (0, 0, 1), the original linear program reduces to
minimize x3
x1 + x2
x1 + 2x2
x1
x2
x3
1
3
0
0
0.
In this case, notice that we can make the objective function value arbitrarily small by choosing
arbitrarily large values of x3 . Thus, the optimal value is unbounded below, , and the optimal
solution set is empty.