2
$\begingroup$

Is there a better way to represent an AND of $n$ variables together other than creating $O(n)$ new variables and constraints?

$\endgroup$
  • $\begingroup$ You might want to ask your other question separately, so it's not treated as an answered question, and then remove it from this post. Generally, this site works best when you ask one question per post. $\endgroup$ – D.W. Apr 25 at 22:55
2
$\begingroup$

There's a straightforward way to represent the logical AND of $n$ variables $x_1,\dots,x_n$: add the linear inequalities $y \ge x_1+ \dots + x_n-(n-1)$, $y \le x_i$ for each $i$, and $0 \le y \le 1$.

$\endgroup$

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.