[gecode-users] Counting booleans

Malcolm Ryan malcolmr at cse.unsw.edu.au
Thu Feb 14 06:55:55 CET 2008


Another question: I have two lists of variables X1 ... Xn and Y1 ...  
Yn. I want to constrain them so that at most one (or exactly one) of  
the Xi's differs from the corresponding Yi.

This is one of those things that would propagate better with a  
specialised constraint. Does such a constraint exist (in Gecode/J)?

If we had booleans Bi = (Xi = Yi), this could be represented by a  
constraint which said that at most (or exactly) one Bi was true. Does  
such a constraint exist?

Malcolm

--
"If there is one thing worse than the modern weakening of major morals
    it is the modern strengthening of minor morals.
Thus it is considered more withering to accuse a man
    of bad taste than of bad ethics."    -- G.K.Chesterton, On Lying  
in Bed







More information about the gecode-users mailing list