kkt_condition_NLP
kkt_condition_NLP
inequality constraints
KKT Condition (Karush-Kuhn-Tucker condition)
n dimensional 𝑋 = 𝑥1 𝑥2 … … 𝑥𝑛 𝑇 ∈ 𝑅𝑛
vector of
decision
variables
Step 1: Transform the given problem into Lagrangian function
𝑔𝑗 𝑋 + 𝑆𝑗2 = 0 , ∀ 𝑗 = 1, … . . , 𝑚
• Lagrangian function is
𝐿 𝑥1 , 𝑥2 , … 𝑥𝑛 , 𝑆1 , 𝑆2 , … , 𝑆𝑚 , 𝜆1 , 𝜆2 , … , 𝜆𝑚 =
𝑓 𝑋 + σ𝑚 2
𝑗=1 𝜆𝑗 (𝑔𝑗 𝑋 + 𝑆𝑗 ) -----------------------------------(1)
Step 2: Develop set of necessary conditions ( gives local / relative minima)
𝜕𝑓 𝑚 𝜕𝑔𝑗 (𝑋)
ൗ𝜕𝑥𝑘 + σ𝑗=1 𝜆𝑗 = 0 , ∀ 𝑘 = 1, … . . , 𝑛 --------(2)
𝜕𝑥𝑘
𝜕𝐿ൗ
𝜕𝜆𝑗 = 0, ∀𝑗 = 1, … , 𝑚
𝑔𝑗 𝑋 + 𝑆𝑗2 = 0, ∀ 𝑗 = 1, … . , 𝑚 ---------------(3)
Step 2: Develop set of necessary conditions ( given local / relative minima)
𝜕𝐿ൗ
𝜕𝑆𝑗 = 0, ∀ 𝑗 = 1,2, … . , 𝑚
𝜆𝑗 × 𝑆𝑗 = 0, ∀ 𝑗 = 1, … , 𝑚-------------------(4)
• Equation 2, 3, and 4 together are known as KKT Conditions
• Now coming to equation 4, there are two possibilities of 𝜆𝑗 and 𝑆𝑗
values
• 𝜆𝑗 = 0, 𝑆𝑗 ≠ 0 , set of inactive constraints
• 𝜆𝑗 ≠ 0, 𝑆𝑗 = 0, set of active constraints
Step 2: Develop set of necessary conditions ( given local / relative minima)C
𝜕𝑓 𝑚 𝜕𝑔𝑗 (𝑋)
1. ൗ𝜕𝑥𝑘 + σ𝑗=1 𝜆𝑗
𝜕𝑥𝑘
= 0 , ∀ 𝑘 = 1, … . . , 𝑛 OPTIMALITY CONDITION
2. 𝑔𝑗 𝑋 ≤ 0, ∀ 𝑗 = 1, … 𝑚 FEASIBILITY CONDITION
4. 𝜆𝑗 ≥ 0, ∀𝑗 NON-NEGATIVITY CONSTRAINTS
• For a problem with two inequality constraints, there will be four possibilities
• 𝜆1 = 0, 𝜆2 = 0, inactive constraints
• 𝜆1 ≠ 0, 𝜆2 = 0, or 𝜆1 = 0, 𝜆2 ≠ 0, active and inactive constraints
• 𝜆1 ≠ 0, 𝜆2 ≠ 0, active constraints
Step 4: Check for sufficient condition for optimality
KKT Conditions are sufficient and will give GLOBAL OPTIMA if the objective
function is convex (minimization) or concave (maximization) and the feasible
region is also convex i.e. For a Convex programming problem
Problem on KKT Condition
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑓 𝑋 = 𝑥12 − 4𝑥1 + 𝑥22 − 6𝑥2
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
𝑥1 + 𝑥2 ≤ 3
−2𝑥1 + 𝑥2 ≤ 2
𝑥1 , 𝑥2 ≥ 0
Step 1: Transform into Lagrangian function
𝐿 𝑋, 𝜆 = 𝑥12 − 4𝑥1 + 𝑥22 − 6𝑥2 + 𝜆1 𝑥1 + 𝑥2 − 3 + 𝜆2 (−2𝑥1 + 𝑥2 − 2)
• For a problem with two inequality constraints, there will be four possibilities
• Case 2: 𝜆1 ≠ 0, 𝜆2 = 0,
one active and one
inactive constraints
• Case 3: 𝜆1 = 0, 𝜆2 ≠ 0,
These does not satisfy the non-negativity condition are not optimal
These does not satisfy the non-negativity condition are not optimal