Numerical Optimization

Similar documents
Numerical Optimization

Numerical Optimization

8 Numerical methods for unconstrained problems

Numerical Optimization

MATH 4211/6211 Optimization Basics of Optimization Problems

Unconstrained minimization of smooth functions

UNCONSTRAINED OPTIMIZATION

Line Search Methods. Shefali Kulkarni-Thaker

1 Numerical optimization

Bracketing an Optima in Univariate Optimization

Chapter 4. Unconstrained optimization

1 Numerical optimization

Optimization. CS Summer 2008 Jonathan Kaldor

Numerical Methods in Informatics

SYSTEMS OF NONLINEAR EQUATIONS

Nonlinear Programming

Chapter 3: Root Finding. September 26, 2005

Example - Newton-Raphson Method

CS 323: Numerical Analysis and Computing

Nonlinear Equations. Chapter The Bisection Method

Midterm Review. Igor Yanovsky (Math 151A TA)

Numerical Optimization

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Unconstrained optimization I Gradient-type methods

Optimization Part 1 P. Agius L2.1, Spring 2008

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

Optimization: Nonlinear Optimization without Constraints. Nonlinear Optimization without Constraints 1 / 23

Optimization Tutorial 1. Basic Gradient Descent

Solution Methods. Richard Lusby. Department of Management Engineering Technical University of Denmark

Second Order Optimization Algorithms I

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Variable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University

Review of Classical Optimization

6.252 NONLINEAR PROGRAMMING LECTURE 10 ALTERNATIVES TO GRADIENT PROJECTION LECTURE OUTLINE. Three Alternatives/Remedies for Gradient Projection

IE 5531: Engineering Optimization I

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

Numerical Methods in Physics and Astrophysics

CS 323: Numerical Analysis and Computing

BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations

Statistics 580 Optimization Methods

Numerical Methods in Physics and Astrophysics

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable.

CE 191: Civil and Environmental Engineering Systems Analysis. LEC 05 : Optimality Conditions

14. Nonlinear equations

Lecture 14 Ellipsoid method

MVE165/MMG631 Linear and integer optimization with applications Lecture 13 Overview of nonlinear programming. Ann-Brith Strömberg

Functions of Several Variables

Chapter 6: Derivative-Based. optimization 1

THE SECANT METHOD. q(x) = a 0 + a 1 x. with

A first order divided difference

Computational Methods CMSC/AMSC/MAPL 460. Solving nonlinear equations and zero finding. Finding zeroes of functions

IE 5531: Engineering Optimization I

Lecture 7. Root finding I. 1 Introduction. 2 Graphical solution

5 Handling Constraints

FIXED POINT ITERATIONS

Part 5: Penalty and augmented Lagrangian methods for equality constrained optimization. Nick Gould (RAL)

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

Computational Finance

Unconstrained optimization

Goals for This Lecture:

Zangwill s Global Convergence Theorem

Numerisches Rechnen. (für Informatiker) M. Grepl P. Esser & G. Welper & L. Zhang. Institut für Geometrie und Praktische Mathematik RWTH Aachen

Convex Optimization. Problem set 2. Due Monday April 26th

Chapter III. Unconstrained Univariate Optimization

OPER 627: Nonlinear Optimization Lecture 9: Trust-region methods

min f(x). (2.1) Objectives consisting of a smooth convex term plus a nonconvex regularization term;

Optimality conditions for unconstrained optimization. Outline

Introduction to unconstrained optimization - direct search methods

Written Examination

On sequential optimality conditions for constrained optimization. José Mario Martínez martinez

Lecture 11 and 12: Penalty methods and augmented Lagrangian methods for nonlinear programming

The Steepest Descent Algorithm for Unconstrained Optimization

Lecture 7 Unconstrained nonlinear programming

THE NEWTON BRACKETING METHOD FOR THE MINIMIZATION OF CONVEX FUNCTIONS SUBJECT TO AFFINE CONSTRAINTS

STOP, a i+ 1 is the desired root. )f(a i) > 0. Else If f(a i+ 1. Set a i+1 = a i+ 1 and b i+1 = b Else Set a i+1 = a i and b i+1 = a i+ 1

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable

Numerical Methods. V. Leclère May 15, x R n

Optimization. Yuh-Jye Lee. March 21, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 29

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

Test 2 Review Math 1111 College Algebra

A New Penalty-SQP Method

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Quiescent Steady State (DC) Analysis The Newton-Raphson Method

Numerical Methods Lecture 3

Lecture 13 Newton-type Methods A Newton Method for VIs. October 20, 2008

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

Notes for Numerical Analysis Math 5465 by S. Adjerid Virginia Polytechnic Institute and State University. (A Rough Draft)

Chapter 2. Limits and Continuity 2.6 Limits Involving Infinity; Asymptotes of Graphs

Introduction to Nonlinear Optimization Paul J. Atzberger

Lecture 3: Basics of set-constrained and unconstrained optimization

c 2007 Society for Industrial and Applied Mathematics

Mathematics for Engineers. Numerical mathematics

Consequences of Continuity and Differentiability

Maria Cameron. f(x) = 1 n

Continuous Optimisation, Chpt 6: Solution methods for Constrained Optimisation

Practical Optimization: Basic Multidimensional Gradient Methods

Optimization. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k.

Transcription:

Unconstrained Optimization (II) Computer Science and Automation Indian Institute of Science Bangalore 560 012, India. NPTEL Course on

Unconstrained Optimization Let f : R R Unconstrained problem min x R f (x) What are necessary and sufficient conditions for a local minimum? Necessary conditions: Conditions satisfied by every local minimum Sufficient conditions: Conditions which guarantee a local minimum Easy to characterize a local minimum if f is sufficiently smooth

Stationary Points Let f : R R, f C 1. Consider the problem, min x R f (x). Definition x is called a stationary point if f (x ) = 0.

Necessity of an Algorithm Consider the problem min x R (x 2)2 We first find the stationary points (which satisfy f (x) = 0). f (x) = 0 2(x 2) = 0 x = 2. f (2) = 2 > 0 x is a strict local minimum. Stationary points are found by solving a nonlinear equation, g(x) f (x) = 0. Finding the real roots of g(x) may not be always easy. Consider the problem to minimize f (x) = x 2 + e x. g(x) = 2x + e x Need an algorithm to find x which satisfies g(x) = 0.

One Dimensional Optimization Derivative-free methods (Search methods) Derivative-based methods (Approximation methods) Inexact methods

Unimodal Functions Let φ : R R Consider the problem, min x R φ(x) Let x be the minimum point of φ(x) and x [a, b] Definition The function φ is said to be unimodal on [a, b] if for a x 1 < x 2 b, x 2 < x φ(x 1 ) > φ(x 2 ), x 1 > x φ(x 2 ) > φ(x 1 ).

Unimodal Functions

Derivative-free Methods Let f : R R Unconstrained problem min x R f (x) Dichotomous search Fibonacci search Golden-section search Require, Interval of uncertainty, [a, b], which contains the minimum of f f to be unimodal in [a, b].

Function values at three points not enough to reduce the interval of uncertainty

Function values at four points enough to reduce the interval of uncertainty

Dichotomous Search Place λ and µ symmetrically, each at a distance ɛ from the mid-point of [a, b]

Dichotomous Search: Algorithm 1 Input: Initial interval of uncertainty, [a, b], 2 Initialization: k = 0, a k = a, b k = b, ɛ (> 0), l (final length of uncertainty interval) 3 while (b k a k ) > l 4 λ k = ak +b k 2 ɛ, µ k = ak +b k 2 + ɛ 5 if f (λ k ) f (µ k ) 6 a k+1 = λ k, b k+1 = b k 7 else 8 b k+1 = µ k, a k+1 = a k 9 endif 10 k := k + 1 11 endwhile 12 Output: x = ak +b k 2

Dichotomous Search: An Example Consider, min x (1/4)x 4 (5/3)x 3 6x 2 + 19x 7 k a k b k b k a k 0-4 0 4 1-4 -1.98 2.02 2-3.0001-1.98 1.0201 3-3.0001-2.4849.5152.... 10-2.5669-2.5626.0043.... 20-2.5652-2.5652 4.65e-6.... 23-2.5652-2.5652 5.99e-7 x = 2.5652, f (x ) = 56.2626

Fibonacci Search

Fibonacci Search Need one function evaluation at every iteration k = 2, 3,...

Fibonacci Search

Fibonacci Search

Fibonacci Search Note: I_1 = I_2 + I_3

Fibonacci Search We have I 1 = I 2 + I 3. Generalizing further, we get I 1 = I 2 + I 3 I 2 = I 3 + I 4. I n = I n+1 + I n+2 Assumption: The interval for iteration n + 2 vanishes (I n+2 = 0).

Fibonacci Search I n+1 = I n I n+2 = 1I n I n = I n+1 + I n+2 = 1I n I n 1 = I n + I n+1 = 2I n I n 2 = I n 1 + I n = 3I n I n 3 = I n 2 + I n 1 = 5I n I n 4 = I n 3 + I n 2 = 8I n.. I 1 = I 2 + I 3 =?I n Fibonacci Sequence : {1, 1, 2, 3, 5, 8, 13, 21, 34, 55,...} F k = F k 1 + F k 2, k = 2, 3,... F 0 = 1, F 1 = 1.

Fibonacci Search I n+1 = I n I n+2 = 1I n F 0 I n I n = I n+1 + I n+2 = 1I n F 1 I n I n 1 = I n + I n+1 = 2I n F 2 I n I n 2 = I n 1 + I n = 3I n F 3 I n I n 3 = I n 2 + I n 1 = 5I n F 4 I n I n 4 = I n 3 + I n 2 = 8I n F 5 I n.. I k = I k+1 + I k+2 = F n k+1 I n.. I 1 = I 2 + I 3 = F n I n Note: After n iterations, I n = I 1 F n

Fibonacci Search After n iterations, I n = I 1 F n For example, after 10 iterations, I n = I 1 89 n should be known beforehand

Fibonacci Search Note: Easy to find µ k+1 if I k+2 is known.

Fibonacci Search Recall, Therefore, and This gives, I k = F n k+1 I n. I k+2 = F n k 1 I n I k+1 = F n k I n. I k+2 = F n k 1 F n k I k+1.

Fibonacci Search

The Fibonacci Search Consider, min x (1/4)x 4 (5/3)x 3 6x 2 + 19x 7 Initial interval of uncertainty : [ 4, 0] Required length of interval of uncertainty: 0.2 Set n such that F n > 4 0.2 = 20, n = 7 k a k b k b k a k 0-4 0 4 1-4 -1.52 2.48 2-3.05-1.52 1.53 3-3.05-2.11 0.94 4-2.70-2.11 0.59 5-2.70-2.34 0.36 6-2.70-2.47 0.23 7-2.61-2.47 0.14

Golden Section Search Fibonacci Search requires the number of iterations as input Golden section search : Ratio of two adjacent intervals is constant I k = I k+1 = I k+2 =... = r I k+1 I k+2 I k+3 Therefore, and I k I k+2 = r 2 I k I k+3 = r 3.

Golden Section Search Suppose, I k = I k+1 + I k+2. That is, This gives I k I k+2 = I k+1 I k+2 + 1 r 2 = r + 1 r = 1 + 5 2 = 1.618034 (negative r is irrelevant) Golden Ratio = 1.618034

Golden Section Search Every iteration is independent of n Lengths of generated intervals, After n function evaluations, I GS n I k I k+1 = I k+1 I k+2 = I k+2 I k+3 =... = r {I 1, I 1 /r, I 1 /r 2,...} = I 1 /r n 1

Golden Section Search For Golden Section search, In GS = I 1 /r n 1 For Fibonacci search, In F = I 1 /F n When n is large, Therefore, I F n 5 r n+1 I 1 I G n I F n F n rn+1 5 = r2 5 1.17 If the number of iterations is same, In GS 17% is larger than I F n by about

Derivative-based Methods Let f : R R Unconstrained problem min x R f (x) Bisection method Assumes f C 1. Interval of uncertainty, [a, b], which contains the minimum of f needs to be provided. Assumes that f is unimodal in [a, b]. Newton method Assumes f C 2. Based on using the quadratic approximation of f at every iteration

Bisection Method Assumption: f C 1 f is unimodal in the initial interval of uncertainty, [a, b]. Idea: Compute f (c) where c is the midpoint of [a, b] 1 If f (c) = 0, then c is a minimum point. 2 f (c) > 0 [a, c] is the new interval of uncertainty 3 f (c) < 0 [c, b] is the new interval of uncertainty

Bisection Method: Algorithm 1 Initialization: Initial interval of uncertainty [a 1, b 1 ], k = 1. Let l be the allowable final level of uncertainty, choose smallest possible n > 0 such that ( 1 2 )n 2 while k n 3 c k = ak +b k 2 l b 1 a 1. 4 If f (c k ) = 0, stop with c k as an optimal solution. 5 If f (c k ) > 0 a k+1 = a k and b k+1 = c k else a k+1 = c k and b k+1 = b k endif 6 k:=k+1 7 endwhile 8 If k = n + 1, the solution is at the midpoint of [a n, b n ].

Bisection Method Bisection method requires initial interval of uncertainty converges to a minimum point within any degree of desired accuracy

Newton Method An iterative technique to find a root of a function Problem: Find an approximate root of the function, f (x) = x 2 2. An iteration of Newton s method on f (x) = x 2 2. 25 20 15 f(x) 10 5 0 x * x k+1 x k 5 5 4 3 2 1 0 1 2 3 4 5 x

Newton Method Consider the problem to minimize f (x), x R Assumption: f C 2. Idea: At any iteration k, construct a quadratic model q(x) which agrees with f at x k up to second derivative, q(x) = f (x k ) + f (x k )(x x k ) + 1 2 f (x k )(x x k ) 2 Estimate x k+1 by minimizing q(x). q (x k+1 ) = 0 f (x k ) + f (x k )(x k+1 x k ) = 0 x k+1 = x k f (x k ) f (x k ) Repeat this process at x k+1.

Newton Method: Algorithm Consider the problem to minimize f (x), f C 2 Need to find the roots of g(x)(= f (x)). 1 Initialization: Choose initial point x 0, ɛ and set k := 0 2 while g(x k ) > ɛ 3 x k+1 = x k g(xk ) g (x k ) 4 k := k + 1 5 endwhile 6 Output: x k Remarks Starting with an arbitrary initial point, Newton method does not converge to a stationary point If the starting point is sufficiently close to a stationary point, then Newton method converges. Useful when g (x k ) > 0

Newton Method Iterations Consider the problem, min x R (1/4)x4 (5/3)x 3 6x 2 + 19x 7 f (x) = (1/4)x 4 (5/3)x 3 6x 2 + 19x 7 g(x) = x 3 5x 2 12x + 19 30 25 20 15 10 g(x) 5 0 5 x 1 2 x 10 15 20 2 1.5 1 0.5 0 0.5 1 1.5 2 x

Newton Method Iterations Consider the problem, min x R (1/4)x4 (5/3)x 3 6x 2 + 19x 7 f (x) = (1/4)x 4 (5/3)x 3 6x 2 + 19x 7 g(x) = x 3 5x 2 12x + 19 40 20 0 x 2 3 x x 4 x 1 g(x) 20 40 60 80 4 3 2 1 0 1 2 x

Newton Method Iterations Consider the problem, f (x) = log(e x + e x ) g(x) = ex e x e x +e x min x R log(ex + e x ) 1 0.8 0.6 0.4 0.2 g(x) 0 0.2 0.4 x 1 x 2 x 0 0.6 0.8 1 2 1.5 1 0.5 0 0.5 1 1.5 2 x

Newton Method Iterations Consider the problem, f (x) = log(e x + e x ) g(x) = ex e x e x +e x 1 min x R log(ex + e x ) 0.8 0.6 0.4 g(x) 0.2 0 0.2 x 1 x 2 x 3 x 0 x 4 0.4 0.6 0.8 1 6 4 2 0 2 4 6 x Newton method does not converge with this initialization of x 1