Originally posted by: T_O
XNOR over 2 binaries is just equivalence, so you can omit one of the variables (replacing it by the other one everywhere) or add a constraint like x1 - x2 = 0.
Concerning more than 2 variables, we first of all have to ensure that we use the same definition of XNOR. In the following, I will assume that it is check for even parity (the number of ones is even).
Let x1, ..., xn be the binaries be XNORed. Add a new integer variable z. Then add the following constraint:
x1 + ... + xn - 2z = 0
Best regards,
Thomas
#CPLEXOptimizers#DecisionOptimization