CS599: Convex and Combinatorial Optimization Fall 2013 Lectures 5-6: Convex Functions
CS599: Convex and Combinatorial Optimization Fall 2013 Lectures 5-6: Convex Functions
CS599: Convex and Combinatorial Optimization Fall 2013 Lectures 5-6: Convex Functions
Fall 2013
Lectures 5-6: Convex Functions
1 Convex Functions
3 Convexity-Preserving Operations
Convex Functions
A function f : Rn → R is convex if the line segment between any points
on the graph of f lies above f . i.e. if x, y ∈ Rn and θ ∈ [0, 1], then
52 f (x) 0
for all x.
52 f (x) 0
for all x.
Intepretation
Recall definition of PSD: z | 52 f (x)z > 0 for all z ∈ Rn
At x + δ~z, infitisimal change in gradient is in roughly in the same
direction as ~z
Graph of f curves upwards along any line
When n = 1, this is f 00 (x) ≥ 0.
Epigraph Definition
f is a convex function if and only if its epigraph is a convex set.
Local minimum
x is a local minimum of f if there is a an open ball B containing x
where f (y) ≥ f (x) for all y ∈ B.
Local minimum
x is a local minimum of f if there is a an open ball B containing x
where f (y) ≥ f (x) for all y ∈ B.
p
Level sets of f (x, y) = x2 + y 2
Sublevel set
The α-sublevel set of f is {x ∈ domain(f ) : f (x) ≤ α}.
p
Level sets of f (x, y) = x2 + y 2
Sublevel set
The α-sublevel set of f is {x ∈ domain(f ) : f (x) ≤ α}.
Fact
Every sub-level set of a convex function is a convex set.
p
Level sets of f (x, y) = x2 + y 2
Sublevel set
The α-sublevel set of f is {x ∈ domain(f ) : f (x) ≤ α}.
Fact
Every sub-level set of a convex function is a convex set.
Continuity
Convex functions are continuous.
Continuity
Convex functions are continuous.
Extended-value extension
If a function f : D → R is convex on its domain, and D is convex, then
it can be extended to a convex function on Rn . by setting f (x) = ∞
whenever x ∈ / D.
S
This simplifies notation. ResultingSfunction fe : D → R ∞ is “convex”
with respect to the ordering on R ∞
1 Convex Functions
3 Convexity-Preserving Operations
Functions on the reals
Affine: ax + b
Exponential: eax convex for any a ∈ R
Powers: xa convex on R++ when a ≥ 1 or a ≤ 0, and concave for
0≤a≤1
Logarithm: log x concave on R++ .
Max
maxi xi is convex
1 Convex Functions
3 Convexity-Preserving Operations
Nonnegative Weighted Combinations
If f1 , f2 , . . . , fk are convex, and w1 , w2 , . . . , wk ≥ 0, then
g = w1 f1 + w2 f2 . . . + wk fk is convex.
proof (k = 2)
x+y x+y x+y
g = w1 f1 + w2 f2
2 2 2
f1 (x) + f1 (y) f2 (x) + f2 (y)
≤ w1 + w2
2 2
g(x) + g(y)
=
2
R
Extends to integrals g(x) = y w(y)fy (x) with w(y) ≥ 0, and therefore
expectations Ey fy (x).
R
Extends to integrals g(x) = y w(y)fy (x) with w(y) ≥ 0, and therefore
expectations Ey fy (x).
Worth Noting
Minimizing the expectation of a random convex cost function is also a
convex optimization problem!
A stochastic convex optimization problem is a convex optimization
problem.
Average Distance
k customers located at y1 , y2 , . . . , yk ∈ Rn
n
Pa 1facility at x ∈ R , average distance to a customer is
If I place
g(x) = i k ||x − yi ||
Average Distance
k customers located at y1 , y2 , . . . , yk ∈ Rn
n
Pa 1facility at x ∈ R , average distance to a customer is
If I place
g(x) = i k ||x − yi ||
Proof
(x, t) ∈ graph(g) ⇐⇒ t = g(x) = f (Ax+b) ⇐⇒ (Ax+b, t) ∈ graph(f )
Proof
(x, t) ∈ graph(g) ⇐⇒ t = g(x) = f (Ax+b) ⇐⇒ (Ax+b, t) ∈ graph(f )
(x, t) ∈ epi(g) ⇐⇒ t ≥ g(x) = f (Ax + b) ⇐⇒ (Ax + b, t) ∈ epi(f )
Proof
(x, t) ∈ graph(g) ⇐⇒ t = g(x) = f (Ax+b) ⇐⇒ (Ax+b, t) ∈ graph(f )
(x, t) ∈ epi(g) ⇐⇒ t ≥ g(x) = f (Ax + b) ⇐⇒ (Ax + b, t) ∈ epi(f )
epi(g) is the inverse image of epi(f ) under the affine mapping
(x, t) → (Ax + b, t)
Convexity-Preserving Operations 16/24
Examples
||Ax + b|| is convex
max(Ax + b) is convex
| | |
log(ea1 x+b1 + ea2 x+b2 + . . . + ean x+bn ) is convex
\
epi g = epi f1 epi f2
Convexity-Preserving Operations 18/24
Example: Robust Facility Location
Maximum Distance
k customers located at y1 , y2 , . . . , yk ∈ Rn
If I place a facility at x ∈ Rn , maximum distance to a customer is
g(x) = maxi ||x − yi ||
Maximum Distance
k customers located at y1 , y2 , . . . , yk ∈ Rn
If I place a facility at x ∈ Rn , maximum distance to a customer is
g(x) = maxi ||x − yi ||
Maximum Distance
k customers located at y1 , y2 , . . . , yk ∈ Rn
If I place a facility at x ∈ Rn , maximum distance to a customer is
g(x) = maxi ||x − yi ||
Worth Noting
When a convex cost function is uncertain, minimizing the worst-case
cost is also a convex optimization problem!
A robust (in the worst-case sense) convex optimization problem is
a convex optimization problem.
Convexity-Preserving Operations 19/24
Other Examples
Maximum eigenvalue of a symmetric matrix A is convex in A
max {v | Av : ||v|| = 1}
Proof (for C = Rk )
epi g is the projection of epi f onto hyperplane y = 0.
f (x, y) = x2 + y 2 g(x) = x2
Convexity-Preserving Operations 21/24
Example
Distance from a convex set C
Proof (n = k = 1)
f 00 (x) = h00 (g(x))g 0 (x)2 + h0 (g(x))g 00 (x)
Proof
epi g is inverse image of epi f under the perspective function.