Nonlinear Programming Solution A
Nonlinear Programming Solution A
Nonlinear Programming Solution A
(u
-
) < 0.
u
f(u)
a
u *
b
u
f(u)
a
u * b
u
f(u)
a
u * b
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
29
Unimodal Functions
A single variable function f is unimodal if there is at most
one local maximum (or at most one local minimum) .
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
30
How to find if a function of several variables
is Convex or Concave?
Use of Hessian Matrix
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
31
The Hessian Matrix H(X) is the nn matrix whose i
th
row are
j
f
x
c
c
2 2 2
2
1 1 2 1
2 2 2
2
1 2 2 2
2 2 2
2
1 2
. .
. .
.
.
.
. . .
n
n
n n n
f f f
x x x x x
f f f
x x x x x
f f f
x x x x x
(
c c c
(
c c c c c
(
(
c c c
(
c c c c c
(
(
(
(
(
c c c
(
(
c c c c c
i.e. H(X) =
with respect to x
i
.
the partial derivates of
(j =1,2,..n)
(i =1,2,..n)
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
32
(
=
+ + =
2 2
2 6
) , ( Then
2 ) ( If
1
2 1
2
2 2 1
3
1
x
x x H
x x x x x f
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
33
Principal Minor
The i
th
principal minor of an n x n matrix is the determinant of the i x i matrix
obtained by deleting (n i) rows and corresponding (n i) columns of the
matrix.
Example
4 12 2 . 2 2 . 6
is minor principal leading second The
2. and 6 are minors principal first The
2 2
2 6
) , ( Then
2 ) ( If
1 1
1
1
2 1
2
2 2 1
3
1
=
(
=
+ + =
x x
x
x
x x H
x x x x x f
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
34
Leading Principal Minor
The k
th
leading principal minor of an n x n matrix is the determinant of the k
x k matrix obtained by deleting the last (n k) rows and columns of the
matrix.
Example
4 12 2 . 2 2 . 6
is minor principal leading second The
6 is minor principal leading first The
2 2
2 6
) , ( Then
2 ) ( If
1 1
1
1
2 1
2
2 2 1
3
1
=
(
=
+ + =
x x
x
x
x x H
x x x x x f
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
35
e. nonnegativ are of minors principal all ,
each for if only and if S on function convex a is ) ,..., , (
) ,..., , ( Then S. ) ,..., , ( point each for derivative
partial order second continuous has ) ,..., , ( Suppose
2 1
2 1 2 1
2 1
H S x
x x x f
x x x f x x x x
x x x f
n
n n
n
e
e =
convex. is ) , ( theorem, above the from Therefore
0. 0 2(2) - 2(2) minor principal second The 0). 2 equal (both
entries diagonal the are Hessian the of minors principal first Thye
2 2
2 2
2 ) , (
: Example
2 1
2
1 2 1
2
1 2 1
x x f
H
x x x x x x f
> = >
(
=
+ + =
Convex Function
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
36
. ) 1 ( as sign same
the have of minors principal zero - non all ; ,..., 2 , 1 and
each for if only and if S on function concave a is
) ,..., , ( Then S. ) ,..., , ( point each for derivative
partial order second continuous has ) ,..., , ( Suppose
2 1 2 1
2 1
k
n n
n
H n k S x
x x x f x x x x
x x x f
= e
e =
concave. is ) , ( theorem, above the from Therefore
0. 7 (-1)(-1) - 2(-4) -
minor principal second The e. nonpositiv both 0) (-2,-4
entries diagonal the are Hessian the of minors principal first Thye
4 1
1 2
2 2 ) , (
: Example
2 1
2
1 2 1
2
1 2 1
x x f
H
x x x x x x f
> =
s
(
=
=
Concave Function
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
37
Example
A monopolist producing a single product has two types of
customers. If q
1
units are produced for customer-1, then
customer-1 is willing to pay 70 4q
1
rupees. If q
2
units are
produced for customer-2, then customer-2 is willing to pay 150
15q
2
rupees. For q > 0, the cost of manufacturing q units is
100 - 15q rupees. To maximize profit, how much should the
monopolist sell to each customer?
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
38
Solution
f(q
1
, q
2
)= q
1
(70 4q
1
) + q
2
(100 - 15q
2
) 100 15q
1
- 15q
2
-8 0
H(q
1
, q
2
)=
0 -30
Objective function is concave and hence (55/8, 9/2) maximize
it.
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
39
Exercise-2
A DVD costs Rs. 55 to produce. We are considering
charging a price of between Rs. 110 and Rs. 150 for this
DVD. For a price of Rs. 110, Rs. 130 and Rs. 150, the
marketing department estimates the demand for the DVD
in the three regions where the DVD would be sold.
What price would maximize profit?
Price in Rs. Demand (in Thousands)
Region 1 Region 2 Region 3
110 35 32 24
130 32 27 17
150 22 16 9
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
40
Solution
The demands curves for Region 1, Region-2, Region-3
can be estimated using nonlinear regression
The curves for Regions 2 and 3 look very much similar
Region-1
0
5
10
15
20
25
30
35
40
0 50 100 150 200
Price
D
e
m
a
n
d
Demand
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
41
Region-1: Demand1= -0.87 (price)
2
+1.95*(price)-73.625
Region-2: Demand2= -0.75 (price)
2
+1.55*(price)-47.75
Region-3: Demand3= -0.125 (price)
2
+0.005*(price)-44.625
Total demand (TD) = Demand1+Demand2+Demand3
Profit = (price-55)*TD
Profit is a Non-linear function of one variable. The function
is concave and the optimal price is Rs. 129
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
42
Lagrange multipliers
Lagrange multipliers can be used to solve NLPs
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
43
Lagrange multipliers-Examples
A company is planning to spend $10,000 on advertising. It
costs $ 3,000 per minute to advertise on television and $ 1,000
per minute to advertise on radio. If the firm buys x minutes of
television advertising and y minutes of radio advertising, then
its revenue in thousands of dollars is given by
f(x, y) = -2x
2
y
2
+ xy + 8x + 3y
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
44
Kuhn-Tucker Conditions
KT Conditions, sometimes known as Karush-Kuhn-Tucker
(KKT) conditions
Gives necessary and sufficient conditions for
to be an optimal solution for NLP
) ,..., , (
2 1 n
x x x x =
m i
b x x x g
x x x f
i n i
n
,..., 2 , 1
) ,..., , ( S.t.
) ,..., , ( min) (or max
2 1
2 1
=
s
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
45
Kuhn-Tucker Conditions [contd.]
For maximization problems. If
is an optimal solution to the problem, then
must satisfy the m constraints of the NLP, and there must exist
multipliers satisfying
( )
| | ( )
( ) m 2 1 i 0
m 2 1 i 0 b x g
n 2 1 j 0
x
x g
x
x f
i i i
m i
1 i
j
i
i
j
,..., , ;
,..., , ; ) (
,..., , ;
) ( ) (
= >
= =
= =
c
c
c
c
=
=
) ,..., , (
2 1 n
x x x x =
) ,..., , (
2 1 n
x x x x =
m
,..., ,
2 1
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
46
Kuhn-Tucker Conditions [contd.]
For minimization problems. If
is an optimal solution to the problem, then
must satisfy the m constraints of the NLP, and there must exist
multipliers satisfying
( )
| | ( )
( ) m 2 1 i 0
m 2 1 i 0 b x g
n 2 1 j 0
x
x g
x
x f
i i i
m i
1 i
j
i
i
j
,..., , ;
,..., , ; ) (
,..., , ;
) ( ) (
= >
= =
= =
c
c
+
c
c
=
=
) ,..., , (
2 1 n
x x x x =
) ,..., , (
2 1 n
x x x x =
m
,..., ,
2 1
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
47
Sufficiency of the KKT conditions:
Sense of
optimization
maximization
minimization
Required conditions
Objective
function
Solution
space
concave
convex
Convex set
Convex set
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
48
It is simpler to verify whether a function is
concave or convex than to prove that the
solution space is a convex set.
We thus give a set of sufficient conditions
that are easier to check that the solution
space is a convex set in terms of the
convexity or concavity of the constraint
functions.
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
49
Consider the general non-linear problem:
Maximize or minimize z = f(X)
Subject to g
i
(X) 0 i = 1,2,.., p
g
i
(X) > 0 i = p+1, p+2,.., q
g
i
(X) = 0 i = q+1, q+2,.., r
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
50
Sufficiency of the KKT conditions:
Sense of
optimization
maximization
minimization
Required conditions
> 0
0
URS
convex
concave
linear
convex
1 i p
p+1 i q
q+1 i r
f(X) g
i
(X)
i
> 0
0
URS
convex
concave
linear
1 i p
p+1 i q
q+1 i r
concave
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
51
The conditions in the above table
represent only a subset of the conditions
given in the earlier table.
The reason is that a solution space may be
convex without satisfying the conditions
of the constraint functions given in the
second table.
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
52
Problem Use the KKT conditions to derive
an optimal solution for the following
problem:
maximize f(x
1
, x
2
) = x
1
+ 2x
2
x
2
3
subject to x
1
+ x
2
1
x
1
0
x
2
0
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
53
Solution: Here there are three constraints
namely,
g
1
(x
1
,x
2
) = x
1
+x
2
- 1 0
g
2
(x
1
,x
2
) = - x
1
0
g
3
(x
1
,x
2
) = - x
2
0
Hence the KKT conditions become
0
1
3
3
1
2
2
1
1
1
1
=
c
c
c
c
c
c
c
c
x
g
x
g
x
g
x
f
1
0,
2
0,
3
0
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
54
1
g
1
(x
1
,x
2
) = 0
2
g
2
(x
1
,x
2
) = 0
3
g
3
(x
1
,x
2
) = 0
g
1
(x
1
,x
2
) 0
g
2
(x
1
,x
2
) 0
g
3
(x
1
,x
2
) 0
Note:
f is concave
g
i
are convex,
maximization
problem
these KKT
conditions are
sufficient at the
optimum point
0
2
3
3
2
2
2
2
1
1
2
=
c
c
c
c
c
c
c
c
x
g
x
g
x
g
x
f
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
55
i.e. 1
1
+
2
= 0 (1)
2 3x
2
2
1
+
3
= 0 (2)
1
(x
1
+ x
2
1) = 0 (3)
2
x
1
= 0 (4)
3
x
2
= 0 (5)
x
1
+ x
2
1 0 (6)
x
1
0 (7)
x
2
0 (8)
1
0 (9)
2
0 (10) and
3
0 (11)
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
56
(1) gives
1
= 1 +
2
1 >0 (using 10)
Hence (3) gives x
1
+ x
2
= 1 (12)
Thus both x
1
, x
2
cannot be zero.
So let x
1
>0 (4) gives
2
= 0. therefore
1
= 1
if now x
2
= 0, then (2) gives 2 0 1 +
3
= 0 or
3
< 0
not possible
Therefore x
2
> 0
hence (5) gives
3
= 0 and then (2) gives x
2
2
= 1/3 so x
2
=1/3
And so x
1
= 1- 1/3
Max f = 1 - 1/3 + 2/3 1/33 = 1 + (2 / 33 )
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
57
Maximize f(x) = 20x
1
+ 10 x
2
Subject to x
1
2
+ x
2
2
1
x
1
+ 2x
2
2
x
1
0, x
2
0
KKT conditions become
20 - 2
1
x
1
2
+
3
= 0
10 - 2
1
x
2
2
2
+
4
= 0
1
(x
1
2
+ x
2
2
1) =0
1
(x
1
+ 2x
2
2) =0
3
x
1
=0
(0,1)
(4/5,3/5)
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
58
4
x
2
=0
x
1
2
+ x
2
2
1
x
1
+ 2x
2
2
x
1
0
x
2
0
1
0
2
0
3
0
4
0
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
59
From the figure it is clear that max f occurs at (x
1
, x
2
) where
x
1
, x
2
>0.
3
= 0,
4
= 0
suppose x
1
+ 2x
2
2 0
2
= 0 , therefore we get 20 - 2
1
x
1
=0
10 - 2
1
x
2
=0
1
x
1
=10 and
1
x
2
=5, squaring and adding we get
1
2
= 125
1
= 55
therefore x
1
= 2/5, x
2
= 1/5, f= 50/5 >22
2
0 x
1
+ x
2
2 = 0
Therefore x
1
=0, x
2
=1, f =10
Or x
1
= 4/5, x
2
= 3/5, f=22
Therefore max f occurs at x
1
= 2/5, x
2
= 1/5
1
9 : 4
2 1
2
2
2
1
s +
s +
x x
x x
1 1 1 2
1 2 2
2: 2 2 0
1 -2 0
x x
x
=
=
Thus the KKT conditions are:
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
63
Now (from 2) gives
0
1
= 1
2
=
Not possible.
Hence
0
1
=
and so
9
2
2
2
1
= + x x
Assume . So (1st equation of ) (2) gives
0
2
=
0 ) 1 ( 2
1 1
= x Since we get x
1
= 0
0
1
s
(5)
From (5), we get
3
2
= x
2nd equation of (2) says (with ) x
2
= -3
, 0
1
< 0
2
=
Thus the optimal solution is: The optimal value is :
1 2 1 2
1
0, 3, , 0
6
x x = = = = 3 z =
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
64
Problem-1
A monopolist can purchase up to 17.25 oz of a chemical for
$10/oz. At a cost of $3/oz, the chemical can be processed
into an ounce of product-1; or, at a cost of $5/oz, the
chemical can be processed into an ounce of product-2. If x
1
oz of product-1 are produced, it sells for a price of $(30 x
1
)
per ounce. If x
2
oz of product-2 are produced, it sells for a
price of $(50 2x
2
) per ounce. Determine how the
monopolist can maximize profits.
Dr. A.K. Bardhan, Faculty of Management Studies, University of Delhi
65
Problem-2
A power company faces demands during both peak and off-
peak times. If a price of p
1
dollars per KWH is charged
during the peak time customers will demand (60 0.5
p
1
)KWH of power. If a price of p
2
dollars per KWH is
charged during the off-peak time customers will demand (40
p
2
)KWH of power. The power company must have
sufficient capacity to meet demand during both the peak and
off-peak time.
It costs $10 per day to maintain each KWH of capacity.
Determine how the power company can maximize daily
revenues less operating costs.