1
$\begingroup$

If I have two binary(0-1) decision variables: $P_1$ and $P_2$, and my constraint is that:

$P_2$ may be chosen if and only if $P_1$ is not chosen, is this equivalent to the formulation that: $$P_1 + P_2=1$$

$\endgroup$
1
  • 1
    $\begingroup$ "May be" sounds optional. Does the condition allow that neither variable is chosen? $\endgroup$ Commented Jul 11, 2021 at 15:10

1 Answer 1

2
$\begingroup$

You can derive linear constraints via conjunctive normal form as follows. $$ P_2 \iff \lnot P_1 \\ (P_2 \implies \lnot P_1) \land (\lnot P_1 \implies P_2) \\ (\lnot P_2 \lor \lnot P_1) \land (P_1 \lor P_2) \\ (1 - P_2) + (1 - P_1) \ge 1 \land P_1 + P_2 \ge 1 \\ 1 \ge P_2 + P_1 \land P_1 + P_2 \ge 1 \\ P_1 + P_2 = 1 $$

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.