Worked examples — KKT conditions for constrained optimization
4.10.19 · D3· Maths › Advanced Topics (Elite Level) › KKT conditions for constrained optimization
Shuru karne se pehle, vocabulary ko dobara anchor karte hain taaki kuch bhi bina explain ke use na ho.
Working recipe yaad karo (hum ise har example mein use karte hain):
- Likho (pehle har ko form mein daalo!).
- set karo (stationarity).
- Guess karo ki kaun si inequalities active hain. Inactive ⇒ uska ; active ⇒ uska .
- Solve karo. Phir verify karo: primal feasibility, , slackness. Agar koi aaye, to guess galat tha — doosra active-set try karo.
Scenario matrix
| # | Cell (kya cheez ise alag banati hai) | Example |
|---|---|---|
| A | Saari inequalities inactive (interior min) | Ex 1 |
| B | Ek inequality active, positive | Ex 2 |
| C | Equality + inequality saath mein, (sign-free) | Ex 3 |
| D | Galat active-set guess → flag, phir repair | Ex 4 |
| E | Do inequalities ek saath active (ek cone / corner) | Ex 5 |
| F | Degenerate LICQ failure — multipliers exist hi nahi karte | Ex 6 |
| G | Limiting case: constraint budget answer ko smoothly move karta hai | Ex 7 |
| H | Word problem (real units) ek active budget ke saath | Ex 8 |
| I | Exam twist: non-convex, KKT ek maximum bhi pakad leta hai | Ex 9 |
In rows mein cover hai: har activity combination (inactive / ek active / do active), dono multiplier signs, qualification ki failure, ek limit, ek real-world model, aur ek non-convex trap.
Example A — sab kuch inactive (interior minimum)
- Lagrangian. . Yeh step kyun? Dono fences already form mein hain, isliye hum bas unhe append karte hain.
- Guess karo dono inactive ⇒ . Yeh step kyun? Sabse sasta possible outcome unconstrained minimum hai; pehle usse test karo.
- Stationarity. ; . Yeh step kyun? woh jagah hai jahan ground flat hai — kisi fence ki zaroorat nahi.
- Feasibility check karo. ✓, ✓. Slackness ✓.
Example B — ek fence active (positive )

- Lagrangian. . Yeh step kyun? Standard build; fence already form mein hai.
- Stationarity. . Yeh step kyun? Rest par, ko fence ke push se cancel hona chahiye.
- Guess active ⇒ . Yeh step kyun? Origin infeasible hai, isliye answer boundary par hi hona chahiye.
- Multiplier. . Check karo ✓ (dual feasibility).
Example C — equality + inequality, negative
- Lagrangian. . Yeh step kyun? Equality ko free-sign milta hai; inequality ko milta hai.
- Guess karo inactive ⇒ . Yeh step kyun? Akela wire hi ball ko wali jagah rok sakta hai.
- Stationarity. . ke saath: . Yeh step kyun? Wire par, dono partials ek hi dete hain, jo symmetry force karta hai.
- Multiplier & checks. . Check karo ✓ (fence untouched). Slackness ✓. Yeh step kyun? Humne step 2 mein inactive assume kiya tha; woh assumption tabhi legitimate hai jab solved point actually satisfy kare — isliye hum back plug karke confirm karte hain, aur confirm karte hain ki slackness automatically hold hoti hai kyunki hai.
Example D — galat guess khud flag karta hai (), phir repair
- Galat guess: active ⇒ , . Yeh step kyun? Woh self-correcting flag demonstrate karne ke liye jo parent note warn karta hai.
- Stationarity. , isliye . par: . Yeh step kyun? Assumed system solve karne par multiplier milta hai.
- Flag padhna. dual feasibility violate karta hai — yeh active-set impossible hai. Ise discard karo. Yeh step kyun? Negative inequality multiplier mathematical tarike se chilla raha hai "is fence ko pull karna padega, lekin fences sirf push karti hain."
- Correct guess: dono inactive. . Feasibility ✓, slackness ✓. Yeh step kyun? active rule out karne ke baad, ek hi remaining candidate active-set hai jo respect karta hai — "koi fence active nahi"; hum usse test karte hain aur woh chaar saare KKT conditions pass karta hai, isliye woh genuine optimum hai.
Example E — do fences ek saath active (corner / cone)

- Lagrangian. . Yeh step kyun? Do inequalities, dono form mein.
- Guess dono active ⇒ . Yeh step kyun? Dono fences target se origin ki taraf point karti hain; corner natural rest hai.
- Stationarity. ; . Yeh step kyun? Har active fence apna push supply karta hai ke us component ko cancel karne ke liye.
- Checks. , ✓. Dono hain isliye slackness ✓. Yeh step kyun? "Dono active" guess tabhi valid hai jab dono multipliers non-negative niklen (dual feasibility); hume har confirm karna hai, warna ek negative wala corner ko galat active-set flag karega.
Example F — degenerate: LICQ fail, koi multipliers nahi
- par active gradients. Dono constraints wahan active hain (). aur . Yeh step kyun? KKT stationarity ko ka inki non-negative combination hona chahiye.
- Stationarity attempt. . Humein chahiye . Yeh step kyun? Required cancellation componentwise likhna.
- Contradiction. -component padhta hai — impossible. Koi exist nahi karte. Yeh step kyun? Dono active gradients vertical hain; woh linearly dependent hain aur koi horizontal direction span nahi karte, isliye woh kabhi ke horizontal ko cancel nahi kar sakte.
- Diagnosis. LICQ fails: linearly independent nahi hain (ek doosre ka scalar multiple hai). Isliye KKT yahan necessary nahi hain even though true optimum hai.
Example G — limiting behaviour: budget shift karna
- General solve (active). Example B ki tarah: , . Yeh step kyun? Geometry identical hai; sirf boundary line move hui hai.
- Multiplier ka matlab. : yahan , isliye . Yeh step kyun? Multiplier sensitivity hai — ek unit se budget tight karne ki marginal cost (Duality and the Dual Problem ka bridge).
- Limit . , : fence free minimum ke tangent ho jaati hai aur uska push smoothly vanish ho jaata hai — active se inactive ka ek graceful hand-off. Yeh step kyun? Yeh exactly limit mein complementary slackness hai: dono factors shrink hone se.
- Case . Ab origin already satisfy karta hai; constraint inactive hai, , answer , . Yeh step kyun? Negative budget ball ke peeche ki fence hai — irrelevant.
Example H — word problem (real units)
- Model. Minimize karo s.t. . ( abhi ignore karo; baad mein check karenge.) Yeh step kyun? "Kam se kam 6 tonnes" ko form mein translate karo.
- Lagrangian & stationarity. . , . Yeh step kyun? Har product ki marginal cost ko same contract push ke against balance karo.
- Guess active (). se . Phir . Yeh step kyun? Contract demanding hai; sabse sasta feasible plan boundary par baithta hai.
- Multiplier & checks. ✓. ✓. Slackness ✓. Yeh step kyun? Poora "active" guess tabhi tikta hai jab multiplier non-negative ho aur produce ki gayi amounts physically valid hon (no negative tonnage); hum solved values back plug karte hain feasibility, dual feasibility, aur slackness confirm karne ke liye plan par trust karne se pehle.
Example I — exam twist: non-convex, KKT ek maximum pakad leta hai
- Interior stationary point. . Dono inactive guess karo (): . Feasibility ✓, slackness ✓ — isliye chaar saare KKT conditions pass karta hai. Yeh step kyun? Yeh dikhane ke liye ki KKT ek aise point par hold kar sakta hai jo minimum nahi hai.
- identify karo. , lekin nearby : isliye ka ek local maximum hai, phir bhi KKT pass kiya. Yeh step kyun? Kyunki problem non-convex hai, KKT sirf necessary hain, sufficient nahi — woh min aur max mein fark nahi bata sakte (parent-note ki galti concrete ho gayi).
- Boundary case (fence active). , set karo. Stationarity ✓. Slackness ✓ (kyunki ). Yeh step kyun? Right-hand corner ko apne active-set ke taur par test karo; KKT point count hone ke liye dual feasibility satisfy karni chahiye.
- Boundary case (fence active). , set karo. Stationarity ✓. Slackness ✓. Yeh step kyun? Symmetry se left corner mirror case hai; confirm karo ki woh bhi valid KKT point hai.
- Values compare karke decide karo. KKT-satisfying points hain with . Sabse chota chunno: , . Yeh step kyun? Jab KKT sufficient nahi hote, woh sirf candidates list karte hain — tumhe har KKT point par evaluate karni hai aur true minimum dhundhne ke liye sabse chota chunna hai.
Wrap-up
Recall Humne kaun se cells cover kiye?
A interior-inactive · B one-active () · C equality with · D wrong-guess flag · E two-active corner · F LICQ failure · G limiting budget · H word problem · I non-convex catches a max. Activity ka har combination, dono signs, degeneracy, ek limit, real units, aur convex-vs-non-convex distinction.
Recall Multiplier "sensitivity" idea aage kahan le jaata hai?
Duality and the Dual Problem ka seed hai aur yahi wajah hai ki Support Vector Machines apne support vectors active KKT constraints se read karte hain. Optimization method: Gradient Descent and Projected Gradient.
Back to the parent topic.