Consider the following general linear program
where . One can relax the problem by “dualizing” the constraints:
This is known as the Lagrangian relaxation and is a vector of nonnegative Lagrangian multipliers. The idea is that the system is now penalized for violating our constraints . We call it a relaxation for two reasons:
- If is feasible in the original problem, is feasible in the relaxation.
- If is feasible in the original problem, then . In other words, the epigraph of our relaxation contains the epigraph of the original problem.
Lagrangian relaxation provides a family of relaxations parameterized by . The Lagrangian dual problem is to find the best possible relaxation bound . That is, if is the optimal value of the relaxation, then the Lagrangian dual of the original problem is to maximize .
Integer Programming
The classic idea of a “hard” constraint that should be relaxed is integer constraints. Consider the ILP
whose Lagrangian relaxation is
Notice that the Lagrangian function is piecewise linear. Moreover, the optimal value of the Lagrangian dual is equal to the optimal value of
That is,
Subgradients
Let be a real-valued function. Then we say is a subgradient of at if for all ,
If is convex and differentiable, then , the usual gradient from vector calculus.
Solving the Dual
The most common approach for solving the Lagrangian dual is subgradient optimization. Let be the set of optimal solutions of the Lagrangian relaxation when . For any , let be the subgradient of at . In relation to integer programming, the subgradients are for each . The algorithm works similiar to gradient descent.
Let be the initial estimate of the optimal . For iteration , define
where is the value of obtained by computing and is its corresponding subgradient. If has a negative components, they are projected to zero. The simplest step size is ; but, a more complex step size is given by Polyak:
where is the known upper bound on . Typically, but it is common practice to do when has not improved in several iterations.
Stopping Criteria
There are several stopping criteria for subgradient method. Here is a brief summary:
- Step size below tolerance:
- Sub-gradient is zero:
- Duality gap is small: let be the best solution for the dual found so far and let be any feasible solution to the original problem. Stop when .
- No improvement after iterations
- Max iterations
In practice, one would want a combination of all five.
Example
Consider the following ILP:
Dualizing the first constraint gives
Let’s start with , which corresponds to by making as small as possible along .
Iteration 1:
Iteration 2:
Iteration 3:
Iteration 4:
Iteration 5:
Iteration 6:
Iteration 7: