HW 2 Sol
HW 2 Sol
Prof. S. Boyd
"
x1 x2
x2 x3
x1 x2 x3
x2 x4 x5 .
x3 x5 x6
x1 x3 x22 0.
x3 0,
x4 0,
x1 x4 x22 0,
x6 0,
x4 x6 x25 0,
x1 x6 x23 0
and
x1 x4 x6 + 2x2 x3 x5 x1 x25 x6 x22 x4 x23 0,
i.e., all principal minors must be nonnegative.
We give the proof for n = 3, assuming the result is true for n = 2. The matrix
x1 x2 x3
X = x2 x4 x5
x3 x5 x6
x4 x5
x5 x6
0.
Applying the result for the 2 2-case, we conclude that if x1 = 0, X 0 if and only if
x2 = x3 = 0,
x4 0,
x6 0,
x4 x6 x25 0.
0.
x1 x6 x23 0,
x1 x6 x23 0,
We can combine the conditions for x1 = 0 and x1 > 0 by saying that all 7 principal
minors must be nonnegative.
2.33 The monotone nonnegative cone. We define the monotone nonnegative cone as
Km+ = {x Rn | x1 x2 xn 0}.
i.e., all nonnegative vectors with components sorted in nonincreasing order.
(a) Show that Km+ is a proper cone.
i=1
Solution.
(a) The set Km+ is defined by n homogeneous linear inequalities, hence it is a closed
(polyhedral) cone.
The interior of Km+ is nonempty, because there are points that satisfy the inequalities with strict inequality, for example, x = (n, n 1, n 2, . . . , 1).
To show that Km+ is pointed, we note that if x Km+ , then x Km+ only if
x = 0. This implies that the cone does not contain an entire line.
(b) Using the hint, we see that y T x 0 for all x Km+ if and only if
y1 0,
y1 + y2 0,
Therefore
= {y |
Km+
k
X
i=1
. . . , y1 + y2 + + yn 0.
yi 0, k = 1, . . . , n}.
3.2 Level sets of convex, concave, quasiconvex, and quasiconcave functions. Some level sets
of a function f are shown below. The curve labeled 1 shows {x | f (x) = 1}, etc.
3
2
1
1 2 3
Solution. The first function could be quasiconvex because the sublevel sets appear to
be convex. It is definitely not concave or quasiconcave because the superlevel sets are
not convex.
It is also not convex, for the following reason. We plot the function values along the
dashed line labeled I.
3
2
1
II
Along this line the function passes through the points marked as black dots in the
figure below. Clearly along this line segment, the function is not convex.
3
2
1
If we repeat the same analysis for the second function, we see that it could be concave
(and therefore it could be quasiconcave). It cannot be convex or quasiconvex, because
the sublevel sets are not convex.
3.5 Running average of a convex function. Suppose f : R R is convex, with R+
dom f . Show that its running average F , defined as
F (x) =
1Zx
f (t) dt,
x 0
dom F = R++ ,
f (t) dt + f (x)/x
F (x) = (2/x3 )
3
= (2/x )
x
x
f (sx) ds =
1Zx
f (t) dt.
x 0
3.6 Functions and epigraphs. When is the epigraph of a function a halfspace? When is the
epigraph of a function a convex cone? When is the epigraph of a function a polyhedron?
Solution. If the function is convex, and it is affine, positively homogeneous (f (x) =
f (x) for 0), and piecewise-affine, respectively.
3.15 A family of concave utility functions. For 0 < 1 let
u (x) =
x 1
,
1 1
= 0.
f (x) =
"
0 1
1 0
"
2/(x21 ) 1/(x1 x2 )
1/(x1 x2 )
2/x22
0
f (x) =
"
0
1/x22
1/x22 2x1 /x32
f (x) =
"
2/x2
2x1 /x22
2x1 /x22 2x21 /x32
= (2/x2 )
"
1
x1 /x2
1 x1 /x2
0.
= (det Z)
1/n
n
Y
i=1
!1/n
1/n
(1 + ti )
where i , i = 1, . . . , n, are the eigenvalues of Z 1/2 V Z 1/2 . From the last equality
we see that g is a concave function of t on {t | Z + tV 0}, since det Z > 0 and
Q
the geometric mean ( ni=1 xi )1/n is concave on Rn++ .
3.24 Some functions on the probability simplex. Let x be a real-valued random variable
which takes values in {a1 , . . . , an } where a1 < a2 < < an , with prob(x = ai ) = pi ,
i = 1, . . . , n. For each of the following functions of p (on the probability simplex
{p Rn+ | 1T p = 1}), determine if the function is convex, concave, quasiconvex, or
quasiconcave.
(f) quartile(x) = inf{ | prob(x ) 0.25}.
Solution. The sublevel and the superlevel sets of quartile(x) are convex (see
problem 2.15), so it is quasiconvex and quasiconcave.
quartile(x) is not continuous (it takes values in a discrete set {a1 , . . . , an }, so it
is not convex or concave. (A convex or a concave function is always continuous
on the relative interior of its domain.)
(g) The cardinality of the smallest set A {a1 , . . . , an } with probability 90%. (By
cardinality we mean the number of elements in A.)
Solution. f is integer-valued, so it can not be convex or concave. (A convex or
a concave function is always continuous on the relative interior of its domain.)
7
f is quasiconcave because its superlevel sets are convex. We have f (p) if and
only if
k
X
i=1
where k = max{i = 1, . . . , n | i < } is the largest integer less than , and p[i] is
P
the ith largest component of p. We know that ki=1 p[i] is a convex function of p,
P
so the inequality ki=1 p[i] < 0.9 defines a convex set.
In general, f (p) is not quasiconvex. For example, we can take n = 2, a1 = 0 and
a2 = 1, and p1 = (0.1, 0.9) and p2 = (0.9, 0.1). Then f (p1 ) = f (p2 ) = 1, but
f ((p1 + p2 )/2) = f (0.5, 0.5) = 2.
(h) The minimum width interval that contains 90% of the probability, i.e.,
inf { | prob( x ) 0.9} .
Solution. The minimum width interval that contains 90% of the probability
must be of the form [ai , aj ] with 1 i j n, because
prob( x ) =
j
X
pk = prob(ai x aj )
k=i
pk < 0.9
k=i
f (y) =
0 if y 0, 1T y = 1
otherwise.
We first verify the domain of f . First suppose y has a negative component, say
yk < 0. If we choose a vector x with xk = t, xi = 0 for i 6= k, and let t go to
infinity, we see that
xT y max xi = tyk ,
i
for all x, and therefore xT y maxi xi 0 for all x, with equality for x = 0.
Therefore f (y) = 0.
(d) Power function. f (x) = xp on R++ , where p > 1. Repeat for p < 0.
Solution. Well use standard notation: we define q by the equation 1/p+1/q = 1,
i.e., q = p/(p 1).
We start with the case p > 1. Then xp is strictly convex on R+ . For y < 0 the
function yx xp achieves its maximum for x > 0 at x = 0, so f (y) = 0. For
y > 0 the function achieves its maximum at x = (y/p)1/(p1) , where it has value
y(y/p)1/(p1) (y/p)p/(p1) = (p 1)(y/p)q .
Therefore we have
f (y) =
0
y0
q
(p 1)(y/p) y > 0.
For p < 0 similar arguments show that dom f = R+ and f (y) = pq (y/p)q .