Skip to main content
2 of 4
added 270 characters in body
RobPratt
  • 34.3k
  • 2
  • 47
  • 90

To disallow any given pattern of $0$ and $1$, you can impose "no-good" constraints. For example, if you want to avoid delivering on both Tuesday and Wednesday, that is, avoid $$(x_3,x_4)=(1,1),$$ you want to enforce $$\lnot (x_3 \land x_4).$$ Rewriting in conjunctive normal form yields $$\lnot x_3 \lor \lnot x_4.$$ So the desired constraint is $$(1 - x_3) + (1 - x_4) \ge 1,$$ equivalently, $$x_3+x_4 \le 1.$$

RobPratt
  • 34.3k
  • 2
  • 47
  • 90