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.

  • $\begingroup$ You can just go $0 \leq x_i \leq 1$ and $y_i = 2x_i$. $\endgroup$ – G. Bach Mar 4 '16 at 21:29
  • $\begingroup$ 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. $\endgroup$ – user3280193 Mar 5 '16 at 0:11
  • 1
    $\begingroup$ $(a = b) \equiv (a \leq b \wedge b \leq a)$. $\endgroup$ – 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.

  • $\begingroup$ 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. $\endgroup$ – G. Bach Mar 5 '16 at 9:33
  • $\begingroup$ 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$? $\endgroup$ – user3280193 Mar 6 '16 at 5:58
  • $\begingroup$ Isn't the proof obvious? easy? $\endgroup$ – Shreesh Mar 6 '16 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.