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, xi∈{0,1}. After the relaxation, 0≤xi≤1. 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 G=(V,E), for each vertex i∈V, xi={1,0,ifi∈V′otherwise
The objective function: mini∈V∑xi
The constraints:
At least one endpoint of each edge is in the subset V′. ∀e=(u,v)∈E,xu+xv≥1
∀i∈V,xi∈{0,1}
In order to get a poly-time algorithm, we can "relax" the constrain 2 with xi∈[0,1].
Formulation for Set Cover
Given a set U={1,2,...,n} and a collection M of m subsets S1,S2,...,Sm, is there a set of indices I⊆{1,...,m} such that i∈I⋃Si=U ? (∣I∣≤K in decision version)
For each subset Sj∈M, xj={1,0,ifj∈Iotherwise
The objective function: minSj∈M∑xj
The constraints:
for each element eh∈U, {j∣eh∈Sj}∑xj≥1 // why we need the summation? cause we need at least one set covers the element eh and more is fine too.
∀Sj∈M,xj∈{0,1}
Formulation for 3-SAT
References
Wikipedia LP Relaxation
UW-Madison CS787 Lecture 10
UIUC CS598 Lecture 4
Last updated