Skip to main content
4 of 4
Improved TeX formatting
TheSimpliFire
  • 5.5k
  • 5
  • 23
  • 56

If I understand your question correctly then you want to model that if $$a_1+a_2+a_3\geq 1$$ then it follows that $$b_1+b_2+b_3\geq 1.$$ Since $A \implies B$ is equivalent to $\neg A \lor B$ we want to model $$\sum_{i=1}^3 a_i < 1 \quad\bigvee\quad \sum_{i=1}^3 b_i \geq 1.$$ We can replace $\sum_{i=1}^3 a_i < 1$ with $\sum\limits_{i=1}^3 a_i =0$ because the $a_i$ are binary and obtain $$\sum\limits_{i=1}^3 a_i = 0\quad\bigvee\quad\sum_{i=1}^3 b_i \geq 1.$$ This can be written as a single constraint in the following way:

$$3\sum_{i=1}^3 b_i \geq \sum_{i=1}^3 a_i $$

Now, if any of the $a_i$ is true then the constraint forces at least of of the $b_i$ to be true as well. On the other hand, if all the $a_i$ are $0$ anything can happen to the $b_i$.

YukiJ
  • 2k
  • 14
  • 39