Formulation of mutually exclusive condition

1.1k Views Asked by At

So I have two integer variable and they can be one of the following

  1. $x=0, y=1$
  2. $x=1, y=0$
  3. $x=2, y=0$

how can I formulate this as an integer program? I've gotten

$x + y \le 2$ and $y \le 1$

but it doesn't exclude case where $x = 1, y = 1$

in general, how can I formulate this exclusive or condition in a linear program?

1

There are 1 best solutions below

2
On

I think three conditions are enough: $x+y\geq 1$, $x+2y\leq 2$, and $y\geq 0$. If I am not mistaken then there are just precisely three integer solutions (those requested by you) of this system.