[SCIP] XOR VS AND/OR: reason behind different signatures

berthold at zib.de berthold at zib.de
Wed May 30 10:04:00 CEST 2018


Hi Roberto,

A design consideration is that you typically take an XOR constraint to
model that an odd or even number of binary variables from a set has to be
one. The rhs bool expresses whether it is an "odd" XOR (rhs=1) or an
"even" XOR (rhs=0).
A theoretical consideration is that for AND and/or OR constraints ;-), the
resultant is indeed a designated variable. It is the only variable in the
constraint for which fixing it in one direction (1 for AND, 0 for OR)
implies fixings of all other variables. If you thought about an XOR that
had a variable "resultant" rhs, one could always exchange this resultant
for any of the operators (maybe you would need to add an artificial TRUE
operator). In any case, fixing, either direction, a single variable in an
XOR constraint never has direct implications on any other variable as long
as there are at least two unfixed variables left. The last variable can
always "recover" feasibility and therefrom each variable could serve as a
resultant.

I believe these are the two main reasons to have it the way it actually is
in SCIP.

Best regards,
Timo

> Dear SCIPers,
> thanks in advance for your consideration.
>
> I wonder why the signature SCIPcreateConsXor is different from
> SCIPcreateConsAnd/Or in their respective constraint handlers.
> According to their signatures, the AND/OR constraint resultant is
> SCIP_VAR*, whereas the XOR "resultant" (it is not even called that way)
> is a SCIP_Bool.
> Is there any design/theoretical choice for this inconsistency?
>
> Best,
> --
> Roberto Amabile
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>




More information about the Scip mailing list