4.10.19 · D4 · HinglishAdvanced Topics (Elite Level)

ExercisesKKT conditions for constrained optimization

2,720 words12 min read↑ Read in English

4.10.19 · D4 · Maths › Advanced Topics (Elite Level) › KKT conditions for constrained optimization

Shuru karne se pehle, ek shared vocabulary reminder taaki koi symbol achanak na aaye. Do symbols mein index letters hain: is poore page mein == inequality constraints par run karta hai== (, the fences) aur == equality constraints par run karta hai== (, the wires).

Baar baar use hone wali recipe, jise tum baar baar apply karoge:

yes

no

Write Lagrangian L

Set grad L = 0 stationarity

Guess which fences are active

Solve for x and multipliers

Check lambda greater or equal 0

Check slackness done

Guess wrong flip a fence


Level 1 — Recognition

Exercise 1.1

Problem s.t. , ke liye chaar KKT conditions state karo. Har ek ka naam bolo.

Recall Solution 1.1
  1. Stationarity: .
  2. Primal feasibility: aur .
  3. Dual feasibility: .
  4. Complementary slackness: har ke liye .

Exercise 1.2

Har statement ke liye true ya false bolo aur ek-line ka reason do. (a) Equality multipliers necessarily hone chahiye. (b) Agar optimum par ek constraint inactive hai, toh uska multiplier hota hai. (c) Ek convex problem ke liye, KKT sirf necessary hain, sufficient kabhi nahi.

Recall Solution 1.2

(a) False. Sirf inequality multipliers hote hain; equality sign mein free hain (ek wire dono taraf push kar sakti hai). (b) True. Inactive ka matlab hai; complementary slackness phir force karta hai. (c) False. Ek convex problem ke liye KKT necessary AND sufficient hain global minimum ke liye.

Exercise 1.3

Standard form mein convert karo aur constraint ke liye stationarity term likho: .

Recall Solution 1.3

Sab kuch ek side move karo taaki constraint "something " padhe: Iska gradient hai, isliye stationarity contribution hai jahan . Agar tum flip karna bhool jaate, toh tumhara galat sign ke saath aata.


Level 2 — Application

Exercise 2.1

ko minimize karo subject to . , , aur find karo.

Recall Solution 2.1

Standard form: , isliye . . Stationarity: . Unconstrained min hai, jo violate karta hai — isliye fence active honi chahiye: . Phir ✓. Slackness ✓ (). Answer: , , .

Exercise 2.2

ko minimize karo subject to . Point aur find karo.

Recall Solution 2.2

Standard form: , . . Stationarity: , . Origin infeasible hai, isliye active try karo: . Phir . Check ✓, slackness ✓. Answer: , , .

Neeche wali figure padhna. Violet line fence hai; uske upar shaded band feasible region hai (). Magenta arcs ke level circles hain (equal cost ke points, origin se baahir badhte hue). Magenta mein optimum woh jagah hai jahan sabse chhota aisa circle pehli baar feasible band ko touch karta hai — line ka origin ke sabse kareeb wala point. Orange arrow hai (downhill pull), aur notice karo ki woh fence ke normal ke bilkul saath point karta hai: yahi stationarity visually dikhti hai — pull exactly fence ke push se cancel ho jaata hai.

Figure — KKT conditions for constrained optimization

Exercise 2.3

ko minimize karo subject to (yaani , ).

Recall Solution 2.3

. Stationarity: . Dono inactive try karo (): . Check ✓, slackness ✓. Answer: , dono , . Marble neeche baith jaata hai, kisi wall ko touch nahi karta.


Level 3 — Analysis

Exercise 3.1

ko minimize karo subject to aur (yaani ). , , find karo.

Recall Solution 3.1

, ; . . Stationarity: , . inactive try karo (): , . ke saath . Check ✓ (actually exactly fence par hai, phir bhi feasible), slackness ✓ (). solve karo: . Answer: , , . Note karo bilkul legal hai — equality multipliers par koi sign restriction nahi hoti.

Exercise 3.2

Consider karo subject to . Sirf ek feasible point hai . Dikhao ki LICQ yahan fail ho jaata hai, aur discuss karo ki KKT certify ho sakta hai ya nahi.

Recall Solution 3.2

Feasibility: force karta hai (ek single point). par constraint active hai (). LICQ check: active gradient hai at . Zero vector wale set mein linearly dependent hote hain, isliye LICQ fail ho jaata hai. Stationarity attempt: kisi bhi ke liye. Isliye koi multiplier stationarity hold nahi kar sakta, chahe woh (sirf, hence optimal) feasible point hi kyun na ho. Yahi situation hai jiske baare mein parent note warn karta hai: constraint qualification ke bina, KKT optimum par hold nahi karna padta. Answer: LICQ fail; KKT stationarity yahan unsatisfiable hai; multiplier exist nahi karta.

Exercise 3.3

ko minimize karo subject to (radius wala disk centred at ). Geometry se optimum find karo, phir KKT se verify karo.

Recall Solution 3.3

Geometry: hum disk ka woh point chahte hain jo origin ke sabse kareeb ho. Disk ka origin ke kareeb wala point, origin se centre tak ki line par hai, distance (centre distance) (radius) par. Isliye . KKT check: , . Active try karo: . Stationarity: aur . Doosri equation: . Kyunki , , isliye . ke saath, active: ya . Pehli equation: .

  • : ✓ → valid KKT point, .
  • : ✗ dual feasibility fail (yeh sabse door wala point hai, ek maximum). Answer: , , .

Neeche wali figure padhna. Violet circle fence boundary hai; shaded disk feasible region hai. Do magenta arcs ke cost circles hain. Origin aur centre se hoti dashed navy line disk ko do points par pierce karti hai: magenta mein near point (minimum, ) aur orange mein far point (ek maximum, jiska dual feasibility fail karta hai aur reject ho jaata hai). Dono stationarity solve karte hain — sirf ka sign inhe alag karta hai.

Figure — KKT conditions for constrained optimization

Level 4 — Synthesis

Exercise 4.1

ko minimize karo subject to , , . Full case analysis ke saath optimum find karo.

Recall Solution 4.1

Constraints: , , . Unconstrained min hai, lekin → infeasible, isliye active hai. Sirf active assume karo (): . Stationarity: , . Active: . Phir ✓. Baaki fences check karo: ✓, ✓ (dono inactive, consistent). Slackness ✓. Answer: , , . Target diagonal fence par kareeb wale point par pull back ho jaata hai; corner fences kabhi play mein nahi aatein.

Exercise 4.2

Probability simplex par projection (SVM-style problems ke liye 1-D warm-up). minimize karo ke liye, given data , subject to aur . Projection find karo.

Recall Solution 4.2

; , . . Dono inactive try karo: stationarity , . Isliye , . Sum : . Phir , . Lekin violate karta hai ! Isliye active honi chahiye. Ab active (), inactive (): se: . mein stationarity: . mein stationarity: . Phir ✓. Check ✓. Answer: , , , . Projection negative coordinate ko boundary par snap kar deta hai.


Level 5 — Mastery

Exercise 5.1

Hard-margin SVM dual derive karo, KKT-style. Linearly separable dataset ke liye, SVM primal yeh hai: Constraints ko standard form mein likho, Lagrangian form karo, stationarity apply karo, aur batao ki complementary slackness support vectors ke baare mein kya kehta hai.

Recall Solution 5.1

Standard form: , multipliers . mein stationarity: . mein stationarity: . Complementary slackness: .

  • Agar ek point strictly correct side par hai (), toh , jo force karta hai — woh mein appear nahi karta.
  • Sirf margin par wale points () ka ho sakta hai. Yeh support vectors hain — sirf yahi data boundary define karta hai. Yeh poore SVM ka KKT interpretation hai: separating plane sirf apne support vectors ka weighted sum hai. ( ko mein wapas substitute karne se mein classic dual milta hai.)

Exercise 5.2

KKT ⇒ yahan global optimum kyun. Ex 5.1 mein, argue karo ki KKT point global minimum hai, aur woh constraint qualification naam karo jo guarantee karta hai ki multipliers exist karte hain.

Recall Solution 5.2

Objective convex hai (quadratic, positive semidefinite Hessian), aur har constraint affine hai mein (hence convex). Convex objective aur affine constraints wala problem ek convex program hai. Convex programs ke liye, KKT necessary AND sufficient hain global minimum ke liye — isliye chaar conditions satisfy karne wala koi bhi point the global optimum hai. Constraint qualification: Slater's condition ek strictly feasible point maangta hai — koi jahan har constraint strictly hold kare, yaani saare ke liye . Yeh mere separability ke same nahi hai: separability sirf ek point ki guarantee karta hai jahan ho (margin par equality allowed), jabki Slater ko har jagah strict inequality chahiye. Lekin, agar data separable hai toh hum hamesha ko scale up kar sakte hain strict gap kholne ke liye (jab ek baar margin positive ho, kisi bhi factor se multiply karo), ek strictly feasible point produce karte hue — isliye separability implies Slater yahan, lekin sirf is rescaling step ke baad, by definition nahi. (Iske alawa, kyunki constraints affine hain, aur bhi weak linear constraint qualifications apply hoti hain.) Slater guarantee karta hai ki dual multipliers exist karte hain aur strong duality hold hoti hai, jo exactly yeh allow karta hai ki hum primal ki jagah dual solve kar sakein.

Exercise 5.3

Algorithms se connect karo. Do sentences mein explain karo ki projected gradient descent apne fixed point par KKT kaise enforce karta hai, Ex 4.2 ke projection ko mechanism ke roop mein use karte hue.

Recall Solution 5.3

Projected gradient ek downhill step leta hai aur phir feasible set par project karta hai — exactly woh operation jo humne KKT se Ex 4.2 mein solve kiya tha (simplex par project karo, negatives ko par snap karo). Fixed point par gradient step projection se bilkul undo ho jaata hai, jo precisely yeh statement hai ki feasible set ke normal cone mein lie karta hai — yeh KKT stationarity plus complementary slackness ki geometric form hai.