4

Via conjunctive normal form: $$ A_i \implies \bigwedge_j \lnot B_j \\ \lnot A_i \lor \bigwedge_j \lnot B_j \\ \bigwedge_j (\lnot A_i \lor \lnot B_j) \\ \bigwedge_j (1-A_i +1- B_j\ge 1) \\ \bigwedge_j (A_i +B_j\le 1) \\ $$ The other implication $$B_j \implies \bigwedge_i \lnot A_i$$ yields the same linear constraints. From your comment, you also want to ...


1

I would add an auxiliary variable $z\in\{0,1\}$: $$ z \geq a_i \ \ \forall a_i \in A $$ Then you can write: $$ b_j \leq 1-z \ \ \forall b_j \in B $$ If $z=0$, then the constraint is redundant. However, if $z=1$, then all elements of $B$ have to be 0. Update: @RobPratt correctly pointed out that the above formulation allows for $a_i = b_j = 0$, which ...


Only top voted, non community-wiki answers of a minimum length are eligible