You are on page 1of 7

IND E 513 Homework 1 Solutions

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

fi (x + (1 )y) fi (x) + (1 )fi (y), i = 1, 2, . . . , m,


for x, y Rn and [0, 1]. Adding these m inequalities together we get
f (x + (1 )y) =

m
X

fi (x + (1 )y)

i=1

m
X

fi (x) + (1 )

i=1

m
X

fi (y) = f (x) + (1 )f (y),

i=1

implying that f is convex.


(1.2b) Now suppose that fi (x) is piecewise linear and convex. Then f (x) =

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

max (a0ji x + bji )

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.

Figure 1: Sum of two piecewise linear functions, f1 has n1 = 2 and f2 has n2 = 3.

(1.5a) Two different formulations are:


(A)

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

Figure 2: A nonconvex example using absolute values.

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

Problem 4 Problem 1.16 from the textbook.


Let x1 be the level at which process 1 is run, x2 be the level at which process 2 is run and x3 be
the level at which process 3 is run. The net revenue, in this problem, includes the money from the
gasoline and heating oil sold, minus the costs, that is,
38(4x1 + x2 + 3x3 ) + 33(3x1 + x2 + 4x3 ) 51x1 11x2 40x3 .
Then the net revenue maximization problem can be formulated as follows:
max 200x1 + 60x2 + 206x3
3x1 + x2 + 5x3 8M
5x1 + x2 + 3x3 5M
x1 , x2 , x3 0.
Problem 5 Consider the linear program
P (A, b, c)

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)

Similarly, x is optimal to P (A, b, c) and x is feasible to P (A, b, c). Therefore,


c0 x c0 x.

(2)

Now observe that


(
c c)0 (
x x) = c0 x c0 x c0 x + c0 x = (
c0 x c0 x) + (
c0 x c0 x) 0,
where the last inequality follows from inequalities (1) and (2). By the definition of inner product,
x y = ||x||||y|| cos , if x y 0, then cos 0, and 90 270 . Since the inner product
of (
c c) and (
x x) is non-positive, the angle between them is at least 90 , and no more than 270 .
Problem 6 Postal workers at the local post office are scheduled for 5 days on followed by 2 days
off, and this schedule is repeated every week. Thus, a worker has the same two days off each week,
and these days are consecutive. The demand for workers is given in the table below. This demand
must be met or exceeded on each day (These numbers represent the total number of workers who
are working that day). The cost of employing a worker is $275 per weekday, $300 on a Saturday,
and $325 on Sunday. (Hint: Read scheduling example on pages 11-12.)
Day
Mon Tue
Demand 17
13

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

Now we can formulate the objective function as follows:


min

275[(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 )]
+300(x2 + x3 + x4 + x5 + x6 ) + 325(x3 + x4 + x5 + x6 + x7 )

and adding terms yields


min

1375x1 + 1400x2 + 1450x3 + 1450x4 + 1450x5 + 1450x6 + 1425x7 .

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

Problem 7 Consider the following simple linear program:


min c1 x1 + c2 x2 + c3 x3
x1 + x2 1
x1 + 2x2 3
x1 0, x2 0, x3 0
Find the optimal value and the set of optimal solutions for the following values of c: c = (1, 0, 1),
c = (0, 1, 0) and c = (0, 0, 1).
First, note that x3 0 is the only constraint on x3 . Therefore, when c3 = 1, x3 = 0 without loss
of optimality. Hence, when c = (1, 0, 1), the linear program reduces to
minimize x1
x1 + x2
x1 + 2x2
x1
x2
6

1
3
0
0.

!$#
%&'"()*#
%&'"*#

%"'&*#

!"#

%+'&*#

Figure 3: Feasible region for the first two cases in Problem 7.

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.

You might also like