I'm a bit fuzzy on what you want.
If you want to express x=a XOR b, where a, b and x are binaries,
you just need four constraints,
the constraints that cut off 001, 010, 100 and 111.
That will give you the convex hull, which is as good as can be done.
n
To express, x=XOR a[j] , for some large n,
j=1
n
note that 0 = x XOR XOR a[j] .
j=1
Add another integer variable:
n
0 = x + SUM a[j] - 2*s
j=1
The range of s in 0..floor((n+1)/2)
--
Michael [email protected]
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk