Binary variable syntax?

66 Views Asked by At

Is there a more compact styntax to represent binary variables, such as:

$3a+2b+c=5$ where $a,b,c$ are either "0" or "1" ?

I've tried setting domains, ($a\le1$ and $a\ge 0$, etc) but that only works for a couple variables then it doesn't seem to pick it up.

Thanks!

1

There are 1 best solutions below

0
On

"Solve 3a+2b+c=5 over GF(2)" (You're just wanting to restrict the variables to the finite field with two elements.)