Reduction
For 3-CNF formula Φ, containing v variables and c clauses, construct c×v matrix A such that:
ai,j=⎩⎪⎨⎪⎧−1 1 0 if variable j occurs only without negation in clause iif variable j occurs only with negation in clause iotherwise
Also, construct c-vector b such that:
bi=−1+j=1∑vmax(0,ai,j)
In other words: bi=−1 plus the number of negated literals in clause i.
We observe that A and c can be constructed in O(cl), proving that the reduction can be done in polynomial time.
We will now prove that the existence of c-vector x:Ax≤b⟺Φ is satisfiable. Consider vector x to represent an assignment of the variables in Φ, where:
xi={1 0 if variable i is assigned Trueif variable i is assigned False
Let y=Ax, then:
yi≤bi⟺sum of satisfied literals in clause i≥1⟺clause i is satisfied
From this equation:
y=Ax≤b⟺x is an assignment satisfying Φ
Thus we have expressed a 3-CNF-SAT problem as a 0-1 integer programming problem. ■
Example
I think it’s much easier to get intuition for this reduction by looking at an example, so here it is:
Φ=(x1∨x2∨¬x3)∧(x1∨x3∨x4)∧(¬x2∨¬x3∨¬x4)
Our reduced instance looks as follows (zeroes omitted):
⎣⎡−1−1−111−11−11⎦⎤×⎣⎢⎢⎡x1x2x3x4⎦⎥⎥⎤≤⎣⎡0−12⎦⎤
We can see that ⟨x1=T,x2=F,x3=F,x4=F⟩ satisfies Φ and that
⎣⎡−1−1−111−11−11⎦⎤×⎣⎢⎢⎡1000⎦⎥⎥⎤=⎣⎡−1−10⎦⎤≤⎣⎡0−12⎦⎤