I'm working on a graph-theoretical problem. Suppose we want to find a Graph G=(V,E), such that there exists a partition X of V containing at most k equivalence classes. A variable p_S takes value 1 exactly when S is a member of partition X, and zero otherwise. So we have a constraint that the sum over all variables p_S is at most k, for all subsets S of V.
So what I want to do is to iterate over all p_S that have value 1 and define more constraints based on the elements I draw out of S. These constraints would preserve that members of an equivalence class share some mutual property.
Is it possible to access the p_S variables that way and how could I do it?
ALternatively I know I can do without iterating on my binary variables if I'm allowed to use binary variables as coefficients in my constraints. Is that possible?
Thanks in advance!
if I'm allowed to use binary variables as coefficients in my constraintsis the basic concept behind this, but you can't multiply two variables in general, meaning, that you need to linearize those products (binary * binary, binary * int, binary * cont) (by additional variables and constraints). For each of those linearizations, there are different approaches and assumptions which are needed (e.g. a-priori bounds)! As this is very model-dependent (which we don't know), there isn't much more to say.