Lecture 25: KKT conditions
Overview
Burton Ma develops the Karush-Kuhn-Tucker (KKT) conditions by extending Lagrange multipliers from equality constraints to inequalities of the form g(w) ≤ 0. He explains active and inactive constraints, nonnegative inequality multipliers, and complementary slackness, then applies the conditions to a circle-constrained example and a six-constraint chairs-and-tables problem using MATLAB symbolic derivatives.
Key takeaways
- For a minimization problem with inequalities gₖ(w) ≤ 0, KKT dual feasibility requires λₖ ≥ 0, and complementary slackness requires λₖgₖ(w) = 0.
- An inactive inequality has negative slack and a zero multiplier; an active inequality lies at gₖ(w) = 0 and can contribute to stationarity.
- KKT conditions include stationarity, primal feasibility, dual feasibility, and complementary slackness; they are necessary under the stated strong-duality condition but do not automatically provide a solving algorithm.
- Enumerating all active sets requires 2ⁿ cases for n inequalities, so even the six-constraint production example has 64 combinations.
- At the proposed production plan of 300 chairs and 275 tables, constraints 3 and 5 are active, while the other four constraints are inactive and must have zero multipliers.
Chapters
- KKT conditions extend Lagrange multipliers to optimization with inequality constraints and mixtures of equality and inequality constraints.
- Constraints are written as g(w) ≤ 0; a greater-than constraint can be converted by negating its function.
- Multiple affine constraints can be collected in matrix form as Mw − d ≤ 0.
- For the example w₁² + w₂² − 2 ≤ 0, the feasible set is the circle of radius √2 centered at the origin.
- The objective w₁ + w₂ has constant gradient (1, 1), and its minimum over the circle occurs on the boundary.
- At a boundary point, an inward direction v satisfies ∇g(w) · v < 0, while a direction that decreases the objective satisfies ∇F(w) · v < 0.
- For F(w) = (w₁ − 0.5)² + (w₂ − 0.5)², the unconstrained minimizer (0.5, 0.5) lies inside the circle, so the inequality constraint is inactive.
- An inactive constraint does not affect the minimizer and can be omitted when solving the problem.
- A constraint is active at the boundary, where g(w) = 0; equality constraints are always active.
- For an active inequality g(w) ≤ 0, the Lagrange multiplier λ must satisfy λ ≥ 0, unlike a multiplier for an equality constraint.
- The Lagrangian for the circle example is L = w₁ + w₂ + λ(w₁² + w₂² − 2), with λ ≥ 0.
- Stationarity and the boundary equation yield candidate points (1, 1) and (−1, −1); the nonnegative-multiplier condition rejects (1, 1) and selects (−1, −1), with λ = 0.5.
- For multiple inequalities, the Lagrangian adds a term λₖgₖ(w) for each constraint, with every λₖ ≥ 0.
- An inactive constraint has λₖ = 0, while an active constraint satisfies gₖ(w) = 0.
- Both cases are captured by complementary slackness: λₖgₖ(w) = 0 for every inequality constraint.
- Stationarity requires the gradient of the Lagrangian with respect to the decision variables to equal zero.
- Primal feasibility requires gₖ(w) ≤ 0 for inequalities and hⱼ(w) = 0 for equalities.
- Dual feasibility requires λₖ ≥ 0; equality multipliers μⱼ may have either sign.
- Together with complementary slackness, these are necessary optimality conditions when strong duality holds.
- KKT conditions characterize candidates but do not by themselves provide a general procedure for finding a solution.
- For n inequality constraints, checking every active-or-inactive combination requires considering 2ⁿ cases.
- The chairs-and-tables example has six constraints, creating 2⁶ = 64 possible active sets, too many to check conveniently by hand.
- The example minimizes manufacturing cost with w₁ representing chairs and w₂ representing tables, subject to nonnegativity and resource limits.
- The resource constraints represent wood, labor, braces, and upholstery; all are converted to the form gₖ(w) ≤ 0.
- Burton Ma defines the objective, six constraint functions, and six symbolic multipliers in MATLAB, then builds the Lagrangian.
- The proposed production plan is 300 chairs and 275 tables; MATLAB symbolic differentiation produces the stationarity derivatives and returns the constraints when differentiating with respect to multipliers.
- Evaluating the six constraints at that plan identifies constraints 3 and 5 as active; constraints 1, 2, 4, and 6 are inactive.
- Complementary slackness therefore sets the four inactive constraints’ multipliers to zero; solving for the two active multipliers is deferred to the next lecture.
- Identifying active resource limits can help diagnose production bottlenecks and guide manufacturing changes.
Transcript excerpt
0:00 method of Lagrange multipliers for inequality constraints. So, previous lectures, uh, we looked at the method of Lagrange multipliers for equality constraints. Um, and uh, so the something called the Karush-Kuhn-Tucker conditions um, explain or describe the conditions that are necessary for solving this the uh, these constrained optimization problems using inequality constraints or mixed equality and inequality constraints. Uh, so our optimization problem now looks like this. You're trying to optimize uh, or minimize some objective function F subject to uh, one or more inequality constraints. For our purposes, the inequality constraints are always written as some
0:47 function is less than zero. Um, if you want some function is greater than zero, you just negate the function and that flips the sign of the um, inequality. Okay, um, we're primarily interested in um, uh, constraints that can be expressed as an affine equation or linear equation. These are actually affine, but they're very close to being the same thing. Uh, and so you have uh, you have M constraints here, right? And they're all of the form M transpose times W minus uh, D where D is some constant vector. Right? So each one of our constraints is
1:34 of the form uh, how is this written? Minus D. Uh, right, minus D. Uh, D 1 minus right uh, less than or equal to zero. Right? And you're going to have M of those. So if you've got m of those, you can write that as a big matrix equation, uh capital M times w minus this vector g, where your vector d is just built up of these d i's. Sorry. d i. Okay. So, here's a little um constrained optimization problem where where we have an inequality constraint.
2:23 I guess this is not the best example because this is not a linear uh equation
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Burton Ma.