Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MATH3161/MATH5165 – Optimization
Prof Jeya Jeyakumar
✞ ☎
Topic 01 – Optimization – What is it? ✆
✝
What is optimization?
Definition 1 (Optimization/Optimisation)
Optimization is a process that finds the “best” possible solutions from a
set of feasible solutions. When you optimize something, you are “making
it best”.
Mathematics of Optimization–Outline
Mathematical model
Variables
Objective
Constraints
Characterising optima ⇐⇒ Optimality principles
What is an optimum/optimizer?
Formulae for identifying/characterizing optima
Derivatives I Newton (1642 – 1726), G W Leibniz (1646 – 1711)
Analytic methods for finding optima
Fermat (1601 – 1665), L Euler (1707 – 1783), Lagrange (1736 – 1813)
Finding optima =⇒ Numerical methods
Newton’s method: I Newton (1642 – 1726), C F Gauss (1777 – 1855)
Linear programming: L Kantorovich (1912 – 1986), G B Dantzig (1914 – 2005)
Computer algorithms Linear algebra
Convexity R T Rockafellar (1938 – )
Duality J von Neumann (1903 – 1957)
Maximum principle L S Pontryagin (1908-1988)
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 4 / 30
Optimization Variables
Variables
Objective
A mathematical function of the variables quantifying the idea of “best”.
Finite dimensional: variables x ∈ Rn , Objective function f : Rn → R
Linear f (x) = gT x, g ∈ Rn fixed
Affine f (x) = gT x + f0 , g ∈ Rn , f0 ∈ R fixed
Quadratic f (x) = 21 xT Gx + gT x + f0 , G ∈ Rn×n , g ∈ Rn , f0 ∈ R
Infinite dimensional: f : C([0, T ] → R, variables u ∈ C([0, T ])
Z T
f (u) = u(t)dt
0
Constraints
Constraints: Describe restrictions on the allowable values of variables
Constraint structure for variables x ∈ Rn
Equality constraints ci (x) = 0, i = 1, . . . , mE
Inequality constraints ci (x) ≤ 0, i = mE + 1, . . . , m
Feasible region Ω ⊂ Rn
Ω = {x ∈ Rn : ci (x) = 0, i = 1, . . . , mE ;
ci (x) ≤ 0, i = mE + 1, . . . , m}
Unconstrained problem ⇐⇒ Ω = Rn
Standard formulation ĉi (x) ≥ 0 ⇐⇒ −ĉi (x) ≤ 0
Algebraic structure of constraints
Simple bounds: ℓ ≤ x ≤ u ⇐⇒ ℓi ≤ xi ≤ ui , i = 1, . . . , n
Linear constraints ci (x) = aTi x − bi
Nonlinear constraints
Constraint representation
Example 3 (Constraint representation)
What feasible regions do the following constraints represent?
p
(x1 − a1 )2 + (x2 − a2 )2 = r
p
(x1 − a1 )2 + (x2 − a2 )2 ≤ r
p
(x1 − a1 )2 + (x2 − a2 )2 ≥ r
x2 = x21
x2 ≥ x21
x21 − 1 = 0
Standard formulation
Minimize f (x)
x ∈ Rn
subject to ci (x) = 0, i = 1, . . . , mE ;
ci (x) ≤ 0, i = mE + 1, . . . , m
Conversions
Maximize to minimize: max fˆ(x) = − min −fˆ(x)
Constraint right-hand-side: ĉi (x) = bi ⇐⇒ ĉi (x) − bi = 0
Less than or equal to inequalities: ĉi (x) ≥ 0 ⇐⇒ −ĉi (x) ≤ 0
Strict inequality: ĉi (x) < 0 ⇐⇒ ĉi (x) + ǫ ≤ 0, some ǫ > 0
x3
x1
x2
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 11 / 30
Optimization Standard formulation
Ω = {x ∈ R2 : x2 ≥ x21 , x1 ≤ 1, x2 ≤ 2 + x1 , x2 ≤ 4 − x1 }
Write this problem in standard form and plot the feasible region Ω.
What is the feasible region if the first constraint becomes x2 = x21 ?
4
3.5
2.5
1.5
0.5
Cauchy-Schwarz Inequality
An important property connecting the dot product of two vectors and their
norms is the Cauchy-Schwarz inequality:
f (x) = kxk2 ,
1.6
1.4
1.2
f(x) 1
0.8
0.6
0.4
0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 17 / 30
Mathematical background Optima and optimizers
Existence
Definition 20 (Extrema)
The global/local extrema of f over Ω are all the global/local minima and
all the global/local maxima
Example 21 (Existence)
Find the global extrema, if they exist, for the following problems
f (x) = e−x on Ω = [0, 1]
f (x) = e−x on Ω = [0, ∞)
f (x) = sin x on Ω = [0, 2π)
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 19 / 30
Mathematical background Relaxation
Relaxation
Proposition 2 (Relaxation)
If f : Rn → R and Ω̄ ⊆ Ω then
Thus, the minimum value of the relaxation problem ≤ the minimum value of the
original problem.
Proof.
Let x∗ ∈ Ω̄ and f (x∗ ) be the global minimizer and minimum of f over Ω̄.
As Ω̄ ⊆ Ω, x∗ ∈ Ω̄ =⇒ x∗ ∈ Ω. Thus, minx∈Ω f (x) ≤ f (x∗ ).
If you make the feasible region larger then the minimum value of
objective function must not increase
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 20 / 30
Mathematical background Derivatives
Gradients
Definition 22 (Gradient)
Let f : Rn → R be continuously differentiable.
The gradient ∇f : Rn → Rn of f at x is
∂f (x)
∂x1
∂f (x)
∇f (x) =
∂x2
..
.
∂f (x)
∂xn
Hessians
Definition 23 (Hessian)
Let f : Rn → R be continuously differentiable. The Hessian
∇2 f : Rn → Rn×n of f at x is
∂ 2 f (x) ∂ 2 f (x) 2
· · · ∂∂xf1(x)
∂x21 ∂x1 x2 xn
2
∂ f (x) ∂ 2 f (x) · · · ∂ 2 f (x)
∂x2 x1 ∂x22 ∂x2 xn
∇2 f (x) = . . ..
.. .. . ..
2 .
∂ f (x) 2
∂ f (x) 2
∂ f (x)
∂xn x1 ∂xn x2 · · · ∂x2 n
c1 (x) = −x21 + x2 ,
c2 (x) = −x1 + 1,
c3 (x) = −x1 + x2 − 2,
c4 (x) = −x1 − x2 + 4.
Example 1 – Plots
2 2 2
x + (x −1) (x −3) + x /2
1 2 2 2
9
6
3.6
3 4
3.1
2
1.5
1.75
2.6
2
2.1 2.5
x
2 1.75 2
1.6
2
1 1.25
1.5
1.1
2.5 0.75
0.5
0.6
4 3
6
0.1 9
15
21
−0.4
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
x1
Solution 26 n
X
T
f (x) = g x + f0 = gi xi + f0
i=1
∇f (x) = g, does not depend on x
∇2 f (x) = 0 ∈ Rn×n , n by n zero matrix
X n
n X n
X
f (x) = 12 xT Gx + gT x + f0 = 1
2 xi Gij xj + gi xi + f0
i=1 j=1 i=1
∇f (x) = Gx + g
∇2 f (x) = G, does not depend on x
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 26 / 30
Mathematical background Positive definite matrices
Definition 27
A real square matrix A ∈ Rn×n is
positive definite ⇐⇒ xT Ax > 0 for all x ∈ Rn , x 6= 0
positive semi-definite ⇐⇒ xT Ax ≥ 0 for all x ∈ Rn
negative definite ⇐⇒ xT Ax < 0 for all x ∈ Rn , x 6= 0
negative semi-definite ⇐⇒ xT Ax ≤ 0 for all x ∈ Rn
indefinite ⇐⇒ there exist x0 , y0 ∈ Rn : x0 T Ax0 > 0 and
y0 T Ay0 < 0
Proposition 4
A symmetric matrix A ∈ Rn×n is positive definite if and only if all the
principal minors, ∆i , i = 1, 2, . . . , n of A are positive
If, however, ∆i , i = 1, 2, . . . , n has the sign of (−1)i , i = 1, 2, . . . , n
(i.e. the values of ∆i are alternatively negative and positive), then
the matrix A is negative definite.
Example 29
3 −3 −3 3
(a) (b)
−3 5 3 −5
xT Ax = 0 ⇐⇒ y = 0 ⇐⇒ Rx = 0 ⇐⇒ x = 0.
Matlab chol
MATH3161/MATH5165 (Optimization) H01 – Optimization – What is it? Session 1, 2018 30 / 30