Written by: Paul Rubin
Primary Source: OR in an OB World
I was asked a question that reduced to the following: if \(x\), \(y\) and \(z\) are all binary variables, how do we handle (in an integer programming model) the requirement “if \(x=1\) and \(y=1\) then \(z=1\)”? In the absence of any constraints on \(z\) when the antecedent is not true, this is very easy: add the constraint
\(\displaystyle z \ge x + y – 1.\)
Verification (by substituting all possible combinations of 0 and 1 for the variables) is left to the reader as an exercise.
I thought I had covered this in a previous post, but looking back it appears that it never came up (at least in this form). This might be my shortest post ever. :-)