Professional Documents
Culture Documents
Nlpguia
Nlpguia
Michel Bierlaire
Practice quiz
An investment fund is trying to determine how to invest its assets for the
following year, in order to maximize its profit. Currently, the fund has 2.5
million euros that it can invest in state bonds, real estate loans, car loans or
scholarship loans. The annual interest rates of the listed investment types
are 4% for state bonds, 6% for real estate loans, 8% for car loans and 9% for
scholarship loans.
To minimize risks, the investment fund allows only the selection of a
strategy satisfying the following restrictions:
• the amount invested in car and scholarship loans must not exceed twice
the amount invested in bonds;
• the amount invested in car loans must be larger or equal than the
amount invested in scholarship loans;
• the investment in car loans should not exceed the investment in real
estate loans by more than 70%.
3. the constraint(s).
Formulation – Modeling
Michel Bierlaire
Constraints The total amount to invest is 2.5 Me. This is modeled using
the following constraint:
xsb + xre + xcℓ + xsℓ = 2′ 500′ 000
xsℓ ≤ xcℓ .
• the investment in car loans (xcℓ ) should not exceed the investment
in real estate loans (xre ) by more than 70%:
xcℓ ≤ 1.7xre .
For your information, the optimal solution (rounded to 1/10 of euros) is:
Practice quiz
f : R2 → R : f (r, h).
πr2 h = 330.
r ≥ 0,
h ≥ 0.
subject to
πr2 h = 330,
r ≥ 0,
h ≥ 0.
Practice quiz
subject to
6x1 − x22 ≥ 1,
x21 + x22 = 3,
x1 ≥ 2,
x2 ∈ R.
Transformations
Michel Bierlaire
and
max f (x) = − min −f (x).
By applying statement (a) to our problem we obtain:
6x1 − x22 ≥ 1,
x21 + x22 = 3,
x1 ≥ 2,
x2 ∈ R.
subject to
6x1 − x22 ≥1
x21 + x22 ≤3
x21 + x22 ≥3
x1 ≥2
x2 ≥ 0.
g(x) ≤ 0 ⇐⇒ −g(x) ≥ 0.
−6x1 + x22 ≤ −1
x21 + x22 ≤3
−x21 − x22 ≤ −3
x1 ≥2
x2 ∈ R.
4. If a variable x can take any real value, it can be replaced by two non
negative artificial variables denoted by x+ and x− , such that
x = x+ − x− .
−6x1 + (x+ − 2
2 − x2 ) ≤ −1
x21 + (x+ − 2
2 − x2 ) ≤3
−x21 − (x+ − 2
2 − x2 ) ≤ −3
x1 ≥2
x+
2 ≥0
x−
2 ≥ 0.
x̂ ≥ 0.
subject to
−6(x̂1 + 2) + (x+ − 2
2 − x2 ) ≤ −1
(x̂1 + 2)2 + (x+ − 2
2 − x2 ) ≤3
−(x̂1 + 2)2 − (x+ − 2
2 − x2 ) ≤ −3
x̂1 ≥0
x+
2 ≥0
x−
2 ≥ 0.
Practice quiz
min | x1 − x2 |
subject to
x1 ≥ 0,
x2 ≥ 0.
Transformations
Michel Bierlaire
To solve this exercise, we remember that if a variable x can take any real
value, it can be replaced by two non negative artificial variables denoted by
x+ and x− , such that x = x+ − x− . We also recall that the absolute value of
x is defined as
x if x ≥ 0,
|x| =
−x if x < 0.
In our case, we have that
x1 − x2 if x1 ≥ x2 ,
|x1 − x2 | =
x2 − x1 if x1 < x2 .
Since x1 and x2 are non negative real numbers, the difference x1 − x2 can
take any real value.
Let us study the absolute value by examining the two cases:
• If x1 − x2 ≥ 0, we can define the non negative quantity
(
x1 − x2 , if x1 − x2 > 0,
y+ =
0, otherwise.
|x1 − x2 | = y + + y − .
Furthermore, if we impose that y + ≥ 0 and y − ≥ 0, we have that our
minimization problem can be written as
min (y + + y − )
x1 ,x2 ,y + ,y −
subject to
y+ ≥ x1 − x2 ,
y− ≥ x2 − x1 ,
x1 ≥ 0,
x2 ≥ 0,
y+ ≥ 0,
y− ≥ 0.
Note that this formulation is not strictly equivalent to the original one
for all feasible solutions. For instance, the feasible solution x1 = 0, x2 = 0,
y + = 1, y − = 1 has objective value 2 in the transformed problem, and 0 in
the original one.
But it is equivalent at the optimal solution. Denote the optimal solution
of the original problem (x∗1 , x∗2 ).
• If x∗1 − x∗2 > 0, the lowest possible value for y + , denoted by (y + )∗ , is
x∗1 −x∗2 (because of the constraint y + ≥ x1 −x2 ), and the lowest possible
value for y − , denoted by (y − )∗ , is 0 (because of the constraint y − ≥ 0).
Therefore, the objective function of the transformed problem at the
optimal solution is
(y + )∗ + (y − )∗ = x∗1 − x∗2 + 0 = |x∗1 − x∗2 |.
Practice quiz
Can a function have both a global and a local minimum? If so, provide
an example. If not, explain why.
Problem definition
Michel Bierlaire
f (x) = −2x2 + x4 − x3 .
6
f (x)
4
x
−3 −2 −1 1 2 3
−2
−4
We use the optimality conditions to identify the maxima and minima of the
function. The first derivative of f (x) is
x1 = 0, x2 = −0.693, x3 = 1.443.
This can also be verified using the second derivative of the function f (x):
Therefore, the function has no global maximum. Its global minimum is the
local minimum associated with the lowest value of f . We can conclude that
the function has
Practice quiz
1. f1 (x) = x2 .
2. f2 (x) = 1/|x|.
3. f3 (x) = 1/x.
For each function, provide its infimum on R, or show that it does not
exist. Provide also its minimum on R, or show that it does not exist.
Answer the same question if the decision variable is constrained as follows:
−1 ≤ x ≤ 2.
Problem definition
Michel Bierlaire
x
0
−3 −2 −1 0 1 2 3
The infimum of x2 on R is 0:
inf x2 = 0.
x∈R
When the constraints are introduced, the same arguments can be used to
reach the same conclusions: the infimum is 0, and x∗ = 0 is an optimum.
We now analyze the function f2 .
6
f2 (x) = 1/|x|
x
0
−2 0 2 4
f2 (x) = 1/x 2
−2
−4
−6
−4 −2 0 2 4
x
Practice quiz
·105
0
0 200
100
200
300 0
The set A = (x1 , x2 ) ∈ R2 |(x1 − 1)2 + (x2 − 2)2 ≤ 1 is a compact set:
6 x
2
2 A
x1
−4 −3 −2 −1 1 2 3
Weierstrass’s theorem guarantees that the given function has both a max-
imum and a minimum when optimized on the feasible set A.
Convexity
Michel Bierlaire
Practice quiz
1. f (x) = 2x2 − 3.
−3 −2 −1 1 2 3
−2
−1 1 2 3 4
−1
g(x1 ) = g(0) = 0
g(x2 ) = g(2) = 0
g(λx1 + (1 − λ)x2 ) = g(1) = 2
Since
g(λx1 + (1 − λ)x2 ) > λg(x1 ) + (1 − λ)g(x2 ),
we can conclude that g(x) is not convex.
Let us further observe the function values in the points x2 , x3 , and
λx2 + (1 − λ)x3 , where λ = 0.5, again for the sake of simplifying the
proof:
g(x2 ) = g(2) = 0
g(x3 ) = g(3) = 0
g(λx2 + (1 − λ)x3 ) = g(2.5) = −0.625
Since
g(λx2 + (1 − λ)x3 ) < λg(x2 ) + (1 − λ)g(x3 ),
we can conclude that g(x) is not concave either.
Convexity
Michel Bierlaire
Practice quiz
Note first that the set A = [ℓ1 , u1 ] × [ℓ2 , u2 ] is non empty and convex.
Consider x and y in A and λ ∈ [0, 1]. By convexity of A, the point z =
(1 − λ)x + λy belongs to A.
As f is concave, we have
g(z) = f (z1 )
= f ((1 − λ)x1 + λy1 )
≥ (1 − λ)f (x1 ) + λf (y1 )
= (1 − λ)g(x1 , x2 ) + λg(y1 , y2 )
= (1 − λ)g(x) + λg(y),
Practice quiz
∇f (x)T d.
Practice quiz
Practice quiz
gi (α) = f (x + αdi ), i = 1, 2, 3,
Practice quiz
x21 x2
2
f : R2 → R3 : f (x1 , x2 ) = cos(ex1 +x2 ) .
x2
Differentiability: the first order
Michel Bierlaire
Practice quiz
The function
f (x1 , x2 ) = 400 − 3x21 x22
is differentiable at (1, −2)T . Therefore the gradient is the direction of steepest
ascent. We have
−6x1 x22
∇f (x1 , x2 ) = ,
−6x21 x2
and
−24
∇f (1, −2) = .
12
√
As k∇f (1, −2)k = 12 5, the normalized direction in which the depth in-
creases as fast as possible is then
√ √
d = −2/ 5, 1/ 5 .
If she swims one meter along the direction, her new position is
√
+ 1 − 2/ √5
x = ,
−2 + 1/ 5
f (x) = 388,
Practice quiz
1 9
f (x) = x21 + x22 ,
2 2
x+ = (0, 0)T ,
d = (1, 1)T .
1
g(x) = x31 + x32 − x1 − x2 ,
3
x+ = (9, 1)T ,
d = (9, 1)T .
Differentiability: the second order
Michel Bierlaire
1 9
f (x) = x21 + x22 .
2 2
1. The gradient is
∂f
!
∂x1 x1
∇f (x1 , x2 ) = = .
∂f 9x2
∂x2
2. The Hessian is
∂2f ∂2f
2 ∂x21 ∂x1 x2 1 0
∇ f (x1 , x2 ) = = .
∂2f ∂2f 0 9
∂x2 x1 ∂x22
dT ∇2 f (x+ )d 10
T
= = 5.
d d 2
1
g(x) = x31 + x32 − x1 − x2 .
3
1. The gradient is
∂f
!
∂x1 x21 − 1
∇f (x1 , x2 ) = = .
∂f 3x22 − 1
∂x2
2. The Hessian is
∂2f ∂2f
2 ∂x21 ∂x1 x2 2x1 0
∇ f (x1 , x2 ) = = .
∂2f ∂2f 0 6x2
∂x2 x1 ∂x22
3. Consider the point xa = (1, 1)T . At that point, the Hessian is positive
definite and, therefore, the function is convex. If you now consider
the point xb = (−1, −1)T , the Hessian is negative definite, and the
function is concave at xb . Therefore, the function itself is neither a
convex function, nor a concave function.
4. The curvature of the function in the direction d = (9, 1)T at the speci-
fied point x+ = (9, 1)T is obtained as
dT ∇2 g(x+ )d 1464
T
= = 17.85.
d d 82
Differentiability: second order
Michel Bierlaire
Practice quiz
Consider f : R2 → R defined as
1
f (x) = x31 + x32 − x1 − x2 .
3
1. Implement in Python a function that takes x as argument and returns
the value of the function, its gradient and its second derivatives matrix.
2. Evaluate the function, its gradient and second derivatives matrix at
9
x= .
1
Practice quiz
We have
x2
f (x) = − 2x + 1,
100
2x
f ′ (x) = − 2,
100
2
f ′′ (x) = .
100
We need to find M such that
We have
2x 2y = 2 |x − y|.
|f ′ (x) − f ′ (y)| = −
100 100 100
Therefore, any M such that
2
M≥
100
is a Lipschitz constant.
Conditioning
Michel Bierlaire
Practice quiz
Consider the following quadratic function:
f (x1 , x2 ) = 2x21 + 9x22 . (1)
1. Calculate the condition number of the Hessian of f at point (x1 , x2 ).
2. Apply the change of variable x′ = M x where
2 √0
M= ,
0 3 2
that is,
x′1 = 2x1 ,
√
x′2 = 3 2x2 .
Consider the function
f˜(x′ ) = f (M −1 x′ ).
Calculate the condition number of the Hessian (using the 2-norm) of f˜
at point (x′1 , x′2 ).
We consider
f (x1 , x2 ) = 2x21 + 9x22 .
The second derivative matrix is
2 4 0
∇ f (x1 , x2 ) = .
0 18
We obtain
√
1 ′ 2 ′
f˜(x′1 , x′2 ) = f ( x1 , x)
2 6 2√
1 2 ′ 2
= 2( x′1 )2 + 9( x)
2 6 2
1 1 ′2
= x′2 1 + x2 .
2 2
The Hessian of f˜ is the identity matrix:
2˜ ′ 1 0
∇ f (x ) = .
0 1
Therefore, the two eigenvalues are equal to 1, and the condition number
is 1, for any x′ ∈ R2 .
Necessary optimality conditions
Michel Bierlaire
Practice quiz
Consider the function
f (x1 , x2 ) = 50x21 − x32
illustrated in the figure below.
5,000
0 10
−10 0
−5 0 5
10−10
1. The gradient is
100x1 ∗ 0
∇f (x) = , ∇f (x ) = .
−3x22 0
f (x∗ ) = 0.
f (x1 ) = −α3 .
Therefore, for any α > 0, we have
f (x2 ) = α3 .
Practice quiz
The gradient of f is
∂f
∂x1 c1
..
∇f (x) = ... = . = c,
∂f
∂xn
cn
c1 = . . . = cn = 0,
Practice quiz
0
5
0
−1
0 −5
1
5
−5
and for
0
x̄k = π , k ∈ Z.
2
+ kπ
x̄2•
x∗2
•
5 x̄1
•
x∗
• 1
x̄0
•
x∗0
0 •
x̄−1
•
x∗
• −1
x̄−2
−5 •
x∗−2
•
Since this matrix is positive definite, each point x∗k satisfies the sufficient
optimality conditions and is a local minimum of the function.
If k is odd,
2 1 1
∇ f (x∗k ) = .
1 0
In both cases, the eigenvalues are −0.61803 and 1.61803.
Therefore, there is no x̄k that satisfies the necessary optimality conditions.
None of them can then be a local minimum.
Sufficient optimality conditions
Michel Bierlaire
Practice quiz
20
10
2
−2 0
−1 0 1 2 −2
2
−1
−2
−2 −1 0 1 2
Show that
− 41
∗
x = 1
6
which is zero at x∗ .
2
x∗•
0
−1
−2
−2 −1 0 1 2
Practice quiz
3. What are the conditions on g and α so that the problem has an infinite
number of global minima?
Quadratic functions
Michel Bierlaire
The optimality conditions for quadratic functions are related to the pos-
itive definiteness of the (constant) second derivative matrix. The derivatives
of the objective function are
∇f (x) = Qx + g, ∇2 f (x) = Q.
The positive definiteness of Q can be identified from its eigenvalues, that are
the roots of the characteristic polynomial. Therefore, we solve the equation
1−λ α
det(λI − Q) = det = (1 − λ)2 − α2
α 1−λ
= λ2 − 2λ + (1 − α2 )
= (1 − α − λ)(1 + α − λ).
λ1 = 1 − α
λ2 = 1 + α.
Q = U ΛU T
√ √ ! √ √ !
2 2 2
−√ 22
1−α 0
= 2√ √2 √2 ,
− 2 2 0 1+α 2 2
2 2 2 2
−gi′
x′i = if λi 6= 0,
λi
′
gi = 0 if λi = 0.
Practice quiz
50
0
5
−5 0
0
5 −5
Therefore,
1 −1 3
Q= , g= , c = −5.
−1 1 0
The positive definiteness of Q can be identified from its eigenvalues, that
are the roots of the characteristic polynomial. Therefore, we solve the equa-
tion
1 − λ −1
det(λI − Q) = det = (1 − λ)2 − 1
−1 1 − λ
= 1 − 2λ + λ2 − 1
= λ(λ − 2).
• For λ2 we have
1 −1 x1 0
= ,
−1 1 x2 0
which implies that the normalized eigenvector is
√
2 1
xλ 2 = .
2 1
We have √
T 2 3
U g= .
2 −3
As the second entry of this vector, corresponding to the zero eigenvalue, is
not zero, we can conclude that the problem is unbounded.
Solving equations: Newton with one variable
Michel Bierlaire
Practice quiz
|F (x∗ )| ≤ ε = 10−15 .
1. F (x) = x2 − 2 = 0 with x0 = 2.
Practice quiz
Practice quiz
Practice quiz
• plot the function, the quadratic model and the zero and,
1. x
b = 3,
2. x
b = 4,
3. x
b = 5.
Newton’s local method
Michel Bierlaire
Consider f : R → R defined as
1
m( x ) = f ( xb) + ( x − xb) f 0 ( xb) + ( x − xb)2 f 00 ( xb)
2
f 0 ( xb)
x + = xb − .
f 00 ( xb)
f(3)=0
f'(3)=-6
f''(3)=14
Zero of the derivative of the model: 3.43
The model is convex. Indeed, the second derivative is positive. The zero of the derivative is
therefore the minimum of the quadratic model. And there is a good adequacy between the model
and the function at that point. This is a favorable case for Newton’s local method.
Quadratic model around xb = 4.
[9]: plotModel(4)
f(4)=0
f'(4)=4
f''(4)=2
Zero of the derivative of the model: 2
The model is convex. Indeed, the second derivative is positive. The zero of the derivative is
therefore the minimum of the quadratic model. However, there is not a good adequacy between
the model and the function at that point. The value of the function actually increase at that point.
This is not a favorable case for Newton’s local method.
Quadratic model around xb = 5.
[10]: plotModel(5)
f(5)=0
f'(5)=-10
f''(5)=-34
Zero of the derivative of the model: 4.71
The model is not convex. Indeed, the second derivative is negative. Therefore, the model is
not bounded from below and there is no minimum. The zero of the derivative corresponds to a
maximum of the quadratic model. Even if there is a good adequacy between the model and the
function at that point, the value of the function actually increase. This is not a favorable case for
Newton’s local method.
Preconditioned steepest descent
Michel Bierlaire
Practice quiz
1 Algorithm
Consider a function f : Rn → R. The preconditioned steepest descent algo-
rithm is defined as
xk+1 = xk + αdk ,
where
dk = −Dk ∇f (xk ),
and Dk ∈ Rn×n is a positive definite matrix. Implement the algorithm with
dTk ∇f (xk )
α= .
dTk ∇2 f (xk )dk
The iterations must be interrupted when
1. either the norm of the gradient is sufficiently close to zero, that is
2 Illustration
Consider the function
Dk = I
1 0
Dk = 1
0 10
1 22 −1
Dk = .
43 −1 2
Comment on the number of iterations and the global behavior of the algo-
rithm.
Preconditioning
Michel Bierlaire
Practice quiz
Consider the function f : R2 → R defined as
1 101 2
f (x) = x21 + x + x1 x2 .
2 2 2
1. Consider a change of variables
x′ = LTk x,
where
Lk LTk = ∇2 f (xk ).
Write the function in the new variables
f˜(x′ ) = f (L−T ′
k x ).
x′1 = x1 + x2
x′2 = 10x2 .
that is
1
1 − 10
x= 1 x′
0 10
or
1 ′
x1 = x′1 − x,
10 2
1 ′
x2 = x.
10 2
so that
2
∇f˜(x0 ) = ′
.
10
The step to perform along the steepest descent direction is
∇f˜(x0 ′ )T ∇f˜(x0 ′ )
α= .
∇f˜(x0 ′ )T ∇2 f˜(x0 ′ )∇f˜(x0 ′ )
Practice quiz
Practice quiz
Identify the first 3 points using the procedure implemented under item
1 with δ = 6.
Exact line search: Golden Section
Michel Bierlaire
Practice quiz
λ = uk − ℓ k . (1)
We now exploit the fact that [ℓk+1 , uk+1 ] = [α1k , uk ] and α1k+1 = α2k to
obtain
α2k − α1k = uk − α2k+1 = ρ(uk − α1k ). (4)
Thus we get
α2k+1 = uk − ρ(uk − α1k ). (5)
2. We first derive
uk − α1k = ℓk − ℓk + uk − α1k
= −(α1k − ℓk ) + (uk − ℓk ) (7)
= λ(1 − ρ).
or equivalently,
ρ2 − 3ρ + 1 = 0. (8)
Practice quiz
• f (α1 ) > f (α2 ) > f (α∗ ) for each α1 , α2 such that α1 < α2 < α∗ ,
• f (α2 ) > f (α1 ) > f (α∗ ) for each α1 , α2 such that α2 > α1 > α∗ .
on the interval [5, 10]. Verify visually that it is strictly unimodal, and
apply the Golden section algorithm with a precision ε = 10−3 . If means
that the algorithm stops when
u − ℓ ≤ ε.
Practice quiz
3. Consider the first Wolfe condition with β1 = 0.1. What are the values
of the step α that verify the condition?
First Wolfe condition
Michel Bierlaire
that is
8d1 = 4
2d2 = −2,
∇f (x0 )T dN = −4.
0.5
f (xα )
α
−0.5 0.5 1 1.5 2 2.5
−0.5
−1
−1.5
−2
Second Wolfe condition
Michel Bierlaire
Practice quiz
3. Consider the second Wolfe condition with β2 = 0.7. What are the
values of the step α that verify the condition?
Second Wolfe condition
Michel Bierlaire
that is
8d1 = 4
2d2 = −2,
∇f (x0 )T dN = −4.
∇f (xα )T dN ≥ β2 ∇f (x0 )T dN ,
4(α − 1) ≥ −β2 4,
that is, if
α ≥ 1 − β2 .
If β2 = 0.7, all steps α such that
α ≥ 0.3.
∇f (xα )T dN
∇f (x0 )T dN
where the left hand side is plotted in red on the figure. The value
α = 0.3 is represented by the dotted vertical line.
f (xα )
1 β2 = 0.7
α
−1 1 2 3
−1
−2
Validity of the Wolfe conditions
Michel Bierlaire
Practice quiz
Consider the step α = 3. Consider the first Wolfe condition with β1 = 0.15
and the second Wolfe condition with β2 = 0.8.
1. As
g(α) = f (x + αd) = −1.833α3 + 8.5α2 − 10α + 5,
the directional derivative is
g ′ (3) ?
≤ β2 ,
g ′ (0)
?
−8.5/ − 10 = 0.85 ≤ 0.8.
characterizing the first Wolfe condition is plotted in red, and the ratio
g ′ (α)
g ′ (0)
g(α)
4
β1
=
0. 1
2 5
β2 = 0.8 α
1 2 3 4
0.12251 ≤ α ≤ 1.45912,
verify both conditions. The two thresholds are identified by the two
dashed blue vertical lines on the picture above.
Steepest descent algorithm
Michel Bierlaire
Practice quiz
starting from
−1.5
x0 = ,
1.5
to try to obtain x∗ such that k∇f (x∗ )k ≤ ε = 10−7 . Limit the number
of iterations to 10000.
Practice quiz
1. Implement a function that takes as input a square symmetric matrix
H and returns a scalar τ ≥ 0 and a lower triangular matrix L such that
H + τ I = LT L.
Graded quiz
1 Formulation
Question 1
James Bond must reach a yacht moored 100 meters from shore. Currently,
James Bond is 80 meters from the nearest point to the yacht from the beach.
He is capable of running on the beach at 20 km/h and swimming at 6 km/h.
James Bond wants to determine which distance x in meters he needs to run
on the beach before jumping in the water in order to minimize the time to
get to the yacht. Which of the following formulations corresponds to this
problem?
Solution 1:
Solution 2:
18 p
min x + 0.6 1002 + (80 − x)2
100
s.t.
x ≤ 80,
x ≥ 0.
Solution 3:
√
min 20x + 0.6 1002 + x2
s.t.
x ≥ 0.
Solution 4:
18 p
min x + 0.6 1002 + (80 − x)2 .
100
Question 2
Consider the following optimization model.
√
max −3 x1 − 2x22
√
s.t. 2 x1 + x22 ≥ 4,
√
−3 x1 + 2x22 ≥ 2,
x1 , x2 ≥ 0.
Solution 1:
Solution 2:
Solution 3:
√
max −3 x1 − 2x22
√
s.t. 2 x1 + x22 = 4,
√
−3 x1 + 2x22 = 2,
x1 , x2 ≥ 0.
Solution 4:
√
min 3 x1 + 2y
√
s.t. 2 x1 + y ≥ 4,
√
−3 x1 + 2y ≥ 2,
x1 , y ≥ 0.
Question 3
An iteration of the local Newton method is exactly an iteration of the
preconditioned steepest descent method when...
1
Solution 1: ∇2 f (xk ) is positive semidefinite and the step αk = 2
satisfies
the Wolfe conditions.
1
Solution 2: ∇2 f (xk ) is positive definite and the step αk = 2
satisfies the
Wolfe conditions.
f (x1 , x2 ) = ln(x1 ),
where x1 > 0.
This function is...
Solution 3: convex.
Solution 4: concave.
Question 5
Consider the following function:
at point
0
x= π ?
2
Solution 1: -1
Solution 2: 0
Solution 3: 1
Solution 4: -5
Question 6
Consider a function f , twice differentiable from R2 to R, and consider a
stationary point (x1 , x2 ) ∈ R2 . If the determinant of the Hessian matrix of
f at this point is negative, then ...
f (x1 , x2 , x3 ) = x22 + x1 x3 .
What is the curvature of f along the direction
2
d = −1
2
at point
1
x = 2 ?
2
2
Solution 1: 3
Solution 2: 0
Solution 3: 1
10
Solution 4: 9
Question 8
Preconditioning is ...
F (x) = x2 − 3 = 0.
More precisely, we aim to find x∗ such that |F (x∗ )| ≤ ε = 10−15 .
When applying the first step of Newton’s algorithm starting from point
x0 = 2, we obtain:
Solution 1: x1 = 1.73.
Solution 2: x1 = 1.732.
Solution 3: x1 = 1.74.
Solution 4: x1 = 1.75.
5 Newton’s local method
Question 14
Let f be a twice differentiable function. Which statement about Newton’s
local method for the minimization of f is correct?
Solution 3: find the optimal value of the objective function in the next
iteration.
Solution 4: ℓk+1 ≤ ℓk .
Question 19
Suppose that f : Rn → R is a differentiable nonlinear function, xk ∈ Rn is a
point and dk ∈ Rn is a direction such that ∇f (xk )T dk < 0, and f is bounded
from below in the direction dk . The purpose of the first Wolfe condition:
is to:
Solution 2: insure that the objective function decreases along the direc-
tion dk .