# NP-completeness proof via reduction

I'm aware that 0-1 integer programming problem is NP-complete, where the problem is stated as: Given some integer matrix A and some integer vector b, determine whether there exists a vector x consisting of 0's and 1's such that Ax >= b. I've seen that 3-CNF SAT is reducible to this problem.

However, here's a slight variant: Given some integer matrix A and some integer vector b, determine whether there exists a vector x consisting of 0's and 2's such that Ax >= b.

The fact that vector x must consist of 0's and 2's kind of throws me off here. For the original problem, we just could reduce from 3-SAT by adding the inequalities 0 <= xi <= 1 for each boolean variable. But here, I can't just add the following inequalities:

0 <= xi <= 2

because x cannot equal 1.

Am I allowed to add an inequality, such as xi != 1? If not, what reduction can I use to show that the given problem is NP-complete? Thanks for any help.

• You can just go $0 \leq x_i \leq 1$ and $y_i = 2x_i$. – G. Bach Mar 4 '16 at 21:29
• Thanks for your response, it is allowed to add equalities like yi = 2xi in an integer linear programming problem? I had the feeling that we were only supposed to add inequalities. – user3280193 Mar 5 '16 at 0:11
• $(a = b) \equiv (a \leq b \wedge b \leq a)$. – G. Bach Mar 5 '16 at 9:33

Suppose you are given a 0-1-Integer-Programming instance. You need to substitute $x_i$'s, $x_i \in \{0,1\}$, with new variables $y_i$'s as G. Bach mentioned. The substitution is $x_i = y_i/2$, $y_i \in \{0,2\}$.

By this substitution, you get
0-1-Integer-Programming $\leq_P$ 0-2-Integer-Programming
and also 0-2-Integer-Programming $\leq_P$ 0-1-Integer-Programming by reverse substitution.
(This is because the polynomial reduction function in this case is invertible).

Therefore 0-2-Integer-Programming is also NP-complete
(from 0-1-Integer-Programming $\leq_P$ 0-2-Integer-Programming).

By the way, you are not allowed to add $x_i \neq 1$ in canonical integer programming problem. Basically it means $x_i \leq 0$ OR $x_i \geq 2$. We can't have OR constraints, all we can have is AND constraints.

• Maybe this question is also of relevance with regard to what boolean logic we can implement in 0-1-programs. While I think your comment regarding OR and AND was meant to convey that all constraints have to apply simultaneously and we can't say "a solution only has to satisfy this or that constraint", maybe the encodings listed in the answers to that question are useful as well. – G. Bach Mar 5 '16 at 9:33
• Thanks, I'm wondering whether it's also valid to give a proof sketch based on the following: Given the 0-1 integer programming problem $Ax \geq b$, construct a new vector $b' = 2b$, and use the "magic box" of 0-2 integer programming to find if there exists a vector $x' \in \{0,2\}$ such that $Ax' \geq b'$, and say that IFF the answer is yes, there exists a vector $x \in \{0,1\}$ that solves $Ax \geq b$? – user3280193 Mar 6 '16 at 5:58
• Isn't the proof obvious? easy? – Shreesh Mar 6 '16 at 7:04