拉格朗日乘子与对偶直觉Lagrange Multipliers & Duality Intuition
如何用乘子寻找约束候选点,并构造一个下界?How can a multiplier find constrained candidates and construct a lower bound?
前置知识:Prerequisites: O03:凸性与约束。O03: convexity and constraints.
复习前置:Review prerequisites: O03 · 凸性与约束Convexity & Constraints
学完后你能:After this lesson you can: 计算约束候选和对偶下界,区分弱对偶与等号成立。Calculate a constrained candidate and dual bound, distinguishing weak duality from equality.
动手观察Explore
调整约束 x+y=c 和乘子 λ,比较可行最小值与对偶函数给出的下界。Adjust the constraint x+y=c and multiplier λ to compare the feasible minimum with the lower bound given by the dual function.
从观察到解释From observation to explanation
先看可行点Start with feasible points
最小化 x²+y²,约束 x+y=c。可行点中 x=y=c/2 时目标值为 c²/2;这个点是需要验证的候选,而不是只凭相切就自动得出的结论。Minimize x²+y² subject to x+y=c. Among feasible points, x=y=c/2 gives value c²/2. A tangency point is a candidate whose objective value still needs verification.
乘子与下界Multiplier and lower bound
对任意可行点,ℒ 等于原目标,因为约束项为零。对所有 x、y 最小化 ℒ 得 g(λ)=−λ²/2−λc,它不超过任何可行目标值。At every feasible point, ℒ equals the original objective because the constraint term vanishes. Minimizing ℒ over all x and y gives g(λ)=−λ²/2−λc, which cannot exceed any feasible objective value.
比较下界Compare bounds
本例 λ=−c 时,下界等于 c²/2,与可行点的目标相同,因而确认全局最优。一般问题中弱对偶给下界;等号需要额外条件或单独证明。Here λ=−c gives lower bound c²/2, equal to the feasible objective and therefore certifying global optimality. In general, weak duality supplies a lower bound; equality needs additional conditions or a separate proof.
公式与符号Formula and symbols
x、y 是待优化变量,c 是约束值,λ 是等式约束乘子;ℒ 是拉格朗日函数,g(λ) 是对所有 x、y 取下确界得到的对偶函数。x and y are optimization variables, c is the constraint value, and λ the equality multiplier. ℒ is the Lagrangian and g(λ) is its infimum over x and y.
留意这个区别Watch for this
乘子符号依赖约束写法;本章一直使用 x+y−c=0。不要把弱对偶自动当成强对偶。The multiplier sign depends on the constraint convention; this lesson consistently uses x+y−c=0. Weak duality does not automatically imply strong duality.
继续探索Explore further
课后练习
检验你的理解