Beruflich Dokumente
Kultur Dokumente
Part 1: Optimization
Alejandro Garcés
April 8, 2019
Learning outcomes
2
Unconstrained Optimization
3
Nomenclature
Optimization problem
Minimize f (x)
x
Example:
f (x) = (x − 5)2
min f (x) = 0
argminf (x) = 5
4
Some properties
5
Continuous and discontinuous functions
f (x) = x2 + 5
Example 2:
10 x<0
f (x) = x2 0≤x≤5
x+1 x>5
6
Discrete/binary functions
Example 1
1 2
minf (x) = x −
x 2
x∈Z
Example 2
7
Local and global optimum
Local optimum
global optimum
(a) (b)
8
What makes a problem difficult?
x1
x2
ΩA ΩB
x2 x1
Convex set
9
Continuous problems (derivative)
f (x̃ ± t) ≥ f (x̃)
if t > 0, then
f (x̃ + t) − f (x̃)
f 0 (x̃) = lim ≥0
t→0+ t
if t < 0 then
f (x̃ + t) − f (x̃)
f 0 (x̃) = lim ≤0
t→0− t
10
In several variables
g(t) ≥ g(0)
f (x̃ + t∆x) ≥ f (x̃)
meaning that
11
Min or Max ?
400
300
200 Max
f (x)
100
−100 Min
−200
1 2 3 4 5 6 7 8 9
x
12
Second derivative
1
f (x) = f (x̃) + ∇f (x̃)T (x − x̃) + (x − x̃)T Hf (x̃)(x − x̃)
2
If ∇f (x̃) = 0 and Hf (x̃) 0 then
1
f (x) = f (x̃) + (x − x̃)T Hf (x̃)(x − x̃)
2
f (x) ≥ f (x̃)
13
Examples
14
Minimum in a compact set
Example 1
min f (x) = x2
3 ≤ x ≤ 10
Example 2
min f (x, y) = x2 + y 2 − 2x − 4y
x≥0
y≥0
x≤y
15
Lagrange multipliers
min f (x, y) = x + y
x2 + y 2 = 1
L(x, y, λ) = x + y + λ(1 − x2 − y 2 )
16
Lagrange multipliers
min f (x, y, z) = x + y + z
x2 + y 2 + z 2 = 1
2x + 3y + z = 5
17
Geometrical interpretation
min f (x)
g(x) = a
Lagrangian
L(x, λ) = f (x) + λT g(x)
then
∇f (x̃) = −λT ∇g(x̃)
The gradient of f is parallel to the gradient of g
18
Economical interpretation
min f (x)
g(x) = a
∇f (x̃) + λT ∇g(x̃) = 0
g(x̃) = a
then
∂L T ∂x
= ∇f (x)
∂a ∂a
T
∂λ T T ∂x
+ (g(x) − a) + λ ∇g(x) −1
∂a ∂a
∂L(x̃)
= −λ
19
∂a
Have fun with Python
20
Bibliography
21