5.386. sum_free
DESCRIPTION | LINKS |
- Origin
- Constraint
- Argument
- Purpose
Impose for all pairs of values (not necessarily distinct) , of the set the fact that the sum is not an element of .
- Example
-
The constraint holds since:
,Β Β ,Β Β ,Β Β .
,Β Β ,Β Β .
,Β Β .
- Usage
The constraint was introduced by W.-J.Β vanΒ Hoeve and A.Β Sabharwal in order to model in a concise way Schur problems.
On one hand, the first model has domain variables (), where corresponds to the subset in which element occurs. The constraints (, ) enforce that the subsets are sum-free. We have such constraints.
On the other hand, the model proposed by W.-J.Β vanΒ Hoeve and A.Β Sabharwal represents in an explicit way with a set variable () each subset of the partition we are looking for. Now, to express the fact that these subsets are sum-free they simply use constraints of the form .
While the two models have the same behaviour when we focus on the number of backtracks the second model is much more efficient from a memory point of view.
- Algorithm
W.-J.Β vanΒ Hoeve and A.Β Sabharwal have proposed an algorithm that enforces bound-consistency for the constraint inΒ [HoeveSabharwal07].
- Keywords
constraint arguments: unary constraint, constraint involving set variables.