5.288. nvalues
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
Let be the number of distinct values assigned to the variables of the collection. Enforce condition to hold.
- Example
-
The constraint holds since the number of distinct values occurring within the collection is equal (i.e.,Β is set to ) to its third argument .
- Typical
- Symmetries
Items of are permutable.
All occurrences of two distinct values of can be swapped; all occurrences of a value of can be renamed to any unused value.
- Arg. properties
Contractible wrt. when .
Contractible wrt. when , and .
Contractible wrt. when and .
Extensible wrt. when .
- Usage
Used in the Constraint(s) on sets slot for defining some constraints like , or .
- Reformulation
The constraint can be expressed in term of the conjunction .
- Systems
- Used in
- See also
-
common keyword: Β (counting constraint,number of distinct values).
specialisation: Β (replace a comparison with the number of distinct values by an equality with the number of distinct values).
- Keywords
constraint type: counting constraint, value partitioning constraint.
final graph structure: strongly connected component, equivalence.
modelling: number of distinct equivalence classes, number of distinct values.
- Cond. implications
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph class
-
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.288.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property we show the different strongly connected components of the final graph. Each strongly connected component corresponds to a value that is assigned to some variables of the collection. The 3 following values 1, 4 and 5 are used by the variables of the collection.
Figure 5.288.1. Initial and final graph of the constraint
(a) (b)