5.356. soft_all_equal_max_var
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
Let be the number of occurrences of the most often assigned value to the variables of the collection. is less than or equal to the total number of variables of the collection minus (i.e.,Β is less than or equal to the minimum number of variables that need to be reassigned in order to obtain a solution where all variables are assigned a same value).
- Example
-
Within the collection , 3 is the number of occurrences of the most assigned value. Consequently, the constraint holds since the argument is less than or equal to the total number of variables 4 minus 3.
- Typical
- Symmetries
can be decreased to any value .
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.
- Algorithm
- Counting
-
Length () 2 3 4 5 6 7 8 Solutions 15 148 1905 30006 555121 11758048 280310337 Number of solutions for : domains
Length () 2 3 4 5 6 7 8 Total 15 148 1905 30006 555121 11758048 280310337 Parameter value 0 9 64 625 7776 117649 2097152 43046721 1 6 60 620 7770 117642 2097144 43046712 2 - 24 540 7620 117390 2096752 43046136 3 - - 120 6120 113610 2088520 43030008 4 - - - 720 83790 1992480 42771960 5 - - - - 5040 1345680 40194000 6 - - - - - 40320 24811920 7 - - - - - - 362880 Solution count for : domains
- See also
common keyword: , , , Β (soft constraint).
related: .
- Keywords
constraint type: soft constraint, value constraint, relaxation, variable-based violation measure.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
We generate an initial graph with binary equalities constraints between each vertex and its successors. The graph property states that is less than or equal to the difference between the total number of vertices of the initial graph and the number of vertices of the largest strongly connected component of the final graph.
PartsΒ (A) andΒ (B) of FigureΒ 5.356.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property we show one of the largest strongly connected components of the final graph.
Figure 5.356.1. Initial and final graph of the constraint
(a) (b)