What constraints would you write to ensure that if $x = 1$ then $y = 0$ where $x, y$ are binary variables?
Until now I only learnt how to build the constraint with 3 binary variables, therefore the difficulty level of this task is very high for me.
Operations Research Stack Exchange is a question and answer site for operations research and analytics professionals, educators, and students. It only takes a minute to sign up.
Sign up to join this communityWhat constraints would you write to ensure that if $x = 1$ then $y = 0$ where $x, y$ are binary variables?
Until now I only learnt how to build the constraint with 3 binary variables, therefore the difficulty level of this task is very high for me.
Via conjunctive normal form: $$ x \implies \lnot y \\ \lnot x \lor \lnot y \\ (1 - x ) + (1 - y) \ge 1 \\ x + y \le 1 $$