Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Lagrangian and dual problem

Michel Bierlaire

Solution of the practice quiz

The primal problem is

min −4x1 + 2x2


x∈R2

subject to

−x1 + x2 = 2,
x1 − x2 = 1,
x1 ≥ 0,
x2 ≥ 0.

The two equality constraints are incompatible, and the optimization prob-
lem is infeasible. Consequently, we expect the dual problem to be either
infeasible or unbounded.
To write the Lagrangian, we first write the problem as follows:

min −4x1 + 2x2


x∈R2

subject to

h1 (x) = 2 + x1 − x2 =0 (λ1 ),
h2 (x) = 1 − x1 + x2 =0 (λ2 ),
g1 (x) = − x1 ≤0 (µ1 ),
g2 (x) = − x2 ≤0 (µ2 ),

where λ1 , λ2 , µ1 and µ2 are the penalty parameters associated with each


constraint.
The Lagrangian function is
L(x1 , x2 , λ1 , λ2 , µ1 , µ2 ) = −4x1 + 2x2 + λ1 (2 + x1 − x2 )
+ λ2 (1 − x1 + x2 ) − µ1 x1 − µ2 x2
= (−4 + λ1 − λ2 − µ1 )x1
+ (2 − λ1 + λ2 − µ2 )x2 + 2λ1 + λ2 .
The dual function is
q(λ1 , λ2 , µ1 , µ2 ) = min L(x1 , x2 , λ1 , λ2 , µ1 , µ2 ).
x1 ,x2

In order for the dual function to be bounded, the coefficients of x1 and


x2 have to be zero. Therefore, we have to impose the following constraints
on the penalty parameters:
µ1 = −4 + λ1 − λ2 , (1)
µ2 = 2 − λ1 + λ2 . (2)
In that case, the dual function becomes
q(λ1 , λ2 , µ1 , µ2 ) = 2λ1 + λ2 .
Moreover, the parameters associated with the inequality constraints must be
non negative. That is, µ1 ≥ 0 and µ2 ≥ 0. The dual problem is therefore
max 2λ1 + λ2
λ1 ,λ2 ,µ1 ,µ2

subject to
µ1 = −4 + λ1 − λ2 ,
µ2 = 2 − λ1 + λ2 ,
µ1 ≥ 0,
µ2 ≥ 0.

As the parameters µ1 and µ2 do not appear in the objective function, we


can rewrite (1) and (2) as
−4 + λ1 − λ2 ≥ 0,
2 − λ1 + λ2 ≥ 0,
and eliminate the µ’s, so that the dual problem becomes

max 2λ1 + λ2
λ1 ,λ2

subject to

λ1 − λ2 ≥ 4,
λ1 − λ2 ≤ 2.

The quantity λ1 − λ2 cannot be both larger or equal to 4, and lesser or equal


to 2. Therefore, the dual problem is also infeasible.

You might also like