Transcript Lecture 10. Constrained Optimization
Optimization with inequality constraints
Consider the problem max ๐ฅ 1 ,๐ฅ 2 ๐ข ๐ฅ 1 , ๐ฅ ๐ . ๐ก. ๐ฆ + ๐ฅ โค 4 2 ๐ฆ + 2๐ฅ โค 6 2
Optimization with inequality constraints: the Kuhn-Tucker (KT) conditions
The
KT conditions
for the problem max
x f
(
x
) subject to
g j
(
x
) โค
c j
for
j
= 1, ...,
m
are L
i
'(
x
) = 0 for
i
= 1 ,...,
n
ฮป
j
โฅ 0, where
g j
(
x
) โค
c j
and ฮป
j
[
g j
(
x
) โ
c j
] = 0 for
j
= 1, ...,
m
.
๐ฟ(๐ฅ) = ๐ (๐ฅ) โ ๐ ๐=1 ๐ ๐ (๐ ๐ (๐ฅ) โ ๐ ๐ ) .
Example max {x 1 ,x 2 } โ(x 1 โ 4) 2 โ (x x 1 x 1 s. t.
+ x 2 + 3x 2 โค 4 โค 9 2 โ 4) 2 ๐ฟ ๐ฅ = โ x 1 โ 4 2 โ x 2 โ 4 2 โ ๐ 1 (x 1 + x 2 โ 4) โ ๐ 2 (x 1 + 3x 2 โ 9) Kuhn Tucker conditions are โ2(
x
1 โ 4) โ ฮป 1 โ ฮป 2 = 0 โ2(
x
2 โ 4) โ ฮป 1 โ 3ฮป 2 = 0
x
1 +
x
2 โค 4, ฮป 1 โฅ 0, and
x
1 + 3
x
2 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 +
x
2 โ 4)= 0 ฮป 2 (
x
1 + 3
x
2 โ 9)= 0 4
When KT conditions are necessary
Let ๐ and ๐ ๐ for ๐ = 1, โฆ , ๐ be continuously differentiable functions of many variables and let constants. Suppose that ๐ฅ โ ๐ ๐ for solves the problem ๐ = 1, โฆ , ๐ be max ๐ ๐ฅ ๐ . ๐ก. ๐ ๐ (๐ฅ) โค ๐ ๐ ๐๐๐ ๐ = 1, โฆ , ๐ .
Suppose that - either each ๐ ๐ is concave - or each ๐ ๐ is convex and there is some ๐ ๐ (๐ฅ) < ๐ ๐ for ๐ = 1, โฆ , ๐ ๐ฅ such that - or each ๐ ๐ is quasiconvex, ๐ป ๐ ๐ (๐ฅ โ ) โ (0, โฆ , 0) โ๐ , and there is some ๐ฅ such that ๐ ๐ (๐ฅ) < ๐ ๐ for ๐ = 1, โฆ , ๐ .
Then there exists a unique vector ๐ = (๐ 1 , โฆ , ๐ ๐ ) (๐ฅ โ , ๐) satisfies the Kuhn-Tucker conditions such that 5
Example: KT are not necessary conditions for a max max ๐ฅ,๐ฆ ๐ฅ ๐ . ๐ก.
yโ(1โx)
3
โค 0 and y โฅ 0
The constraint does not satisfy any of the conditions in the proposition. Indeed consider the first constraint ๐ฝ = 3(1 โ ๐ฅ) 2 1 ๐ป = โ6(1 โ ๐ฅ) 0 0 0 ๐ป ๐ = 0 3(1 โ ๐ฅ) 2 1 3(1 โ ๐ฅ) โ6(1 โ ๐ฅ) 0 2 1 0 0 Then the constraint is not concave, convex or quasiconvex Quasiconcavity: Slides 36-37 lezione precedente 6
The solution is ๐ฅ = 1 ๐ฆ = 0 0,9 0,7 0,5 0,3 y C1 0,1 -0,1 0 0,2 0,4 0,6 0,8 1 1,2 1,4 1,6 1,8 2 -0,3 -0,5 7
The Lagrangean is ๐ฟ(๐ฅ) = ๐ฅ โ ๐ 1 (๐ฆ โ (1 โ ๐ฅ) 3 ) + ๐ 2 ๐ฆ.
The Kuhn-Tucker conditions are 1 โ 3๐ 1 (1 โ ๐ฅ) 2 = 0 โ๐ 1 + ๐ 2 = 0 ๐ฆ โ (1 โ ๐ฅ) 3 โค 0 , ๐ 1 โฅ 0 , and ๐ 1 ๐ฆ โ (1 โ ๐ฅ) 3 = 0 โ๐ฆ โค 0 , ๐ 2 โฅ 0 , and ๐ 2 โ๐ฆ = 0 .
These conditions have no solution. From the last condition, either ๐ 2 = 0 or ๐ฆ = 0 . If ๐ 2 = 0 then ๐ 1 = 0 from the second condition, so that no value of ๐ฅ is compatible with the first condition. If ๐ฆ = 0 then from the third condition either ๐ 1 = 0 or ๐ฅ = 1 , both of which are incompatible with the first condition.
the sufficiency of the Kuhn-Tucker conditions (1)
Let ๐ and ๐ ๐ for ๐ = 1, โฆ , ๐ be continuously differentiable functions of many variables and let ๐ ๐ for ๐ = 1, โฆ , ๐ be constants. Consider the problem max ๐ฅ ๐ ๐ฅ ๐ . ๐ก. ๐ Suppose that ๐ โค ๐ ๐ for ๐ = 1, โฆ , ๐ .
- ๐ is concave and - ๐ ๐ is quasiconvex for ๐ = 1, โฆ , ๐ .
If there exists ๐ = (๐ 1 , โฆ , ๐ ๐ ) such that (๐ฅ โ , ๐) satisfies the Kuhn-Tucker conditions then ๐ฅ โ solves the problem 9
the sufficiency of the Kuhn-Tucker conditions (2)
Let ๐ and ๐ ๐ for ๐ = 1, โฆ , ๐ be continuously differentiable functions of many variables and let ๐ ๐ for ๐ = 1, โฆ , ๐ be constants. Consider the problem max ๐ฅ ๐ ๐ฅ ๐ . ๐ก. ๐ Suppose that ๐ โค ๐ ๐ for ๐ = 1, โฆ , ๐ .
- ๐ is twice differentiable and quasiconcave and - ๐ ๐ is quasiconvex for ๐ = 1, โฆ , ๐ .
If there exists ๐ = (๐ 1 , โฆ , ๐ ๐ ) and a value of ๐ฅ โ such that (๐ฅ โ , ๐) satisfies the Kuhn-Tucker conditions and ๐โฒ ๐ (๐ฅ โ ) โ 0 for ๐ = 1, โฆ , ๐ then ๐ฅ โ solves the problem.
10
Necessity and sufficiency of KT conditions
A) The KT conditions are both necessary and sufficient โ
if
the objective function is concave and โ
either
each constraint is linear โ
or
each constraint function is convex and some vector of the variables satisfies all constraints strictly.
Necessity and sufficiency of KT conditions
B) Suppose that - the objective quasiconcave and function is twice differentiable and - every constraint is linear.
Then - If
x
* solves the problem then there exists a unique vector ฮป such that (
x
*, ฮป) satisfies the Kuhn-Tucker conditions, and - if (
x
*, ฮป) satisfies the Kuhn-Tucker conditions and
f i
' (
x
*) โ 0 for
i
= 1, ...,
n
then
x
* solves the problem.
max {๐ฅ 1 ,๐ฅ 2 } [โ(๐ฅ 1
Example
โ 4) 2 โ (๐ฅ 2 โ 4) 2 ] ๐ฅ 1 ๐ฅ 1 ๐ . ๐ก.
+ ๐ฅ 2 + 3๐ฅ 2 โค 4 โค 9 The objective function is concave and the constraints are both linear, so the solutions of the problem are the solutions of the Kuhn-Tucker conditions.
13
Kuhn Tucker conditions are โ2(
x
1 โ 4) โ ฮป 1 โ ฮป 2 = 0 โ2(
x
2 โ 4) โ ฮป 1 โ 3ฮป 2 = 0
x
1 +
x
2 โค 4, ฮป 1 โฅ 0, and
x
1 + 3
x
2 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 +
x
2 โ 4)= 0 ฮป 2 (
x
1 + 3
x
2 โ 9)= 0 To solve this system of condition we have to consider all possibilities about the values of lambdas We have to consider the following 4 cases: 1) ฮป 1 = ฮป 2 = 0 2) ฮป 1 >0 ฮป 2 = 0 3) ฮป 1 =0 ฮป 2 > 0 4) ฮป 1 >0 ฮป 2 > 0 14
Kuhn Tucker conditions are โ2(
x
1 โ2(
x
2
x x
1 1 โ 4) โ ฮป 1 โ 4) โ ฮป 1 โ ฮป 2 โ 3ฮป 2 = 0 = 0 +
x
2 + 3
x
2 โค 4, ฮป 1 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 โฅ 0, and ฮป 2 (
x
1 +
x
2 โ 4)= 0 + 3
x
2 โ 9)= 0
Case 1: ฮป
1
= ฮป
2
= 0
KT conditions are โ2(
x
1 โ2(
x
2
x x
1 1 + โ 4) = 0 โ 4) = 0
x
2 โค 4, + 3
x
2 โค 9 Then
x
1 = 4 and
x
2 =4 It not a solution because the last two inequalities are not satisfied 15
Kuhn Tucker conditions are โ2(
x
1 โ2(
x
2
x x
1 1 โ 4) โ ฮป 1 โ 4) โ ฮป 1 โ ฮป 2 โ 3ฮป 2 = 0 = 0 +
x
2 + 3
x
2 โค 4, ฮป 1 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 โฅ 0, and ฮป 2 (
x
1 +
x
2 โ 4)= 0 + 3
x
2 โ 9)= 0
Case 2: ฮป
1
>0 ฮป
2
= 0
KT conditions are โ2(
x
1 โ2(
x
2
x
1 +
x
2 โ 4) โ ฮป 1 โ 4) โ ฮป 1 โ 4= 0
x
1 + 3
x
2 โค 9, = 0 = 0 From the first 2 equations
x
1 =
x
2 Using the third equation we get
x
1 =
x
2 =2 and ฮป 1 =4 It is a solution because the last inequality is satisfied 16
Kuhn Tucker conditions are โ2(
x
1 โ2(
x
2
x x
1 1 โ 4) โ ฮป 1 โ 4) โ ฮป 1 โ ฮป 2 โ 3ฮป 2 = 0 = 0 +
x
2 + 3
x
2 โค 4, ฮป 1 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 โฅ 0, and ฮป 2 (
x
1 +
x
2 โ 4)= 0 + 3
x
2 โ 9)= 0
Case 3: ฮป
1
=0 ฮป
2
> 0
KT conditions are โ2(
x
1 โ2(
x
2
x
1 +
x
2 โ 4) โ ฮป 2 โ 4) โ 3ฮป 2 = 0 = 0 โค 4
x
1 + 3
x
2 โ 9= 0 From the first 2 equations
x
2 =3
x
1 -8 Using the last equation we get
x
1 = 3.3
It is not a solution because it does not satisfy the inequality 17
Kuhn Tucker conditions are โ2(
x
1 โ2(
x
2
x x
1 1 โ 4) โ ฮป 1 โ 4) โ ฮป 1 โ ฮป 2 โ 3ฮป 2 = 0 = 0 +
x
2 + 3
x
2 โค 4, ฮป 1 โค 9, ฮป 2 โฅ 0, and ฮป 1 (
x
1 โฅ 0, and ฮป 2 (
x
1 +
x
2 โ 4)= 0 + 3
x
2 โ 9)= 0
Case 4: ฮป
1
>0 ฮป
2
> 0
KT conditions are โ2(
x
1 โ 4) โ ฮป 1 โ ฮป 2 = 0 โ2(
x
2 โ 4) โ ฮป 1 โ 3ฮป 2 = 0
x
1 +
x
2 โ 4= 0
x
1 + 3
x
2 = 0 18
KT conditions are โ2(
x
1 โ 4) โ ฮป 1 โ ฮป 2 = 0 โ2(
x
2 โ 4) โ ฮป 1 โ 3ฮป 2 = 0
x
1 +
x
2 โ 4= 0
x
1 + 3
x
2 = 0 Using the last two equation we get
x
1 =1.5 and
x
2 =2.5
Replacing in the first two equation we get the values of lambdas ฮป 1 =6 ฮป 2 = - 1 This is not a solution because it violates the condition ฮป 2 โฅ 0. 19
Solution is
x
1 =
x
2 =2 and ฮป 1 =4 20
Optimization with inequality constraints: non negativity constraints
The general form of such a problem is: max
x f
(
x
) subject to
g j
(
x
) โค
c j
for
j
= 1, ...,
m
and
x i
โฅ 0 for
i
= 1, ...,
n
.
Lagrangean is ๐ฟ ๐ฅ = ๐ ๐ฅ โ ๐ ๐=1 ๐ ๐ ๐ ๐ ๐ฅ โ ๐ ๐ โ ๐ ๐=1 ๐ ๐ + ๐ (โ๐ฅ ๐ ) It is a special case of the general maximization problem with inequality constraints: the nonnegativity constraint on each variable is simply an additional inequality constraint.
Specifically, if we define the function
g m
+
i
for
i
= 1, ...,
n
by
g m
+
i
(
x
) = โ
x i
and let
c m
+
i
= 0 for
i
= 1, ...,
n
, then we may write the problem as max
x f
(
x
) subject to
g j
(
x
) โค
c j
for
j
= 1, ...,
m
+
n
and solve it using the Kuhn-Tucker conditions
Optimization with inequality constraints: non negativity constraints
Approaching the problem in this way involves working with
n
+
m
Lagrange multipliers, which can be difficult if
n
is large.
Then we can use an alternative approach, the
Lagrangean modified
Consider the following problem: max
x f
(
x
) subject to
g j
(
x
) โค
c j
for
j
= 1, ...,
m
and
x i
โฅ 0 for
i
= 1, ...,
n
.
The
modified Lagrangean is:
๐(๐ฅ) = ๐ (๐ฅ) โ ๐ ๐=1 ๐ ๐ (๐ ๐ (๐ฅ) โ ๐ ๐ )
The
modified Lagrangean is:
๐(๐ฅ) = ๐ (๐ฅ) โ ๐ ๐=1 ๐ ๐ (๐ ๐ (๐ฅ) โ ๐ ๐ ) Kuhn-Tucker conditions for the modified Lagrangean: ๐ ๐ โฒ(๐ฅ) โค 0 ๐ ๐ (๐ฅ) โค ๐ ๐ , , ๐ ๐ ๐ฅ ๐ โฅ 0 โฅ 0 and and ๐ฅ ๐ ยท ๐๐โฒ(๐ฅ) = 0 for ๐ = 1, โฆ , ๐ ๐ ๐ ยท [๐ ๐ ๐ฅ โ ๐ ๐ ] = 0 for ๐ = 1, . . , ๐
in any problem for which the original Kuhn-Tucker conditions may be used, we may alternatively use the conditions for the modified Lagrangean. For most problems in which the variables are constrained to be nonnegative, the Kuhn-Tucker conditions for the modified Lagrangean are easier than the conditions for the original Lagrangean Example.
Consider the problem max
x
,
y xy
subject to
x
+
y
โค 6,
x
โฅ 0, and
y
โฅ 0
Function xy is twice-differentiable and quasiconcave and the constraint functions are linear, so the Kuhn-Tucker conditions are necessary and if ((
x
*,
y
*), ฮป*) satisfies these conditions and no partial derivative of the objective function at (
x
*,
y
*) is zero then (
x
*,
y
*) solves the problem.
Solutions of the Kuhn-Tucker conditions at which all derivatives of the objective function are zero may or may not be solutions of the problem We try to solve it 1) using the lagrangean 2) Using the modified lagrangean
1) Using Lagrangean
๐ฟ ๐ฅ, ๐ฆ = ๐ฅ๐ฆ โ ๐ 1 (๐ฅ + ๐ฆ โ 6) โ ๐ 2 (โ๐ฅ) โ ๐ 3 (โ๐ฆ) Kuhn Tucker conditions are: ๐ฆ โ ๐ 1 + ๐ 2 = 0 ๐ฅ โ ๐ 1 + ๐ 3 = 0 ๐ 1 โฅ 0, ๐ฅ + ๐ฆ โค 6, ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 ๐ 2 โฅ 0, โ๐ฅ โค 0, ๐ 2 โ๐ฅ = 0 ๐ 3 โฅ 0, โ๐ฆ โค 0, ๐ 3 โ๐ฆ = 0 27
We have to consider the following 8 cases: 1) ฮป 1 =0 ฮป 2 = 0 ฮป 3 = 0 2) ฮป 1 >0 ฮป 2 = 0 ฮป 3 = 0 3) ฮป 1 =0 ฮป 2 > 0 ฮป 3 = 0 4) ฮป 1 >0 ฮป 2 > 0 ฮป 3 = 0 5) ฮป 1 =0 ฮป 2 = 0 ฮป 3 > 0 6) ฮป 1 >0 ฮป 2 = 0 ฮป 3 > 0 7) ฮป 1 =0 ฮป 2 > 0 ฮป 3 > 0 8) ฮป 1 >0 ฮป 2 > 0 ฮป 3 > 0 28
Case 1: ฮป
1
=0 ฮป
2
= 0 ฮป
3
= 0
Kuhn Tucker conditions are: ๐ฆ = 0 ๐ฅ = 0 ๐ 1 โฅ 0, ๐ 2 โฅ 0, ๐ฅ + ๐ฆ โค 6, โ๐ฅ โค 0, ๐ 3 โฅ 0, โ๐ฆ โค 0, ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 ๐ 2 โ๐ฅ = 0 ๐ 3 โ๐ฆ = 0 All conditions are satisfied, but the first derivatives of the objective function, evaluated at x=y=0 are equal to zero. Then this could be a solution.
29
Consider now ฮป
1
=0
Kuhn Tucker conditions are: ๐ 1 โฅ 0, ๐ 2 ๐ 3 โฅ 0, โฅ 0, ๐ฆ + ๐ 2 ๐ฅ + ๐ 3 ๐ฅ + ๐ฆ โค 6, = 0 = 0 ๐ 1 โ๐ฅ โค 0, โ๐ฆ โค 0, ๐ฅ + ๐ฆ โ 6 = 0 ๐ 2 ๐ 3 โ๐ฅ = 0 โ๐ฆ = 0 Then ๐ 2 = โ๐ฆ and ๐ฅ = โ๐ 3 . If ๐ 2 ( ๐ 3 ) is strictly positive, then y (x) is strictly negative and does not satisfy the last two conditions.
This allows us to eliminate all combinations where at least one among ๐ 2 and ๐ 3 ฮป 1 =0 and is strictly positive, then combinations 3, 5, 7 Then we have to check only the combinations 2, 4, 6, 8 30
Case 2) ฮป
1
>0 ฮป
2
= 0 ฮป
3
= 0
Kuhn Tucker conditions are: ๐ฆ โ ๐ 1 = 0 ๐ฅ โ ๐ 1 = 0 ๐ 1 โฅ 0, ๐ฅ + ๐ฆ = 6, โ๐ฅ โค 0, โ๐ฆ โค 0, From the first 3 conditions we have that x = y = 3 and ๐ 1 =3 These values satisfy the last conditions and the derivatives of objective function evaluated in this point are different from zero.
31
Case 4) ฮป
1
>0 ฮป
2
> 0 ฮป
3
= 0
Kuhn Tucker conditions are: ๐ 1 โฅ 0, ๐ฆ โ ๐ 1 + ๐ 2 = 0 ๐ฅ โ ๐ 1 = 0 ๐ฅ + ๐ฆ โค 6, โ๐ฅ = 0, ๐ 2 โ๐ฆ โค 0 ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 โ๐ฅ = 0 From condition in the 4 th line we have ๐ฅ = 0 , replacing in the second line we get ๐ 1 the initial assumption of ๐ 1 > 0 = 0 , a contradiction with 32
Case 6) ฮป
1
>0 ฮป
2
= 0 ฮป
3
> 0
The first two conditions are ๐ฆ โ ๐ 1 = 0 ๐ฅ โ ๐ 1 + ๐ 3 = 0 ๐ 3 > 0 implies ๐ฆ = 0 .
Replacing it in the first line we find that ๐ 1 = 0 , a contradiction with the initial assumption of ๐ 1 > 0 33
Case 8) ฮป
1
>0 ฮป
2
> 0 ฮป
3
> 0
Kuhn Tucker conditions are: ๐ฆ โ ๐ 1 + ๐ 2 ๐ฅ โ ๐ 1 + ๐ 3 ๐ฅ + ๐ฆ = 6 = 0 = 0 ๐ฅ = 0 ๐ฆ = 0 From the last three conditions one contradiction arises Two possible solutions 1) x = 0 and y = 0 2) x = 3 and y = 3 The second one produces the higher value of the objective function, then it is the solution of the problem 34
2) Using the modified lagrangean
๐ ๐ฅ, ๐ฆ = ๐ฅ๐ฆ โ ๐ 1 (๐ฅ + ๐ฆ โ 6) Kuhn-Tucker conditions for the modified Lagrangean: ๐ 1 ๐ฅ โฅ 0, ๐ฆ โฅ 0 โฅ 0, ๐ฆ โ ๐ 1 โค 0 ๐ฅ โ ๐ 1 โค 0 ๐ฅ + ๐ฆ โค 6, ๐ฅ ๐ฆ โ ๐ 1 = 0 ๐ฆ(๐ฅ โ ๐ 1 ) = 0 ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 35
Kuhn-Tucker conditions for the modified Lagrangean: ๐ 1 ๐ฅ โฅ 0, ๐ฆ โฅ 0 โฅ 0, ๐ฆ โ ๐ 1 ๐ฅ โ ๐ 1 โค 0 ๐ฅ + ๐ฆ โค 6, โค 0 ๐ฅ ๐ฆ โ ๐ ๐ 1 1 = 0 ๐ฆ(๐ฅ โ ๐ 1 ) = 0 ๐ฅ + ๐ฆ โ 6 = 0 Consider a case where x=0 and y=0, then: ๐ 1 โฅ 0, โ๐ 1 โ๐ 1 ๐ฅ + ๐ฆ โค 6, โค 0 โค 0 ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 These conditions are satisfied only for ๐ 1 = 0 Then x=0 y=0 is a candidate to the solution (the derivatives of the objective function are equal to zero in this point) 36
Consider a case where ๐ฅ > 0 and ๐ฆ = 0 , then: ๐ 1 ๐ฅ > 0, โฅ 0, ๐ 1 โค 0 ๐ฅ โ ๐ ๐ฅ โค 6, 1 โค 0 ๐ 1 ๐ฅ๐ 1 = 0 ๐ฅ โ 6 = 0 From the first condition we get ๐ 1 = 0 Replacing ๐ 1 = 0 in the second condition we get ๐ฅ โค 0 A contradiction with the initial assumption ๐ฅ > 0 . 37
Consider a case where ๐ฅ = 0 and ๐ฆ > 0 , then: Replacing these values in the second condition we get ๐ 1 = 0 Replacing ๐ 1 = 0 in the first condition we get ๐ฆ โค 0 A contradiction with the initial assumption ๐ฆ > 0 .
Consider the case ๐ฅ > 0 and ๐ฆ > 0 ๐ 1 โฅ 0, ๐ฆ โ ๐ 1 = 0 ๐ฅ โ ๐ 1 = 0 ๐ฅ + ๐ฆ โค 6, ๐ 1 ๐ฅ + ๐ฆ โ 6 = 0 Then ๐ฆ = ๐ฅ = ๐ 1 > 0 .
The last condition implies ๐ฅ + ๐ฆ = 6 and then ๐ฅ = ๐ฆ = 3 As in the procedure using the Lagrangean 38
โข http://www.economics.utoronto.ca/osborne/MathTutorial/OSMF.HTM
39