5.47. balance_partition
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Type
- Arguments
- Restrictions
- Purpose
Consider the largest set (respectively the smallest set ) of variables of the collection that take their value in the same partition of the collection is equal to the difference between the cardinality of and the cardinality of .
- Example
-
In this example values are respectively associated with the partitions and . Partitions and are respectively used 2 and 3 times. The constraint holds since its first argument is assigned to the difference between the maximum and minimum number of the previous occurrences (i.e.,ย ). Note that we do not consider those partitions that are not used at all.
- Typical
- Symmetries
Items of are permutable.
Items of are permutable.
Items of are permutable.
An occurrence of a value of can be replaced by any other value that also belongs to the same partition of .
- Arg. properties
Functional dependency: determined by and .
- Usage
An application of the is to enforce a balanced assignment of values, no matter how many distinct partitions will be used. In this case one will push down the maximum value of the first argument of the constraint.
- See also
specialisation: ย ( replaced by ).
- Keywords
-
characteristic of a constraint: partition.
constraint arguments: pure functional dependency.
constraint type: value constraint.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph class
-
- Graph model
The graph property constraints the difference between the sizes of the largest and smallest strongly connected components.
Partsย (A) andย (B) of Figureย 5.47.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property, we show the largest and smallest strongly connected components of the final graph.
Figure 5.47.1. Initial and final graph of the constraint
(a) (b)