FE501 – 1130 Non-Linear Programming

Prerequisites (Statistical Content)

Random Variables and How to Describe Random Variables

Note: Moved to Here

Nonlinear Programming

For an LP, our goal was to maximize or minimize a linear function subject to a linear constraints. But in many interesting maximization and minimization problems, the objective function may not be a linear function or some of the constraints may not be linear constraints. Such an optimization problem is called a nonlinear programming problem (NLP).

NLP: (Either one or both of below satisfies)

 

A general nonlinear programming problem (NLP) can be expressed as follows:

image-20221219221924243

An NLP with no constraints is an unconstrained NLP

Notes:

image-20221219222151241

Quadratic Programming

image-20221219223025859

Quadratic Programming and Portfolio Selection

An investor who has fixed amount of money, wants to maximize the expected return (portfolio), while simultaneously ensuring that the risk is small (as measured by the variance).

 

General Problem Types:

  1. Maximize expected return with respect to a limited variance.
  2. Minimize portfolio risk (variance) with respect to a considerable expected return.

image-20221219223958502

Portfolio Optimization Problem (680)

Example 1. Variance Minimization

Problem description: Total amount to invest 1000$ . Let Si be the random variable representing the annual return on $1 invested in stock i. We are given the following formations:

E(S1)=0.14

E(S2)=0.11

E(S3)=0.10

varS1=0.20

varS2=0.08

varS3=0.18

cov (S1,S2)=0.05

cov (S1,S3)=0.02

cov (S2,S3)=0.03

Question: Formulate a QPP that can be used to find the portfolio that attins an expected annual return of at least 12% and minimizes the variance of the annual dollar return on the portfolio.

 

Decision Variables:

Let xi the amount of money that invested in i th stock. Then the annual return can be calculated as:

(1)x1×S1+x2×S2+x3×S31000

Objective Function:

(to minimize the variance)

(2)minvar(x1S1+x2S2+x3S3)

And also we have:

cov(x,y)=rσxσyr=cov(x,y)var(x)var(y)correlation coefficientvar(X+a)=var(X)var(aX)=a2var(X)var(X1+X2)=var(X1)+var(X2)+2cov(X1,X2)var(x1+x2++xn)=i=1nvar(xi)+(i,j):ijcov(xi,xj)var(i=1NaiXi)=i=1Nai2Var(Xi)+21ijNaiajCov(Xi,Xj)

So that we have:

var(x1S1+x2S2+x3S3)=x12var(S1)+x22var(S2)+x32var(S3)+2x1x2cov(S1,S2)+2x1x3cov(S1,S3)+2x2x3cov(S2,S3)

Formulating the QPP

 

(3)min0.20x12+0.08x22+0.18x32+2×0.05×x1x2+2×0.02×x1x3+2×0.03×x2x3s.t.0.14x1+0.11x2+0.10x310000.12i=13xi=1000xi0(i=1,2,3)

 

Generalizing QPP Portfolio Optimization Problems

Generally there are two types of Portfolio Optimization problems in QP.

Either in the form of:

minvar[investment]s.t.E[investment]Θ
  1. (4)
(5)maxE[investment]s.t.var(investment)α

Profit Maximization Problem

It costs a company c dollars per unit to manufacture a product. Comsuper price for the product is p , customers demand is D(p). Formulate an Optimization method to maximize the profit of the company so that a fair price of p can be determined.

(6)decision variablepprofit(pc)D(p) max(pc)D(p)s.t.p0

Production Maximization

If K units of Capital and L units of Labor used, a company can produce KL units of product. Capital can be purchased at $ 4 / unit and labor at $ 1 / unit. A total of $ 8 is available to purchase capital and labor. Formulate an Optimization problem to maximize the quantity of the product that can be manufactored.

 

Decision variables:

LetK = units of capital purchased.L = units of Labor purchased.

The quantity of product = KL for given K and L.

The total cost = 4K + 1 L

So that we have:

maxz=KLs.t.4K+1L8K,L0

CleanShot 2022-12-20 at 11.25.39

 

image-20221220120551875

 

Notes:

Three curves above are the isoprofit curve when z=1,z=2 and z=4. Colored region is the feasible region. The optimal solution to the problem is (1,4) occures where an isoprofit curve is tangent to the boundary of the feasible region.

Tangent of xy at point B(1,4) is the line 4x+y=8

Example 1

(7)min(x1)2+(y2)2s.t.x+y8x,y≥=0

by definition this is a quadratic nonlinear problem

It is nonlinear cause the objective function is nonlinear, it is quadratic because the degree of x,y is 2.

Analysis:

(8)for any given x,y we have: (x1)2≥=0(y2)2≥=0obviously ,min(x1)2+(y2)2=0when: (x1)=0(y2)=0

We can also find the solution by drawing the isoprofit curve for z:

image-20221220122121266

 

so the (x,y)=(1,2)

Which is the optimal solution for the problem.

In Linear programming, the optimal solutions occur at the cornor points, however, on NLP, the optimal solutions can occur anywhere.

NLPs with only one decision variables

min x2

(9)min f(x)=x2s.t. xR

image-20221220122655043

x=0

max x2

(10)max f(x)=x2s.t. xR

 

cause when x+ we have x2+ , so the problem is unbounded.

Types of NLPs

NLP
variables are continuous
variables are integer
unconstrained
Constrained
unconstrained
Constrained
single variable
multiple variables
Mixed Integer Nonlinear
(11)min x2s.t.xR

2. Multiple variable:

(12)min(x1)2+(y2)2s.t.(x,y)R2
(13)maxexy2s.t.x+y4x2+y5

Local Minimum(Maximum) (or local extremum) vs Optimal Minimum(Maximum)

image-20221220125156151

 

Suppose that we want to minimize the f(x) drawn above.

for point x1 we have the following:

(14)f(x1)f(x),xN(x1)x is the neibourhood of x1

So that, we can conclude that x1 is a local minimum.

Similarly, x2 is also a local minimum.

But unfortunately none of local minimum points x1 or x2 is the global minimum (x=a).

for gloabl minimum (x) we have:

(15)f(x)f(x)xDomain

Convexity and Concavity

enter image description here

 

Facts:

  1. For a convex function, a local minimum is always global minimum.
  2. For a concave function, a local maximum is always a global maximum.
  3. For a function neither convex nor concave, a local point may not be a global point.

 

solutions: gradient accent, gradient decent, section serach , newtons method are the numerical technicchs to find optional points.

Converting a NLP to LP

Suppose we have aproblem defined as following:

(16)minz=2x+4ys.t.x.y5x{0,1},y0

This is a Mixed Interger Nonlinear Programming Problems.

To solve this problem, we try to convert this to a LP:

(17)letu=xy

for the values of u, x, y:

 

 possible values of u 
xyu
000
1aa
   

 

(18)ifx=0,u=0ifx=1,u=y

Let’s define a big positve number: M :

so that we can introduce new constraints as:

(19)uy(20)uMx(21)uy+M(1x)

Suppose:

when x=0:uy,u0,uyMu=0
when x=1:uy,uM,uyu=y

 

So that the original problem becomes:

(22)minz=2x+4ys.t.u5uyuMxuyM(1x)

In general if we have 1 binary and at maximum 1 continous variabls, it is possible to convert the problem to a LP.

 

Example:

Suppose in the previous problem y also is a binary variable:

(23)x,y{1,0}

Then we can change it to:

(24)uxyuxuyux+y1

[End of 11.30]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

References