码迷,mamicode.com
首页 > 其他好文 > 详细

拉格朗日乘子法与KKT条件

时间:2017-12-11 22:08:21      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:1.0   post   2-2   条件   isp   pos   class   splay   rac   

拉格朗日乘子法

\[ min \quad f = 2x_1^2+3x_2^2+7x_3^2 \\s.t. \quad 2x_1+x_2 = 1 \\ \quad \quad \quad 2x_2+3x_3 = 2 \]

\[ min \quad f = 2x_1^2+3x_2^2+7x_3^2 +\alpha _1(2x_1+x_2- 1)+\alpha _2(2x_2+3x_3 - 2) \]

\[ \dfrac{\partial f}{\partial x_1}=4x_1+2\alpha_1=0\Rightarrow x_1=-0.5\alpha_1 \\ \dfrac{\partial f}{\partial x_2}=6x_2+\alpha_1+2\alpha_2=0\Rightarrow x_2=-\dfrac{\alpha_1+2\alpha_2}{6} \\ \dfrac{\partial f}{\partial x_3}=14x_3+3\alpha_2=0\Rightarrow x_3=-\dfrac{3\alpha_2}{14} \]

KKT条件

\[ min \quad f = x_1^2-2x_1+1+x_2^2+4x_2+4 \\s.t. \quad x_1+10x_2 > 10 \\ \quad \quad \quad 10 x_1-10x_2 < 10 \]

\[ s.t. \quad 10-x_1-10x_2 <0 \\ \quad \quad \quad 10x_1-x_2 - 10<0 \]

\[ L(x,\alpha) = f(x) + \alpha_1g1(x)+\alpha_2g2(x)\\ =x_1^2-2x_1+1+x_2^2+4x_2+4+ \alpha_1(10-x_1-10x_2 ) +\\\alpha_2(10x_1-x_2 - 10) \]

\[ L(x,\alpha,\beta) = f(x) + \sum\alpha_ig_i(x)+\sum\beta_ih_i(x) \]

(1) L对各个x求导为零;

(2) h(x)=0;

(3) \( L(x,\alpha,\beta) = f(x) + \sum\alpha_ig_i(x)+\sum\beta_ih_i(x) \)

\[ min \quad f = x_1^2-2x_1+1+x_2^2+4x_2+4 \\s.t. \quad 10-x_1-10x_2 <0 \\ \quad \quad \quad 10x_1-x_2 - 10<0 \]

\[ L(x,\alpha)= x_1^2-2x_1+1+x_2^2+4x_2+4+\\\alpha_1(10-x_1-10x_2)+\alpha_2(10x_1-x_2 - 10) \]

\[ \dfrac{\partial L}{\partial x_1}=2x_1-2-\alpha_1+10\alpha_2=0\Rightarrow x_1=0.5(\alpha_1-10\alpha_2+2) \\ \dfrac{\partial L}{\partial x_2}=2x_2+4-10\alpha_1-\alpha_2=0\Rightarrow x_2=0.5(10\alpha_1+\alpha_2-4) \]

\[ \alpha_1*g_1(x)=\alpha_1*(10-x_1-10x_2)=0\\\alpha_2*g_2(x)=\alpha_2*(10x_1-x_2 - 10)=0 \]

\[ α1=58/101,α2=4/101 \]
\[ x1=110/101=1.08;x2=90/101=0.89 \]

拉格朗日乘子法与KKT条件

标签:1.0   post   2-2   条件   isp   pos   class   splay   rac   

原文地址:http://www.cnblogs.com/longwind09/p/8025073.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!