Professional Documents
Culture Documents
Chapter 11
Optimization with Equality Constraints
1
Ch. 11 - Optimization with Equality Constraints
1 - 2) U f x, y ; s.t. B g x, y
3 4) dU f x dx f y dy 0; dB g x dx g y dy 0
f x 0 dx g x 0 dx
5 6) dU ; dB
0 f y dy 0 g y dy
7 8) dx dy f y f x ; dx dy g y g x
9 10) f y fx gy gx ; fy gy fx gx
• Equation (10) along with the restriction (2) form the basis to solve
this optimization problem.
2
Ch. 11 - Optimization with Equality Constraints
3
Ch. 11 - Optimization with Equality Constraints
2) B g ( x, y)
• There is a convenient function that produces (10’), (10’’) and (2) as
a set of f.o.c.: The Lagrangian function, which includes the objective
function and the constraint:
L f ( x1 , x 2 ) λ B g ( x1 , x 2 )
• The constraint is multiplied by a variable, λ, called the Lagrange
7
multiplier (LM). 7
(1) L f ( x1 , x 2 ) λ B g ( x1 , x 2 )
(2) L B g ( x1 , x 2 ) 0
(3) L x1 f x1 λg x1 0
(4) L x 2 f x 2 λg x2 0
L λλ L λx 1 L λx 2
(5) H L x 1λ L x 1x 1 L x 1x 2
L L x 2 x1 L x 2 x 2
x 2λ
4
Ch. 11 - Optimization with Equality Constraints
11.3 LM Approach
• Note that
Lλ λ = 0
Lλ x1 = gx1
Lλ x2 = gx2
.
• Then
0 g x1 g x2
(5 ) H g x1 L x1x1 L x1x 2
g L x 2 x1 L x 2 x 2
x2
L y L yx L yy Py U yx U yy
2 Px Py U xy Py2U xx Px2U yy 10
5
Ch. 11 - Optimization with Equality Constraints
(1 ) H ax 2 2 hxy by 2 s .t . x y 0
α
(2) y x solve the constraint for y
2
α α
(3) H ax 2
2 hx x b x
β β
2
(4)
H a 2
2 β h b 2
xβ
(5 ) H 0 iff a 2
2 β h b 2
0 12
6
Ch. 11 - Optimization with Equality Constraints
(1) H aβ 2 2 α β h bα 2 0
0
(2) H a h - aβ 2 2 α β h - bα 2
h b
(3) H is positive definite s.t. x y 0
0
iff a h 0 min
h b
13
1 - 2) U x1 x2 2 x1 s.t. B 60 – 4 x1 – 2 x2 0
Form the Lagrangian function
3) L x1 x2 2 x1 λ60 – 4 x1 – 2 x2
FOC
4) Lλ 60 – 4 x1 – 2 x2 0
5 6) Lx1 x2 2 λ4 0; 1 4x2 1 2
7 8) Lx2 x1 λ2 0; 1 2x1
9 10) 1 4x2 1 2 1 2x1 ; x2 2 x1 2
11 12) 60 4 x1 22 x1 2; x1* 8
13 14) 60 48 – 2 x2 ; x2* 14
15 17) U 814 28; U * 128; * 4
14
7
Ch. 11 - Optimization with Equality Constraints
1) U x1 x 2 2 x1 Utility function
2) B 60 – 4 x1 – 2 x 2 0 Budget constraint
3) L x1 x 2 2 x1 λ 60 – 4 x1 – 2 x 2 Lagrangian function
4) L λ 60 – 4 x1 – 2 x 2 0 1st order conditions
5) L x1 x 2 2 λ4 0
6) L x 2 x1 λ2 0
0 4 2 60
7) 4 0 1 x1 2 ;
2 1 0 x 2 0
8) H 16 0 ; d 2 L is negative definite, L* is maximum
15
8
Ch. 11 - Optimization with Equality Constraints
L
t 1 2( yt xt b*)( xt ) 2r 0 t 1 ( yt xt xt2b*) r 0
T T
L
2(rb * q) 0 (rb * q) 0
17
18
9
Ch. 11 - Optimization with Equality Constraints
10
Ch. 11 - Optimization with Equality Constraints
minimize f(x)
Subject to gj(x) 0 for j = 1, 2, ..., M
hk(x) = 0 for k = 1, 2, ..., K
x = (x1, x2, ..., xN)
Note: M inequality constraints, K equality constraints.
Example: Minimize
f(x) = 4(x – 1)2 + (y – 2)2
with constraints:
x ≥ -1 & y ≥ -1.
11
Ch. 11 - Optimization with Equality Constraints
Example: Minimize
f(x) = 4(x – 1)2 + (y – 2)2
with constraints:
x + y ≤ 2; x ≥ - 1 & y ≥ - 1.
– We cannot get any more improvement if for x* there does not exist a
vector d that is both a descent direction and a feasible direction.
– In other words: the possible feasible directions do not intersect the
possible descent directions at all.
12
Ch. 11 - Optimization with Equality Constraints
• That is, each inequality constraint is either active, and in this case it
turns into equality constraint of the Lagrange type, or inactive, and in
this case it is void and does not constrains the solution.
26
13
Ch. 11 - Optimization with Equality Constraints
m p
L( x , , ) f ( x ) k h k ( x ) jg j ( x )
k 1 j1
L( x, , ) 4x 12 y 2 2 1 x y 2 2 x 1 3 y 1
Lx, y 4x 1 y 2
2 2
(8) Unconstrained:
14
Ch. 11 - Optimization with Equality Constraints
(7) x, y
(8) x, y 1,2; f x , y 0 x y 3 2 - beyond the range
15
Ch. 11 - Optimization with Equality Constraints
16
Ch. 11 - Optimization with Equality Constraints
33
34
17
Ch. 11 - Optimization with Equality Constraints
• On the other hand, not all points that satisfy the Kuhn-Tucker
conditions are optimal points.
35
36
18
Ch. 11 - Optimization with Equality Constraints
19
Ch. 11 - Optimization with Equality Constraints
20
Ch. 11 - Optimization with Equality Constraints
2 0 2 x2 8 8 0 2 2 8 2 2 0 8
J 26 , J 2 32 , J x1 56 J x2 72
32 16 56 28 72 36
2 0 x1 0 x2 0
26 13 26 13 26 13
1 , 2 , x1 , x2 meet the KKT conditions for a minimum.
41
x1 1 at a max. However,
Lx1 1 3 1 1 1 when it should equal zero.
2
21
Ch. 11 - Optimization with Equality Constraints
L x 2 1 2 0
L1 -x 2 1 - x 1 0
3
L2 2 - 2x 1 x 2 0
1 1
x1 1, x 2 0 , λ1 , λ2 43
2 2
Lx1 2 x1 6 λ1 10-x12 -x2 x1 λ2
2
Lx2 1 3 λ1 10-x12 -x2 2
Lλ1 10-x12 -x2
3
L2 2 x1
x1 2, x2 6, 1 1 , 2 4
2
Lx2 1 3 λ1 10-2 2 -6 1, when it should equal zero
44
22
Ch. 11 - Optimization with Equality Constraints
23