• Ingen resultater fundet

Convexity and Optimization

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Convexity and Optimization"

Copied!
41
0
0

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

Hele teksten

(1)

Convexity and Optimization

Richard Lusby

DTU Management Engineering

(2)

Class Exercises From Last Time

(3)

Today’s Material

•Extrema

•Convex Function

•Convex Sets

•Other Convexity Concepts

•Unconstrained Optimization

(4)

Extrema

Problem

max f(x)s.t. x∈S

max{f(x) :x∈S}

•Global maximumx

f(x)≥f(x) ∀x∈S

•Local maximumxo:

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

•strictmaximum/minimum defined similarly

(5)

Weierstrass theorem:

Theorem

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

(6)

Supremum and Infimum

Supremum

The supremum of a setS having a partial order is the least upper bound ofS (if it exists) and is denoted supS.

Infimum

The infimum of a setS having a partial order is the greatest lower bound ofS (if it exists) and is denoted infS.

•If the extrema are not achieved:

•max→sup

•min →inf

•Examples

(7)

Finding Optimal Solutions

Every method for finding and characterizing optimal solutions is based on

optimality conditions

- either

necessary

or

sufficient

Necessary Condition

A conditionC1(x)isnecessaryifC1(x)is satisfied by every optimal solution x(and possibly some other solutions as well).

Sufficient Condition

A conditionC2(x)issufficientifC2(x)ensures thatx is optimal (but some optimal solutions may not satisfyC2(x).

Mathematically

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

(8)

Finding Optimal Solutions

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 from

xo

in

S

as

S(xo

)

Improving Direction

s∈Rn is called animprovingdirection if there exists (s)>0 such that f(xo+s)< f(xo) ∀: 0< ≤(s)

(9)

Finding Optimal Solutions

Local Optima

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

f(xo+2s)< f(xo+1s)for0≤1< 2≤(s)

Stated otherwise: A necessary condition for local optimality is

F

(x

o

)

∩S(xo

) =

(10)

Improving Feasible Directions

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

stationary

with respect to

f(.)

(11)

What if stationarity is not enough?

•Supposef is twice continuously differentiable

•Analyse the Hessian matrix forf atxo

2f(xo) =

2(f(xo))

∂xi∂xj

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

Sufficient Condition

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

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

(12)

What if Stationarity is not Enough?

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

•Note that positive definiteness is not a necessary condition

•E.g. look at f(x) =x4 forxo= 0

•Similar statements hold for maximization problems

•Key concept here is negative definiteness

(13)

Definiteness of a Matrix

•A number of criteria regarding the definiteness of a matrix exist

•A symmetricn×nmatrixAispositive definiteif and only if xTAx>0 ∀x∈Rn\{0}

•Positive semidefiniteis defined likewise with0000 instead of00>00

•Negative (semi) definiteis defined by reversing the inequality signs to00<00and

0000, respectively.

Necessary

conditions for positive definiteness:

•Ais regular withdet(A)>0

•A−1 is positive definite

(14)

Definiteness of a Matrix

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 ofAare positive

(15)

Necessary and Sufficient Conditions

Theorem

Suppose thatf(.)is differentiable at a local minimumxo. Then∇f(xo)s≥0for s∈S(xo). Iff(.)is twice differentiable atxo and∇f(xo) = 0, then

sT2f(xo)s≥0∀s∈S(xo)

Theorem

Suppose thatS is convex and non-empty,f(.)differentiable, and thatxo∈S.

Suppose furthermore thatf(.)is convex.

•xois a local minimum if and only ifxo is a global minimum

•xois a local (and hence global) minimum if and only if

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

(16)

Convex Combination

Convex combination

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

(17)

Convex function

Convex Functions

A convex function lies below itschord

f(α1x12x2)≤α1f(x1) +α2f(x2)

•Astrictlyconvex 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

•Strictly convex not analogous!

•A functionf is concaveiff−f is convex

EOQ objective function: T(Q) =dK/Q+cd+hQ/2?

(18)

Convex function

Convex Functions

A convex function lies below itschord

f(α1x12x2)≤α1f(x1) +α2f(x2)

•Astrictlyconvex 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

•Strictly convex not analogous!

•A functionf is concaveiff−f is convex

(19)

Economic Order Quantity Model

The problem

TheEconomic Order Quantity Model is 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

•Q= The order quantity (arrives all at once)

(20)

Convex sets

Definition

Aconvex 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)≤β}

(21)

Lower Level Set Example

x2 x1

x1+x23 x1+ 3x27

(22)

Lower Level Set Example

y2 y1

y1+y21 y1+ 3y22

(23)

Upper Level Set Example

4

2

0 2

4

4

2

0 2 4

0 100

x y

z

Plot of 2x

2

+ 4y

2

0

50

100

150

(24)

Upper Level Set Example

140 140

130

130 120130

120 110

110

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

y

Plot of 2x

2

+ 4y

2

(25)

Example

0

2

4 0

2

4 0

100 200

x y

z

Plot of 54x +

9x

2

+ 78y

13y

2

0

50

100

150

(26)

Example

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

20 60

1 2 3 4 5

y

Plot of 54x +

9x

2

+ 78y

13y

2

(27)

Convexity, Concavity, and Optima

Theorem

Suppose thatS is convex and thatf(x)is convex onS for the problem minx∈Sf(x), then

•Ifx is locally minimal, thenx is globally minimal

•The setXof global optimal solutions is convex

•Iff is strictly convex, then xis unique

(28)

Examples

Problem 1

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

(29)

What does the function look like?

2

0 2

2

0

1 2 0 1

x

y

z

z=exp(x7xy2+y2)

1

0.5

0

0.5

1

(30)

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

(31)

Class exercises

•Show thatf(x) =||x||=pP

ix2i is convex

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

(32)

Other Types of Convexity

•The idea ofpseudoconvexityof a function is to extend the class of functions for which stationarity is a sufficient condition for global optimality. Iff is defined on an open setX and is differentiable we define the concept of pseudoconvexity.

•A differentiable functionf ispseudoconvexif

∇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 functionf is pseudoconcaveiff −f is pseudoconvex

•Note that iff is convex and differentiable, andX is open, thenf is also

(33)

Other Types of Convexity

•A function isquasiconvexif 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, andX is open, thenf is also quasiconvex

•Convexity properties

Convex ⇒ pseudoconvex ⇒ quasiconvex

(34)

Exercises

Show the following

•f(x) =x+x3 ispseudoconvexbut notconvex

•f(x) =x3 isquasiconvexbut not pseudoconvex

(35)

Graphically

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)

(36)

Exercises

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?

(37)

Unconstrained problem

min

f

(x) s.t.

x∈Rn

•Necessaryoptimality condition for xo to be a local minimum

∇f(xo) = 0andH(xo)is positive semidefinite

•Sufficientoptimality condition forxoto be a local minimum

∇f(xo) = 0andH(xo)is positive definite

•Necessary and sufficient

•Supposef is pseudoconvex

•x is a global minimum iff∇f(x) = 0

(38)

Unconstrained example

min

f

(x) = (x

2

1)

3

•f0(x) = 6x(x2−1)2= 0 forx= 0,±1

•H(x) = 24x2(x2−1) + 6(x2−1)2

•H(0) = 6 andH(±1) = 0

•Thereforex= 0is a local minimum (actually the global minimum)

•x=±1are saddle points

(39)

What does the function look like?

1 2

3 4

5 1 2

3 4

5 0

20

x1 x2

f

(

x

)

Plot of

−x2ln(x1

) +

x91

+

x22

0

5

10

15

20

25

(40)

Class Exercise

Problem

SupposeAis anm∗nmatrix,bis a givenmvector, find min||Ax−b||2

(41)

Richard M. Lusby

DTU Management Engineering, Technical University of Denmark

Building 424, Room 208 rmlu@dtu.dk

2800 Kgs. Lyngby, Denmark phone +45 4525 3084 http://www.man.dtu.dk

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