Docsity

Homework 2 Partial Solution | Advanced Numerical Optimization | AMSC 607, Assignments of Mathematics

Toggle sidebar
bg1
AMSC 607 / CMSC 764 Advanced Numerical Optimization
Fall 2006
Homework 2
Partial Solution
1. (10) Consider the Huang family of quasi-Newton formulas:
B(k+1) =B(k)−B(k)s(k)s(k)TB(k)
s(k)TB(k)s(k)+y(k)y(k)T
y(k)Ts(k)+φ(s(k)TB(k)s(k))u(k)u(k)T
where φis a scalar between 0 and 1 and
s(k)=x(k+1) −x(k),
y(k)=g(k+1) −g(k),
u(k)=y(k)
y(k)Ts(k)−B(k)s(k)
s(k)TB(k)s(k).
(a) Show that this formula satisfies the secant condition.
(b) Show that if B(k)is positive definite and if y(k)Ts(k)>0, then B(k+1) is
positive definite.
Answer:
(a) The secant condition says B(k+1)s(k)=y(k), and this can be checked by
direct computation.
(b) We need to verify that zTB(k+1)z > 0 for all nonzero z. For the last term
in B(k+1),
zTu(k)u(k)Tz= (zTu(k))2≥0,
and for the next to last,
zTy(k)y(k)T
y(k)Ts(k)z=(zTy(k))2
y(k)Ts(k)≥0
by the assumption. So we will just work with the first 2 terms, using a
Cholesky factorization B(k)=LLT. Define ¯z=LTzand ¯s=LTs(k). Then
zTB(k)z−zTB(k)s(k)s(k)TB(k)
s(k)TB(k)s(k)z= ¯zT¯z−¯zT¯s¯sT¯z
¯sT¯s
=¯zT¯z¯sT¯s−¯zT¯s¯sT¯z
¯sT¯s
=k¯zk2k¯sk2−(¯zT¯s)2
¯sT¯s.
The numerator is nonnegative (by the Cauchy-Schwarz inequality) since
¯zT¯s=k¯zkk¯skcos θwhere θis the angle between the two vectors. (In fact, it
is positive unless ¯zpoints in the direction ±¯s.)
1
pf3
pf4
pf5

Partial preview of the text

Download Homework 2 Partial Solution | Advanced Numerical Optimization | AMSC 607 and more Assignments Mathematics in PDF only on Docsity!

AMSC 607 / CMSC 764 Advanced Numerical Optimization Fall 2006 Homework 2 Partial Solution

  1. (10) Consider the Huang family of quasi-Newton formulas:

B(k+1)^ = B(k)^ − B(k)s(k)s(k)T^ B(k) s(k)T^ B(k)s(k)^

y(k)y(k)T y(k)T^ s(k)^

  • φ(s(k)T^ B(k)s(k))u(k)u(k)T

where φ is a scalar between 0 and 1 and

s(k)^ = x(k+1)^ − x(k)^ , y(k)^ = g(k+1)^ − g(k)^ ,

u(k)^ =

y(k) y(k)T^ s(k)^

B(k)s(k) s(k)T^ B(k)s(k)^

(a) Show that this formula satisfies the secant condition.

(b) Show that if B(k)^ is positive definite and if y(k)T^ s(k)^ > 0, then B(k+1)^ is positive definite.

Answer:

(a) The secant condition says B(k+1)s(k)^ = y(k), and this can be checked by direct computation.

(b) We need to verify that zT^ B(k+1)z > 0 for all nonzero z. For the last term in B(k+1), zT^ u(k)u(k)T^ z = (zT^ u(k))^2 ≥ 0 ,

and for the next to last,

zT^

y(k)y(k)T y(k)T^ s(k)^

z =

(zT^ y(k))^2 y(k)T^ s(k)^

by the assumption. So we will just work with the first 2 terms, using a Cholesky factorization B(k)^ = LLT^. Define ¯z = LT^ z and ¯s = LT^ s(k). Then

zT^ B(k)z − zT^ B(k)s(k)s(k)T^ B(k) s(k)T^ B(k)s(k)^

z = z¯T^ ¯z − z¯T^ ¯ss¯T^ z¯ s ¯T^ s¯

=

¯zT^ z¯¯sT^ ¯s − ¯zT^ s¯¯sT^ ¯z ¯sT^ ¯s

=

‖¯z‖^2 ‖¯s‖^2 − (¯zT^ ¯s)^2 s ¯T^ s¯

The numerator is nonnegative (by the Cauchy-Schwarz inequality) since z¯T^ s¯ = ‖z¯‖‖s¯‖ cos θ where θ is the angle between the two vectors. (In fact, it is positive unless ¯z points in the direction ±¯s.)

Therefore, we know that zT^ B(k+1)z ≥ 0 for all z. Now, if ¯z points in the direction ±s¯, then the next to last term is strictly positive, so we can conclude that zT^ B(k+1)z > 0 for all nonzero z.

  1. Consider the trust region method obtained by using g(x) and H(x) to form a quadratic model

f (x + p) ≈ q(p) = f (x) + pT^ g +

pT^ Hp

and then computing the search direction p from

min ‖p‖ 2 ≤h

q(p).

2(a) (5) Show that if H is positive definite, then the direction p is downhill.

2(b) (5) Suppose that the solution p to the minimization problem satisfies ‖p‖ 2 < h. In this case, give a formula for p.

Answer:

If the constraint pT^ p = h^2 is active, then the solution is obtained from setting the derivative of the Lagrangian

L(x, λ) = f (x) + pT^ g +

pT^ Hp +

λ(ptp − h^2 )

to zero:

g + Hp + λp = 0 , pT^ p − h^2 = 0.

This gives (H + λI)p = −g.

The parameter λ is positive, since ‖p‖ is a monotonically increasing function of λ.

If the constraint is inactive, then the solution is found by setting the derivative of q to zero, yielding the Newton direction.

Hp = −g

For λ ≥ 0, pT^ (H + λI)p = −pT^ g,

and the left hand side is positive since H and H + λI are positive definite. Therefore, the direction is downhill.

  1. (10) Consider the linear programming problem

min x cT^ x Ax = b x ≥ 0

where A is an m × n matrix with m < n.

Show that if there exists a solution to this problem, then there is a solution xopt that has at most m nonzero components.

Answer: First, consider this example:

min x x 1 + x 2

subject to

x 1 + x 2 = 3 x ≥ 0

The set of solutions to this problem is {[α, (3 − α)]T^ : 0 ≤ α ≤ 3 }. So clearly there are solutions for which all components of x are nonzero.

So let’s answer the question. Suppose x solves our problem, and at least m + 1 elements of x are nonzero.

  • The optimality conditions say that x is feasible, [I, AT^ ]λ = c, and λT^ x = 0. Note that there are n + m Lagrange multipliers λ.
  • Since at least m + 1 elements of x are nonzero, at least m + 1 components of λ must be zero (by complementarity), so we have expressed c as a linear combination of at most n − 1 constraint gradients.
  • Let AˆT^ be the matrix whose columns are these constraint gradients. We have found a vector λˆ satisfying

AˆT^ ˆλ = c

or [ AˆT^ c

]

[

ˆλ − 1

]

Therefore, the matrix is rank deficient.

  • Therefore, there is a vector z for which [ Aˆ cT

]

z = 0.

Moving in this direction keeps all of the active constraints satisfied and does not change the objective function value.

  • Change x to x + αz, where α is the largest step we can take without making some component negative; then x + αz has at least one more zero than x has.

Repeat this process until at most m components of x are nonzero.

  1. (15) Write a Matlab function to minimize a given function f subject to linear equality constraints Ax = b. Your function should use the feasible direction formulation, using the QR factors to get a basis for the feasible directions, along with Matlab’s fminunc. It should be written to find a local minimizer for arbitrary functions f and arbitrary numbers of variables and constraints. The user should be given the option of providing a starting point.

Test your function on the problem

min x x^21 x^32 + 4x^21 x^23 + x^42 x^23 + 3x 1 x 2 + 4x 2 x 3 + 5x 1 x 3 + x 1 + x 3

subject to the constraint x 1 + x 2 + x 3 = 3,

starting with the point x = [− 1 , 5 , −1]T^. Print out the sequence of iterates and document your function well.

Answer: Geping Liu’s solution is posted. Note that if the initial point is specified, it should be checked for feasibility, and if it is not specified, it should be generated.