Modelling IF/THEN statements in Linear Programming
<p>Given a set of boolean variables X = {x0,x1, .... xn}, where each variable x\in X belongs to one group G = {g0, g1, ..., gm}, g \subset X. </p>

<p>The objective of the problem is to maximize the number of variables in X that are set to 1.</p>

<p>How can I model the constraint in LP that requires ALL the variables belonging to the same group g\in G to be set to EITHER 0 or to 1? More precisely, no two boolean variables from a g\in G can have different values. </p>

<p>P.S: The above defined problem is just a simplification of the real problem, which includes additional constraints aside from the one defined above.</p>