<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>xkx</title>
<link>https://staki-thought.pages.dev/</link>
<atom:link href="https://staki-thought.pages.dev/index.xml" rel="self" type="application/rss+xml"/>
<description>关于组合优化、强化学习、精确算法与生成式方法的学习笔记和研究思考。</description>
<generator>quarto-1.10.20</generator>
<lastBuildDate>Fri, 30 Oct 2026 07:00:00 GMT</lastBuildDate>
<item>
  <title>LP 对偶：从内层优化到强对偶</title>
  <link>https://staki-thought.pages.dev/posts/lp-duality/</link>
  <description><![CDATA[ 




<p>推导对偶的关键有两步：先构造一个关于乘子的界，再把定义这个界的内层优化算出来。对于线性规划（LP），第二步尤其干净：内层是非负正交锥上的线性函数，其下确界只有“零”或“负无穷”两种可能。<strong>排除负无穷的条件，恰好就是对偶约束。</strong></p>
<p>本文统一以<strong>最小化原问题</strong>为主，因此对偶提供<strong>下界</strong>。先讲定义，再推导，再解释 LP 为什么具有比一般非线性问题更强的对偶性质。</p>
<section id="对偶的起点把可行性写成一个极大化问题" class="level2" data-number="1">
<h2 data-number="1" class="anchored" data-anchor-id="对偶的起点把可行性写成一个极大化问题"><span class="header-section-number">1</span> 对偶的起点：把可行性写成一个极大化问题</h2>
<p>考虑一般约束优化问题</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0Ap%5E%5Cstar=%5Cinf_%7Bx%5Cin%20X%7D%5Cquad%20&amp;%20f(x)%5C%5C%0A%5Ctext%7Bs.t.%7D%5Cquad%20&amp;%20g_i(x)%5Cle%200,%5Cquad%20i=1,%5Cldots,m,%5C%5C%0A&amp;%20h_k(x)=0,%5Cquad%20k=1,%5Cldots,r.%0A%5Cend%7Baligned%7D%0A"></p>
<p><img src="https://latex.codecogs.com/png.latex?X"> 表示我们决定保留在内层的定义域，例如非负约束或盒约束。定义拉格朗日函数</p>
<p><img src="https://latex.codecogs.com/png.latex?%0AL(x,%5Clambda,%5Cnu)%0A=f(x)+%5Csum_%7Bi=1%7D%5E%7Bm%7D%5Clambda_i%20g_i(x)%0A+%5Csum_%7Bk=1%7D%5E%7Br%7D%5Cnu_k%20h_k(x),%0A"></p>
<p>其中 <img src="https://latex.codecogs.com/png.latex?%5Clambda%5Cge%200">，<img src="https://latex.codecogs.com/png.latex?%5Cnu%5Cin%5Cmathbb%20R%5Er"> 自由取值。</p>
<section id="乘子的符号为什么这样选" class="level3" data-number="1.1">
<h3 data-number="1.1" class="anchored" data-anchor-id="乘子的符号为什么这样选"><span class="header-section-number">1.1</span> 乘子的符号为什么这样选？</h3>
<p>固定一个原可行点 <img src="https://latex.codecogs.com/png.latex?x">，因为 <img src="https://latex.codecogs.com/png.latex?g_i(x)%5Cle%200">，所以 <img src="https://latex.codecogs.com/png.latex?%5Clambda_i%20g_i(x)%5Cle%200">；等式项则为零。因此</p>
<p><img src="https://latex.codecogs.com/png.latex?%0AL(x,%5Clambda,%5Cnu)%5Cle%20f(x).%0A"></p>
<p>这保证我们在构造最小化问题的下界。符号来自这个不等式，而不是约定俗成的口诀。</p>
<p>还可以更进一步。对固定的 <img src="https://latex.codecogs.com/png.latex?x">，</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Csup_%7B%5Clambda%5Cge0,%5C,%5Cnu%7DL(x,%5Clambda,%5Cnu)%0A=%5Cbegin%7Bcases%7D%0Af(x),&amp;x%5Ctext%7B%20%E6%BB%A1%E8%B6%B3%E6%89%80%E6%9C%89%E7%BA%A6%E6%9D%9F%7D,%5C%5C%0A+%5Cinfty,&amp;x%5Ctext%7B%20%E8%87%B3%E5%B0%91%E8%BF%9D%E5%8F%8D%E4%B8%80%E6%9D%A1%E7%BA%A6%E6%9D%9F%7D.%0A%5Cend%7Bcases%7D%0A"></p>
<p>理由是：如果某个 <img src="https://latex.codecogs.com/png.latex?g_i(x)%3E0">，令对应 <img src="https://latex.codecogs.com/png.latex?%5Clambda_i%5Cto+%5Cinfty">；如果某个 <img src="https://latex.codecogs.com/png.latex?h_k(x)%5Cne0">，令自由乘子沿相应符号无限增大。对可行点，取 <img src="https://latex.codecogs.com/png.latex?%5Clambda=0,%5Cnu=0"> 就达到上确界 <img src="https://latex.codecogs.com/png.latex?f(x)">。</p>
<p>因此原问题可以<strong>精确地</strong>写成</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ap%5E%5Cstar=%5Cinf_%7Bx%5Cin%20X%7D%5Csup_%7B%5Clambda%5Cge0,%5C,%5Cnu%7DL(x,%5Clambda,%5Cnu).%0A%5Ctag%7B1%7D%0A"></p>
</section>
<section id="对调优化顺序得到最好的拉格朗日下界" class="level3" data-number="1.2">
<h3 data-number="1.2" class="anchored" data-anchor-id="对调优化顺序得到最好的拉格朗日下界"><span class="header-section-number">1.2</span> 对调优化顺序，得到最好的拉格朗日下界</h3>
<p>先固定乘子，定义对偶函数</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Aq(%5Clambda,%5Cnu)=%5Cinf_%7Bx%5Cin%20X%7DL(x,%5Clambda,%5Cnu).%0A"></p>
<p>对于任意原可行点 <img src="https://latex.codecogs.com/png.latex?%5Cbar%20x">，</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Aq(%5Clambda,%5Cnu)%0A%5Cle%20L(%5Cbar%20x,%5Clambda,%5Cnu)%0A%5Cle%20f(%5Cbar%20x).%0A"></p>
<p>所以每一组合法乘子都给出一个下界。尽量提高这个下界，得到拉格朗日对偶问题：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ad%5E%5Cstar=%5Csup_%7B%5Clambda%5Cge0,%5C,%5Cnu%7Dq(%5Clambda,%5Cnu)%0A%5Cle%20p%5E%5Cstar.%0A%5Ctag%7B2%7D%0A"></p>
<p>式 (1) 和式 (2) 的差别，正是 <img src="https://latex.codecogs.com/png.latex?%5Cinf%5Csup"> 与 <img src="https://latex.codecogs.com/png.latex?%5Csup%5Cinf"> 的顺序。一般只能证明后者不超过前者；若两者相等，才叫<strong>强对偶</strong>。不能在推导中无条件交换这两个运算。</p>
</section>
</section>
<section id="lp-的内层问题究竟是怎样被精确算出来的" class="level2" data-number="2">
<h2 data-number="2" class="anchored" data-anchor-id="lp-的内层问题究竟是怎样被精确算出来的"><span class="header-section-number">2</span> LP 的内层问题：究竟是怎样被精确算出来的？</h2>
<p>取一种明确的 LP 形式：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%5Ctext%7B(P)%7D%5Cqquad%20%5Cmin_%7Bx%5Cin%5Cmathbb%20R%5En%7D%5Cquad%20&amp;c%5E%5Ctop%20x%5C%5C%0A%5Ctext%7Bs.t.%7D%5Cquad%20&amp;Ax%5Cge%20b,%5C%5C%0A&amp;x%5Cge0,%0A%5Cend%7Baligned%7D%0A"></p>
<p>其中 <img src="https://latex.codecogs.com/png.latex?A%5Cin%5Cmathbb%20R%5E%7Bm%5Ctimes%20n%7D">。把 <img src="https://latex.codecogs.com/png.latex?Ax%5Cge%20b"> 写成 <img src="https://latex.codecogs.com/png.latex?b-Ax%5Cle0">，引入 <img src="https://latex.codecogs.com/png.latex?y%5Cge0">；保留 <img src="https://latex.codecogs.com/png.latex?X=%5Cmathbb%20R_+%5En">，不把 <img src="https://latex.codecogs.com/png.latex?x%5Cge0"> 再拉格朗日化。于是</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0AL(x,y)&amp;=c%5E%5Ctop%20x+y%5E%5Ctop(b-Ax)%5C%5C%0A&amp;=b%5E%5Ctop%20y+(c-A%5E%5Ctop%20y)%5E%5Ctop%20x.%0A%5Cend%7Baligned%7D%0A"></p>
<p>固定 <img src="https://latex.codecogs.com/png.latex?y">，记</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ar(y)=c-A%5E%5Ctop%20y.%0A"></p>
<p>这个向量通常称为与该乘子对应的约化成本（reduced costs）。内层问题变成</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Aq(y)=b%5E%5Ctop%20y+%5Cinf_%7Bx%5Cge0%7D%5Csum_%7Bj=1%7D%5En%20r_j(y)x_j.%0A%5Ctag%7B3%7D%0A"></p>
<section id="第一步说明为什么可以逐分量处理" class="level3" data-number="2.1">
<h3 data-number="2.1" class="anchored" data-anchor-id="第一步说明为什么可以逐分量处理"><span class="header-section-number">2.1</span> 第一步：说明为什么可以逐分量处理</h3>
<p>定义域是笛卡尔积 <img src="https://latex.codecogs.com/png.latex?%5Cmathbb%20R_+%5Ctimes%5Ccdots%5Ctimes%5Cmathbb%20R_+">，目标也是各坐标的和，没有任何跨坐标的耦合约束。因此</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cinf_%7Bx%5Cge0%7D%5Csum_jr_jx_j%0A=%5Csum_j%5Cinf_%7Bt%5Cge0%7Dr_jt.%0A"></p>
<p>这里每个分量的下确界只能是 <img src="https://latex.codecogs.com/png.latex?0"> 或 <img src="https://latex.codecogs.com/png.latex?-%5Cinfty">，不会出现不定的 <img src="https://latex.codecogs.com/png.latex?+%5Cinfty-%5Cinfty">。这一步依赖可分离结构；若保留了耦合约束，就不能这样拆。</p>
</section>
<section id="第二步把一维问题完整分类" class="level3" data-number="2.2">
<h3 data-number="2.2" class="anchored" data-anchor-id="第二步把一维问题完整分类"><span class="header-section-number">2.2</span> 第二步：把一维问题完整分类</h3>
<p>对 <img src="https://latex.codecogs.com/png.latex?%5Cphi(r)=%5Cinf_%7Bt%5Cge0%7Drt">：</p>
<ul>
<li><strong><img src="https://latex.codecogs.com/png.latex?r%3E0"></strong>：<img src="https://latex.codecogs.com/png.latex?rt%5Cge0">，唯一极小点为 <img src="https://latex.codecogs.com/png.latex?t=0">，最优值是 <img src="https://latex.codecogs.com/png.latex?0">。</li>
<li><strong><img src="https://latex.codecogs.com/png.latex?r=0"></strong>：所有 <img src="https://latex.codecogs.com/png.latex?t%5Cge0"> 都是极小点，最优值仍是 <img src="https://latex.codecogs.com/png.latex?0">。</li>
<li><strong><img src="https://latex.codecogs.com/png.latex?r%3C0"></strong>：取 <img src="https://latex.codecogs.com/png.latex?t_k=k">，则 <img src="https://latex.codecogs.com/png.latex?rt_k%5Cto-%5Cinfty">，问题无下界，没有有限极小点。</li>
</ul>
<p>因此</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cphi(r)=%5Cbegin%7Bcases%7D%0A0,&amp;r%5Cge0,%5C%5C%0A-%5Cinfty,&amp;r%3C0.%0A%5Cend%7Bcases%7D%0A"></p>
<p>代回式 (3)：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Aq(y)=%5Cbegin%7Bcases%7D%0Ab%5E%5Ctop%20y,&amp;c-A%5E%5Ctop%20y%5Cge0,%5C%5C%0A-%5Cinfty,&amp;%5Ctext%7B%E5%90%A6%E5%88%99%7D.%0A%5Cend%7Bcases%7D%0A%5Ctag%7B4%7D%0A"></p>
<p>只要一个系数为负，沿对应的坐标射线就能把内层值降到负无穷；全部非负时，<img src="https://latex.codecogs.com/png.latex?x=0"> 就达到零。<strong>我们精确确定的是内层最优值；内层最优解未必唯一。</strong></p>
</section>
<section id="第三步把有效定义域写成对偶约束" class="level3" data-number="2.3">
<h3 data-number="2.3" class="anchored" data-anchor-id="第三步把有效定义域写成对偶约束"><span class="header-section-number">2.3</span> 第三步：把有效定义域写成对偶约束</h3>
<p>原可行集非空时，产生 <img src="https://latex.codecogs.com/png.latex?-%5Cinfty"> 的乘子无法给出有用下界；即使原问题不可行，对偶函数式 (4) 仍然成立。将有效定义域显式写出，得到</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cboxed%7B%0A%5Cbegin%7Baligned%7D%0A%5Ctext%7B(D)%7D%5Cqquad%20%5Cmax_y%5Cquad%20&amp;b%5E%5Ctop%20y%5C%5C%0A%5Ctext%7Bs.t.%7D%5Cquad%20&amp;A%5E%5Ctop%20y%5Cle%20c,%5C%5C%0A&amp;y%5Cge0.%0A%5Cend%7Baligned%7D%7D%0A"></p>
<p>严格来说，对偶首先由 <img src="https://latex.codecogs.com/png.latex?%5Csup%20q(y)"> 定义；写作这个 LP 后，若最优值有限且可行，则最优值可以达到。</p>
<p>每一条原约束对应一个乘子；每一个原变量对应一次内层有界性检查。<img src="https://latex.codecogs.com/png.latex?A%5E%5Ctop"> 出现，是因为第 <img src="https://latex.codecogs.com/png.latex?j"> 个原变量的系数为 <img src="https://latex.codecogs.com/png.latex?c_j-%5Csum_iA_%7Bij%7Dy_i">。</p>
</section>
</section>
<section id="为什么直接对内层求导等于零有时是错的" class="level2" data-number="3">
<h2 data-number="3" class="anchored" data-anchor-id="为什么直接对内层求导等于零有时是错的"><span class="header-section-number">3</span> 为什么“直接对内层求导等于零”有时是错的？</h2>
<section id="定义域决定有限性的条件" class="level3" data-number="3.1">
<h3 data-number="3.1" class="anchored" data-anchor-id="定义域决定有限性的条件"><span class="header-section-number">3.1</span> 定义域决定有限性的条件</h3>
<p>同样是线性项 <img src="https://latex.codecogs.com/png.latex?rt">，内层定义域一变，答案就变：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cinf_%7Bt%5Cin%5Cmathbb%20R%7Drt%0A=%5Cbegin%7Bcases%7D0,&amp;r=0,%5C%5C-%5Cinfty,&amp;r%5Cne0;%5Cend%7Bcases%7D%0A"></p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cinf_%7Bt%5Cle0%7Drt%0A=%5Cbegin%7Bcases%7D0,&amp;r%5Cle0,%5C%5C-%5Cinfty,&amp;r%3E0.%5Cend%7Bcases%7D%0A"></p>
<p>所以原变量自由时，对偶约束是等式；原变量非正时，不等式方向反过来。这些都来自同一个有限性计算。</p>
<p>若 <img src="https://latex.codecogs.com/png.latex?t"> 被限制在有限区间 <img src="https://latex.codecogs.com/png.latex?%5B%5Cell,u%5D">，则</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cinf_%7B%5Cell%5Cle%20t%5Cle%20u%7Drt%0A=%5Cbegin%7Bcases%7Dr%5Cell,&amp;r%5Cge0,%5C%5Cru,&amp;r%3C0.%5Cend%7Bcases%7D%0A"></p>
<p>这时无论 <img src="https://latex.codecogs.com/png.latex?r"> 的符号如何，下确界都有限。保留盒约束会得到分段线性的对偶函数，不必再强加 <img src="https://latex.codecogs.com/png.latex?r%5Cge0">。<strong>“对偶约束来自内层有界性”必须连同具体定义域一起理解。</strong></p>
</section>
<section id="边界最优不能套用无约束驻点条件" class="level3" data-number="3.2">
<h3 data-number="3.2" class="anchored" data-anchor-id="边界最优不能套用无约束驻点条件"><span class="header-section-number">3.2</span> 边界最优不能套用无约束驻点条件</h3>
<p>对于 <img src="https://latex.codecogs.com/png.latex?%5Cmin_%7Bx%5Cge0%7Dr%5E%5Ctop%20x">，正确的最优性条件是</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ax%5Cge0,%5Cqquad%20r%5Cge0,%5Cqquad%20x_jr_j=0%5Cquad%5Cforall%20j.%0A"></p>
<p>并不是所有分量都要满足 <img src="https://latex.codecogs.com/png.latex?r_j=0">。当 <img src="https://latex.codecogs.com/png.latex?r_j%3E0"> 时，<img src="https://latex.codecogs.com/png.latex?x_j=0"> 是合法的边界最优解。</p>
<p>在几何上，有限性要求 <img src="https://latex.codecogs.com/png.latex?r"> 属于非负锥的对偶锥：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A(%5Cmathbb%20R_+%5En)%5E*%0A=%5C%7Br:r%5E%5Ctop%20x%5Cge0%5C%20%5Cforall%20x%5Cge0%5C%7D%0A=%5Cmathbb%20R_+%5En.%0A"></p>
<p>更一般地，若保留的定义域是锥 <img src="https://latex.codecogs.com/png.latex?K">，则 <img src="https://latex.codecogs.com/png.latex?%5Cinf_%7Bx%5Cin%20K%7Dr%5E%5Ctop%20x"> 在 <img src="https://latex.codecogs.com/png.latex?r%5Cin%20K%5E*"> 时为零，否则沿某条锥内射线降到负无穷。这说明 LP 的符号条件也是锥对偶的一个特例。</p>
</section>
</section>
<section id="lp-对偶有什么特别好的性质" class="level2" data-number="4">
<h2 data-number="4" class="anchored" data-anchor-id="lp-对偶有什么特别好的性质"><span class="header-section-number">4</span> LP 对偶有什么特别好的性质？</h2>
<section id="弱对偶一个可检查的下界证书" class="level3" data-number="4.1">
<h3 data-number="4.1" class="anchored" data-anchor-id="弱对偶一个可检查的下界证书"><span class="header-section-number">4.1</span> 弱对偶：一个可检查的下界证书</h3>
<p>对任意原可行 <img src="https://latex.codecogs.com/png.latex?x"> 和对偶可行 <img src="https://latex.codecogs.com/png.latex?y">，</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ab%5E%5Ctop%20y%5Cle%20y%5E%5Ctop%20Ax%0A=x%5E%5Ctop%20A%5E%5Ctop%20y%5Cle%20c%5E%5Ctop%20x.%0A%5Ctag%7B5%7D%0A"></p>
<p>因此，原可行解给出最小化问题的上界，对偶可行解给出下界。只要上下界相等，就得到了最优性证书，无需知道求解器如何找到这些解。</p>
<p>这是精确算法中非常实用的性质：一个启发式方法可以产生好解，但要证明“已经足够好”或“就是最优”，还需要一个有效的界。</p>
</section>
<section id="对偶函数总是凹的但不一定容易优化" class="level3" data-number="4.2">
<h3 data-number="4.2" class="anchored" data-anchor-id="对偶函数总是凹的但不一定容易优化"><span class="header-section-number">4.2</span> 对偶函数总是凹的，但不一定容易优化</h3>
<p>对一般拉格朗日函数，固定 <img src="https://latex.codecogs.com/png.latex?x"> 后，<img src="https://latex.codecogs.com/png.latex?L"> 关于乘子是仿射函数。仿射函数族的逐点下确界是凹函数。因此 <img src="https://latex.codecogs.com/png.latex?q"> 总是凹的，即使原问题非凸。</p>
<p>这不意味着非凸原问题突然变容易了：计算 <img src="https://latex.codecogs.com/png.latex?q"> 的内层问题可能很难，也可能有严格的对偶间隙。LP 的优势是我们能显式计算内层，最后的对偶仍然是一个 LP。</p>
</section>
<section id="强对偶与最优值可达" class="level3" data-number="4.3">
<h3 data-number="4.3" class="anchored" data-anchor-id="强对偶与最优值可达"><span class="header-section-number">4.3</span> 强对偶与最优值可达</h3>
<p>对于有限维 LP，只要 (P) 可行且 <img src="https://latex.codecogs.com/png.latex?p%5E%5Cstar"> 有限，则 (P)、(D) 都有最优解，并且</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ap%5E%5Cstar=d%5E%5Cstar.%0A"></p>
<p>这里不额外要求存在严格满足全部不等式的点。LP 的可行域是多面体，有限生成锥的闭性使分离论证能够给出精确的乘子证书。一般凸规划的常见充分条件是 Slater 条件，不能把它误写成所有 LP 都必须满足的前提。</p>
<p>例如约束 <img src="https://latex.codecogs.com/png.latex?x%5Cge1">、<img src="https://latex.codecogs.com/png.latex?-x%5Cge-1"> 把可行集压成 <img src="https://latex.codecogs.com/png.latex?%5C%7B1%5C%7D">，不存在同时严格满足这两条不等式的点，但有限目标下 LP 强对偶仍成立。</p>
<p>下面给出这一结论中“为什么存在精确乘子”的证明。</p>
</section>
</section>
<section id="强对偶的一个几何证明" class="level2" data-number="5">
<h2 data-number="5" class="anchored" data-anchor-id="强对偶的一个几何证明"><span class="header-section-number">5</span> 强对偶的一个几何证明</h2>
<p>使用一个标准的多面体结论：非空多面体上的线性目标如果有有限下确界，就可以达到它。取原最优解 <img src="https://latex.codecogs.com/png.latex?x%5E%5Cstar">，定义活跃集</p>
<p><img src="https://latex.codecogs.com/png.latex?%0AI=%5C%7Bi:a_i%5E%5Ctop%20x%5E%5Cstar=b_i%5C%7D,%0A%5Cqquad%20J=%5C%7Bj:x_j%5E%5Cstar=0%5C%7D,%0A"></p>
<p>其中 <img src="https://latex.codecogs.com/png.latex?a_i%5E%5Ctop"> 是 <img src="https://latex.codecogs.com/png.latex?A"> 的第 <img src="https://latex.codecogs.com/png.latex?i"> 行。考虑有限生成锥</p>
<p><img src="https://latex.codecogs.com/png.latex?%0AC=%5Coperatorname%7Bcone%7D%5Cbigl(%5C%7Ba_i:i%5Cin%20I%5C%7D%5Ccup%5C%7Be_j:j%5Cin%20J%5C%7D%5Cbigr),%0A"></p>
<p><img src="https://latex.codecogs.com/png.latex?e_j"> 是第 <img src="https://latex.codecogs.com/png.latex?j"> 个单位向量。我们要证明 <img src="https://latex.codecogs.com/png.latex?c%5Cin%20C">。</p>
<section id="如果目标方向不在这个锥里就能找到下降方向" class="level3" data-number="5.1">
<h3 data-number="5.1" class="anchored" data-anchor-id="如果目标方向不在这个锥里就能找到下降方向"><span class="header-section-number">5.1</span> 如果目标方向不在这个锥里，就能找到下降方向</h3>
<p>反设 <img src="https://latex.codecogs.com/png.latex?c%5Cnotin%20C">。因为有限生成锥闭且凸，锥分离定理给出方向 <img src="https://latex.codecogs.com/png.latex?d">，使得</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Aa_i%5E%5Ctop%20d%5Cge0%5C%20(i%5Cin%20I),%5Cqquad%0Ad_j%5Cge0%5C%20(j%5Cin%20J),%5Cqquad%0Ac%5E%5Ctop%20d%3C0.%0A"></p>
<p>前两组条件保证：从 <img src="https://latex.codecogs.com/png.latex?x%5E%5Cstar"> 沿 <img src="https://latex.codecogs.com/png.latex?d"> 走一小步，不会破坏已经取等号的约束。其他约束具有正的松弛，且数量有限，所以存在充分小的 <img src="https://latex.codecogs.com/png.latex?%5Cvarepsilon%3E0">，使 <img src="https://latex.codecogs.com/png.latex?x%5E%5Cstar+%5Cvarepsilon%20d"> 仍然可行。</p>
<p>但它的目标值为</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ac%5E%5Ctop(x%5E%5Cstar+%5Cvarepsilon%20d)%0A=c%5E%5Ctop%20x%5E%5Cstar+%5Cvarepsilon%20c%5E%5Ctop%20d%0A%3Cc%5E%5Ctop%20x%5E%5Cstar,%0A"></p>
<p>与最优性矛盾。因此 <img src="https://latex.codecogs.com/png.latex?c%5Cin%20C">。</p>
</section>
<section id="锥表示直接给出对偶解" class="level3" data-number="5.2">
<h3 data-number="5.2" class="anchored" data-anchor-id="锥表示直接给出对偶解"><span class="header-section-number">5.2</span> 锥表示直接给出对偶解</h3>
<p>于是存在 <img src="https://latex.codecogs.com/png.latex?y%5Cge0"> 和 <img src="https://latex.codecogs.com/png.latex?s%5Cge0">，分别只在 <img src="https://latex.codecogs.com/png.latex?I">、<img src="https://latex.codecogs.com/png.latex?J"> 上可能非零，使得</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ac=A%5E%5Ctop%20y+s.%0A"></p>
<p>因此 <img src="https://latex.codecogs.com/png.latex?A%5E%5Ctop%20y%5Cle%20c">，<img src="https://latex.codecogs.com/png.latex?y"> 对偶可行。根据乘子支撑的位置，还有</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ay%5E%5Ctop(Ax%5E%5Cstar-b)=0,%5Cqquad%20s%5E%5Ctop%20x%5E%5Cstar=0.%0A"></p>
<p>所以</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0Ac%5E%5Ctop%20x%5E%5Cstar%0A&amp;=(A%5E%5Ctop%20y+s)%5E%5Ctop%20x%5E%5Cstar%5C%5C%0A&amp;=y%5E%5Ctop%20Ax%5E%5Cstar+s%5E%5Ctop%20x%5E%5Cstar%5C%5C%0A&amp;=y%5E%5Ctop%20b.%0A%5Cend%7Baligned%7D%0A"></p>
<p>我们不仅证明值相等，还构造性地证明了某个对偶最优乘子的存在。这里的逻辑是<strong>多面体最优性 → 锥分离 → 乘子表示 → 零间隙</strong>，没有把最小化和最大化顺序直接交换。<a href="https://www.mit.edu/~gfarina/2024/67220s24_L02_first_order_optimality_conditions/L02.pdf">MIT 一阶最优性讲义</a> 也从法锥与最优性条件讨论这一联系。</p>
</section>
</section>
<section id="互补松弛把零间隙拆成逐项条件" class="level2" data-number="6">
<h2 data-number="6" class="anchored" data-anchor-id="互补松弛把零间隙拆成逐项条件"><span class="header-section-number">6</span> 互补松弛：把“零间隙”拆成逐项条件</h2>
<p>对原、对偶可行的 <img src="https://latex.codecogs.com/png.latex?x,y">，记 <img src="https://latex.codecogs.com/png.latex?r=c-A%5E%5Ctop%20y%5Cge0">。目标差可以精确分解为</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0Ac%5E%5Ctop%20x-b%5E%5Ctop%20y%0A&amp;=x%5E%5Ctop(c-A%5E%5Ctop%20y)+y%5E%5Ctop(Ax-b)%5C%5C%0A&amp;=%5Csum_jx_jr_j+%5Csum_i%20y_i(a_i%5E%5Ctop%20x-b_i).%0A%5Cend%7Baligned%7D%0A%5Ctag%7B6%7D%0A"></p>
<p>每一项都非负，因此差为零，当且仅当</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ax_jr_j=0%5Cquad%5Cforall%20j,%5Cqquad%0Ay_i(a_i%5E%5Ctop%20x-b_i)=0%5Cquad%5Cforall%20i.%0A"></p>
<p>结合原可行性、对偶可行性，这些条件对 LP 的原、对偶最优性既必要又充分。它们就是 LP 的 KKT 条件。</p>
<p>两种条件分别表达两件事：</p>
<ul>
<li><img src="https://latex.codecogs.com/png.latex?x_jr_j=0">：<img src="https://latex.codecogs.com/png.latex?x"> 确实解决了固定 <img src="https://latex.codecogs.com/png.latex?y"> 的内层最小化。</li>
<li><img src="https://latex.codecogs.com/png.latex?y_i(a_i%5E%5Ctop%20x-b_i)=0">：在该原可行点上，拉格朗日项没有把目标值进一步降低。</li>
</ul>
<p><strong>活跃约束不保证乘子严格为正，零约化成本也不保证原变量严格为正。</strong> 退化情形完全可能出现，普通互补松弛不等于严格互补。</p>
</section>
<section id="一个完整算例内层选了零为什么原最优解不是零" class="level2" data-number="7">
<h2 data-number="7" class="anchored" data-anchor-id="一个完整算例内层选了零为什么原最优解不是零"><span class="header-section-number">7</span> 一个完整算例：内层选了零，为什么原最优解不是零？</h2>
<p>考虑</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%5Cmin%5Cquad%20&amp;3x_1+2x_2%5C%5C%0A%5Ctext%7Bs.t.%7D%5Cquad%20&amp;x_1+x_2%5Cge4,%5C%5C%0A&amp;2x_1+x_2%5Cge5,%5C%5C%0A&amp;x_1,x_2%5Cge0.%0A%5Cend%7Baligned%7D%0A"></p>
<p>拉格朗日函数展开为</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0AL(x,y)=4y_1+5y_2%0A&amp;+(3-y_1-2y_2)x_1%5C%5C%0A&amp;+(2-y_1-y_2)x_2.%0A%5Cend%7Baligned%7D%0A"></p>
<p>内层有限恰好要求</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ay_1+2y_2%5Cle3,%5Cqquad%20y_1+y_2%5Cle2.%0A"></p>
<p>于是对偶为</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cbegin%7Baligned%7D%0A%5Cmax%5Cquad%20&amp;4y_1+5y_2%5C%5C%0A%5Ctext%7Bs.t.%7D%5Cquad%20&amp;y_1+2y_2%5Cle3,%5C%5C%0A&amp;y_1+y_2%5Cle2,%5C%5C%0A&amp;y_1,y_2%5Cge0.%0A%5Cend%7Baligned%7D%0A"></p>
<p>取 <img src="https://latex.codecogs.com/png.latex?y%5E%5Cstar=(1,1)">，则两个约化成本都为零，<img src="https://latex.codecogs.com/png.latex?L(x,y%5E%5Cstar)=9"> 对所有 <img src="https://latex.codecogs.com/png.latex?x%5Cge0"> 成立。此时内层有无穷多个最优解，<img src="https://latex.codecogs.com/png.latex?x=0"> 只是其中一个。</p>
<p>但是 <img src="https://latex.codecogs.com/png.latex?x=0"> 不满足原约束。求内层时已经松弛了 <img src="https://latex.codecogs.com/png.latex?Ax%5Cge%20b">；不能把任意内层极小点当成原问题的解。</p>
<p>要恢复一个原最优解，还要施加原可行性和互补松弛。因为 <img src="https://latex.codecogs.com/png.latex?y_1%5E%5Cstar,y_2%5E%5Cstar%3E0">，两条原约束必须取等号：</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ax_1+x_2=4,%5Cqquad%202x_1+x_2=5.%0A"></p>
<p>解得 <img src="https://latex.codecogs.com/png.latex?x%5E%5Cstar=(1,3)">，并且</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ac%5E%5Ctop%20x%5E%5Cstar=9=b%5E%5Ctop%20y%5E%5Cstar.%0A"></p>
<p>这也解释了一个常见误会：<strong>内层最优值可以显式、确定地计算，并不意味着它总能唯一确定原问题的最优解。</strong></p>
</section>
<section id="这些性质怎样用于算法与分析" class="level2" data-number="8">
<h2 data-number="8" class="anchored" data-anchor-id="这些性质怎样用于算法与分析"><span class="header-section-number">8</span> 这些性质怎样用于算法与分析？</h2>
<section id="分支定界用可行对偶乘子证明一个节点不值得继续" class="level3" data-number="8.1">
<h3 data-number="8.1" class="anchored" data-anchor-id="分支定界用可行对偶乘子证明一个节点不值得继续"><span class="header-section-number">8.1</span> 分支定界：用可行对偶乘子证明一个节点不值得继续</h3>
<p>对于最小化整数规划，节点 LP 松弛的任意对偶可行解提供节点下界 <img src="https://latex.codecogs.com/png.latex?L">，当前整数可行解提供上界 <img src="https://latex.codecogs.com/png.latex?U">。若 <img src="https://latex.codecogs.com/png.latex?L%5Cge%20U">，该节点不可能改善当前最好目标值，可以剪枝。实际浮点求解还要结合可行性与最优性容差。</p>
<p>但零间隙只发生在 LP 原、对偶之间。例如整数问题</p>
<p><img src="https://latex.codecogs.com/png.latex?%0A%5Cmin%5C%7Bx:2x%5Cge3,%5C%20x%5Cin%5Cmathbb%20Z_%7B%5Cge0%7D%5C%7D%0A"></p>
<p>最优值为 <img src="https://latex.codecogs.com/png.latex?2">；它的 LP 松弛最优值为 <img src="https://latex.codecogs.com/png.latex?1.5">，对应对偶 <img src="https://latex.codecogs.com/png.latex?%5Cmax%5C%7B3y:2y%5Cle1,%5C%20y%5Cge0%5C%7D"> 的最优值也是 <img src="https://latex.codecogs.com/png.latex?1.5">。LP 强对偶没有消除整数性间隙。</p>
</section>
<section id="灵敏度乘子是价值函数的次梯度" class="level3" data-number="8.2">
<h3 data-number="8.2" class="anchored" data-anchor-id="灵敏度乘子是价值函数的次梯度"><span class="header-section-number">8.2</span> 灵敏度：乘子是价值函数的次梯度</h3>
<p>固定 <img src="https://latex.codecogs.com/png.latex?A,c">，把右端向量视为参数。对原、对偶可行且有限的情形，</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Av(b)=%5Cmax_%7By%5Cge0,%5C,A%5E%5Ctop%20y%5Cle%20c%7Db%5E%5Ctop%20y.%0A"></p>
<p>因此 <img src="https://latex.codecogs.com/png.latex?v"> 是关于 <img src="https://latex.codecogs.com/png.latex?b"> 的凸分段线性函数。若 <img src="https://latex.codecogs.com/png.latex?y%5E%5Cstar"> 在 <img src="https://latex.codecogs.com/png.latex?b"> 处最优，那么对另一个有限可行的右端 <img src="https://latex.codecogs.com/png.latex?b+%5CDelta%20b">，</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Av(b+%5CDelta%20b)%5Cge%20v(b)+(y%5E%5Cstar)%5E%5Ctop%5CDelta%20b.%0A"></p>
<p>若同一个 <img src="https://latex.codecogs.com/png.latex?y%5E%5Cstar"> 在扰动后仍然最优，上式取等号。若 <img src="https://latex.codecogs.com/png.latex?v"> 可微，乘子给出相应的梯度；若不可微，不能把某个乘子无条件当成唯一的边际价格。</p>
</section>
<section id="对偶的对偶回到原-lp" class="level3" data-number="8.3">
<h3 data-number="8.3" class="anchored" data-anchor-id="对偶的对偶回到原-lp"><span class="header-section-number">8.3</span> 对偶的对偶回到原 LP</h3>
<p>把 (D) 视为标准的“最大化、<img src="https://latex.codecogs.com/png.latex?%5Cle"> 约束、非负变量”形式，再求一次对偶，就得到 <img src="https://latex.codecogs.com/png.latex?%5Cmin%20c%5E%5Ctop%20x">、<img src="https://latex.codecogs.com/png.latex?Ax%5Cge%20b">、<img src="https://latex.codecogs.com/png.latex?x%5Cge0">。这是形式上的对称性；它与强对偶是不同的陈述，后者还涉及可行性和最优值。</p>
<p>推导一个新问题时，最值得先写清楚的是：哪些约束进入乘子项、哪些留在定义域，内层是否真的可分，以及内层有限性的充要条件是什么。对 LP 而言，这些问题的答案共同决定了整个对偶模型。</p>
</section>
</section>
<section id="参考资料" class="level2" data-number="9">
<h2 data-number="9" class="anchored" data-anchor-id="参考资料"><span class="header-section-number">9</span> 参考资料</h2>
<ul>
<li><a href="https://courses.csail.mit.edu/6.854/18/Notes/n12-duality.html">MIT 6.854：LP Duality</a>：弱对偶、强对偶及对偶的对偶。</li>
<li><a href="https://www.mit.edu/~gfarina/2024/67220s24_L02_first_order_optimality_conditions/L02.pdf">Gabriele Farina，MIT：First-order optimality conditions</a>：多面体法锥与 LP 最优性。</li>
<li><a href="https://web.stanford.edu/~boyd/cvxbook/">Boyd 与 Vandenberghe：Convex Optimization</a>：第 5 章讨论一般拉格朗日对偶、间隙和灵敏度。</li>
</ul>


</section>

 ]]></description>
  <category>组合优化</category>
  <category>线性规划</category>
  <category>对偶理论</category>
  <guid>https://staki-thought.pages.dev/posts/lp-duality/</guid>
  <pubDate>Fri, 30 Oct 2026 07:00:00 GMT</pubDate>
</item>
</channel>
</rss>
