• Ingen resultater fundet

Convexity and Optimization

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Convexity and Optimization"

Copied!
38
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Convexity and Optimization

Richard Lusby

Department of Management Engineering Technical University of Denmark

(2)

Today’s Material

(jg

Extrema

Convex Function Convex Sets

Other Convexity Concepts Unconstrained Optimization

(3)

Extrema

(jg

Problem

max f(x) s.t. x∈S max{f(x) :x∈S} Global maximum x

f(x)≥f(x) ∀x∈S Local maximumxo:

f(xo)≥f(x) ∀x in a neighborhood aroundxo

(4)

Weierstrass theorem:

(jg

Theorem

A continuous function achieves its max/min on a closed and bounded set

(5)

Supremum and Infimum

(jg

Supremum

The supremum of a set S having a partial order is the least upper bound of S (if it exists) and is denoted sup S.

Infimum

The infimum of a set S having a partial order is the greatest lower bound of S (if it exists) and is denoted inf S.

If the extrema are not achieved:

I maxsup

I mininf Examples

(6)

Finding Optimal Solutions

Necessary and Sufficient Conditions(jg

Every method for finding and characterizing optimal solutions is based on optimality conditions- either necessary or sufficient

Necessary Condition

A condition C1(x) isnecessary if C1(x)is satisfied by every optimal solution x (and possibly some other solutions as well).

Sufficient Condition

A condition C2(x) issufficient if C2(x) ensures that x is optimal (but some optimal solutions may not satisfy C2(x).

Mathematically

{x|C2(x)} ⊆ {x|x optimal solution} ⊆ {x|C1(x)}

(7)

Finding Optimal Solutions

(jg

An example of a necessary condition in the case S is “well-behaved” no improving feasible direction

Feasible Direction

Considerxo ∈S,s ∈Rn is called afeasibledirection if there exists (s)>0 such that

xo +s ∈S ∀: 0< ≤(s)

We denote the cone of feasible directions fromxo in S as S(xo) Improving Direction

s ∈Rn is called animprovingdirection if there exists (s)>0 such that

(8)

Finding Optimal Solutions

(jg

Local Optima

Ifxo is a local minimum, then there existno s ∈S(xo) for which f(.) decreases alongs, i.e. for which

f(x1+2s)<f(x+1s) for 0≤1< 2 ≤(s) Stated otherwise: A necessary condition for local optimality is

F(xo)∩S(xo) =∅

(9)

Improving Feasible Directions

(jg

If for a given direction s it holds that

∇f(xo)s <0

Then s is an improving direction

Well known necessary condition for local optimality of xo for a differentiable function:

∇f(xo) = 0

In other words,xo is stationarywith respect to f(.)

(10)

What if Stationarity is not Enough?

(jg

Supposef is twice continuously differentiable Analyse the Hessian matrix for f atxo

2f(xo) =

2(f(xo))

∂xi∂xj

, i,j = 1, . . . ,n

Sufficient Condition

If∇f(xo) = 0 and∇2f(xo) ispositive definite:

xT2f(xo)x>0 ∀ x∈Rn\{0} then xo is a local minimum

(11)

What if Stationarity is not Enough?

continued(jg

A necessary condition for local optimality is “Stationarity + positive semidefinitenessof ∇2f(xo)”

Note that positive definiteness is not a necessary condition

I E.g. look atf(x) =x4forxo= 0

Similar statements hold for maximization problems

I Key concept here isnegative definiteness

(12)

Definiteness of a Matrix

(jg

A number of criteria regarding the definiteness of a matrix exist A symmetric n×n matrixAis positive definite if and only if

xTAx>0 ∀x∈Rn\{0}

Positive semidefiniteis defined likewise with 0000 instead of00>00 Negative (semi) definiteis defined by reversing the inequality signs to

00<00 and0000, respectively.

Necessary conditions for positive definiteness:

Ais regular with det(A)>0 A1 is positive definite

(13)

Definiteness of a Matrix

(jg

Necessary+Sufficient conditions for positive definiteness:

Sylvestor’s Criterion: All principal submatrices have positive determinants

(a11) a11 a12

a21 a22

!

a11 a12 a13

a21 a22 a23

a31 a32 a33

All eigenvalues of Aare positive

(14)

Necessary and Sufficient Conditions

Differentiable f(.)(jg

Theorem

Suppose that f(.) is differentiable at a local minimumxo. Then

∇f(xo)s ≥0 fors ∈S(xo). Iff(.) is twice differentiable at xo and

∇f(xo) = 0, then sT2f(xo)s ≥0∀s ∈S(xo) Theorem

Suppose that S is convex and non-empty, f(.) differentiable, and that xo ∈S. Suppose furthermore that f(.) is convex.

xo is a local minimum if and only ifxo is a global minimum xo is a local (and hence global) minimum if and only if

∇f(xo)(x−xo)≥0∀x∈S

(15)

Convex Combination

(jg

Convex combination

The convex combinationof two points is the line segment between them α1x12x2for α1, α2≥0 and α12 = 1

(16)

Convex function

(jg

Convex Functions

A convex function lies below itschord

f(α1x12x2)≤α1f(x1) +α2f(x2) Astrictly convex function has no more than one minimum Examples: y =x2,y =x4,y=x

The sum of convex functions is also convex

A differentiable convex function lies above its tangent A differentiable function is convex if its Hessian is positive semi-definite

I Strictly convex not analogous!

A function f isconcave iff−f is convex

(17)

Economic Order Quantity Model

(jg

The problem

The Economic Order Quantity Modelis an inventory model that helps manafacturers, retailers, and wholesalers determine how they should optimally replenish their stock levels.

Costs

K = Setup cost for odering one batch c = unit cost for producing/purchasing

h = holding cost per unit per unit of time in inventory Assumptions

d = A known constant demand rate

(18)

Convex sets

(jg

Definition

A convex setcontains all convex combinations of its elements α1x12x2∈S ∀x1,x2∈S

Some examples of E.g. (1,2], x2+y2 <4,∅ Level curve (2 dimensions):

{(x,y) :f(x,y) =β} Level set:

{x:f(x)≤β}

(19)

Lower Level Set Example

(jg

−4

−2

0 0 2 4

0 100

f(x)

Plot of2x2+ 4y2

50 100 150

(20)

Lower Level Set Example

(jg

140 140 140 140

130 130 130 130

120 120 120 120

110 110 110 110

100 100

100 100 100

90 90

90

90 90

90

80 80

80

80 80

80

70 70

70

70 70

70

60

60

60 60

60

50 60 50

50

50

50 50

50 40

40

40

40 40 40

30

30

30

30 30

20

20

20 20

10 10

10

−4 −2 0 2 4

−4

−2 0 2 4

y

Plot of 2x2+ 4y2

(21)

Upper Level Set Example

(jg

0

2 2

4 0

100 200

f(x)

Plot of54x+−9x2+ 78y−13y2

50 100 150

(22)

Upper Level Set Example

(jg

180

180

180 180 160 160

160

160

160

160 140 140

140

140 140

120

120

120

120

120 100

100 100

100

80 80

80

60 60 20 40

0 1 2 3 4 5

0 1 2 3 4 5

y

Plot of 54x+−9x2+ 78y−13y2

(23)

Example

(jg

−2 0

−1 2 0 1

Z

Z=exp(x7xy2+y2)

−1

−0.5 0 0.5 1

(24)

Example

(jg

1.2

1.2

1

1

0.8

0.8

0.6 0.6

0.6 0.6

0.4

0.4 0.4

0.4

0.2 0.2

0.2

0.2 0.2

0.2

0

00

0

0.2

0.2

0.2

0.2

0.2

0.2

−0.4

0.4

0.4

0.4

0.6

−0.6

−0.6

−0.6

0.8

0.8

1

1

−1.2

1.2

−2 −1 0 1 2

−2

−1 0 1 2

y

Z=exp(x7xy2+y2)

(25)

Convexity, Concavity, and Optima

Constrained optimization problems(jg

Theorem

Suppose that S is convex and thatf(x) is convex on S for the problem minxSf(x), then

Ifx is locally minimal, then x is globally minimal The setX of global optimal solutions is convex Iff is strictly convex, thenx is unique

(26)

Examples

(jg

Problem 1

Minimize −x2lnx1+ x91 +x22 Subject to: 1.0≤x1 ≤5.0 0.6≤x2 ≤3.6

(27)

What does the function look like?

(jg

1 2

3 3

4 5

0 20

f(x)

Plot of −x2ln(x1) +x91 +x22

5 10 15 20 25

(28)

Problem 2

Minimize P3

i=1−ilnxi

Subject to: P3

i=1xi = 6

xi ≤3.5i = 1,2,3 xi ≥1.5i = 1,2,3

(29)

Class exercises

(jg

Show that f(x) =||x||= q

P

ixi2 is convex

Prove that any level set of a convex function is a convex set

(30)

Other Types of Convexity

(jg

The idea of pseudoconvexityof a function is to extend the class of functions for which stationarity is a sufficient condition for global optimality. If f is defined on an open set X and is differentiable we define the concept of pseudoconvexity.

A differentiable function f ispseudoconvex if

∇f(x)·(x0−x)≥0⇒f(x0)≥f(x) ∀x,x0 ∈X or alternatively ..

f(x0)<f(x)⇒ ∇f(x)(x0−x)<0 ∀x,x0∈X A function f ispseudoconcave iff −f is pseudoconvex

Note that iff is convex and differentiable, and X is open, thenf is

(31)

Other Types of Convexity

(jg

A function isquasiconvex if all lower level sets are convex That is, the following sets are convex

S0 ={x:f(x)≤β}

A function isquasiconcaveif all upper level sets are convex That is, the following sets are convex

S0 ={x:f(x)≥β}

Note that iff is convex and differentiable, and X is open, thenf is also quasiconvex

Convexity properties

(32)

Exercises

(jg

Show the following

f(x) =x+x3 is pseudoconvexbut notconvex f(x) =x3 isquasiconvex but notpseudoconvex

(33)

Graphically

(jg

−4

−2 0 2 4

f(x)

Plot of x3+x andx3

(34)

Exercises

(jg

Convexity Questions

Can a function be both convex and concave?

Is a convex function of a convex function convex?

Is a convex combination of convex functions convex?

Is the intersection of convex sets convex?

(35)

Unconstrained problem

(jg

minf(x) s.t. x∈Rn

Necessary optimality condition for xo to be a local minimum

∇f(xo) = 0 andH(xo) is positive semidefinite Sufficientoptimality condition for xo to be a local minimum

∇f(xo) = 0 andH(xo) is positive definite Necessary and sufficient

(36)

Unconstrained example

(jg

minf(x) = (x2−1)3 f0(x) = 6x(x2−1)2= 0 for x = 0,±1 H(x) = 24x2(x2−1) + 6(x2−1)2 H(0) = 6 and H(±1) = 0

Therefore x= 0 is a local minimum (actually the global minimum) x =±1 are saddle points

(37)

What does the function look like?

(jg

−1 0 1 2

f(x)

f(x)=(x2−1)3

(38)

Class Exercise

(jg

Problem

SupposeA is anm∗n matrix, b is a givenm vector, find min||Ax−b||2

Referencer

RELATEREDE DOKUMENTER

In order to model the non-residential building stock of Odense, they used material intensity data from three sources: Gontia’s ongoing work on non-residential buildings in

The original secure wiki model requires that contributors and articles are associated with an integrity level and that these integrity levels determine if a contributor can edit

When we argue that the former Swedish model, Folkhemsmodellen (Peoples home model) or Rehn-Meidner model, is an alternative to the paradigms and models that are dominant today, it

The conducted research has hereby shown that organizations pursue to implement a blockchain, which can support their circular business model and their take-back system in order

Retailers  demand  different  products  and  their  procurement  process  determine  the  relationship  with   the  processor..  The  supermarkets   and

In recent papers Trolle and Schwartz (2009) and Trolle and Schwartz (2010) estimate a model based on a HJM framework with stochastic volatility and find that their model is able

How can both an anti-developmentalist order in foreign economic policy and a form of developmental state coexist, and how can either fit within the neoliberal

It is also expected that the internship site will provide the student with an organisational and social framework that helps students to learn from others, and at the same time is