Integer Linear Programming
Intro
ILP adds an extra constraint that some or all variables must be integers. ILP is NP-hard. A special case, 0-1 ILP is NP-complete.
LP relaxation allows the variables to take on non-integral values. For example, in 0-1 ILP, . After the relaxation, . The relaxation can transform an NP-hard optimization problem to polynomial time. The trade-off is that we will only get a fractional optimal solution.
Formulation for Vertex Cover
Given an undirected graph , for each vertex ,
The objective function:
The constraints:
At least one endpoint of each edge is in the subset .
In order to get a poly-time algorithm, we can "relax" the constrain 2 with .
Formulation for Set Cover
Given a set and a collection of m subsets , is there a set of indices such that ? ( in decision version)
For each subset ,
The objective function:
The constraints:
for each element , // why we need the summation? cause we need at least one set covers the element and more is fine too.
Formulation for 3-SAT
References
Last updated