5.257. min_nvalue
DESCRIPTION | LINKS | GRAPH | AUTOMATON |
- Origin
N.Β Beldiceanu
- Constraint
- Arguments
- Restrictions
- Purpose
is the minimum number of times that the same value is taken by the variables of the collection .
- Example
-
In the first example, values are respectively used times. So the minimum number of time that a same value occurs is 2. Consequently the corresponding constraint holds.
- 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
Functional dependency: determined by .
- Usage
This constraint may be used in order to replace a set of or constraints were one would have to generate explicitly one constraint for each potential value. Also useful for constraining the number of occurrences of the less used value without knowing this value in advance and without giving explicitly a lower limit on the number of occurrences of each value as it is done in the constraint.
- Reformulation
Assume that is not empty. Let and respectively denote the smallest and largest possible values that can be assigned to the variables of the collection. Let the variables respectively correspond to the number of occurrences of values within the variables of the collection. The constraint can be expressed as the conjunction of the following two constraints:
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ,
We use a constraint (with its parameter set to 1) instead of a constraint in order to discard the smallest value 0.
- Counting
-
Length () 2 3 4 5 6 7 8 Solutions 9 64 625 7776 117649 2097152 43046721 Number of solutions for : domains
Length () 2 3 4 5 6 7 8 Total 9 64 625 7776 117649 2097152 43046721 Parameter value 1 6 60 560 7470 113442 2058728 42473664 2 3 - 60 300 3780 36456 566496 3 - 4 - - 420 1960 4032 4 - - 5 - - - 2520 5 - - - 6 - - - 6 - - - - 7 - - 7 - - - - - 8 - 8 - - - - - - 9 Solution count for : domains
- See also
common keyword: Β (counting constraint), , Β (value constraint,counting constraint), , Β (counting constraint).
- Keywords
-
characteristic of a constraint: minimum, automaton, automaton with array of counters.
constraint arguments: pure functional dependency.
constraint type: value constraint, counting constraint.
final graph structure: equivalence.
modelling: minimum number of occurrences, functional dependency.
- Cond. implications
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.257.1 respectively show the initial and final graph associated with the first example of the Example slot. Since we use the graph property, we show the smallest strongly connected component of the final graph associated with the first example of the Example slot.
Figure 5.257.1. Initial and final graph of the constraint
(a) (b)
- Automaton
FigureΒ 5.257.2 depicts the automaton associated with the constraint. To each item of the collection corresponds a signature variable that is equal to 0.
Figure 5.257.2. Automaton of the constraint