5.249. maximum
DESCRIPTION | LINKS | GRAPH | AUTOMATON |
- Origin
CHIP
- Constraint
- Synonym
.
- Arguments
- Restrictions
- Purpose
is the maximum value of the collection of domain variables .
- Example
-
The first constraint holds since its first argument is fixed to the maximum value of the collection .
- Typical
- Symmetries
Items of are permutable.
All occurrences of two distinct values of can be swapped.
One and the same constant can be added to as well as to the attribute of all items of .
- Arg. properties
Functional dependency: determined by .
Aggregate: , .
- Usage
In some project scheduling problems one has to introduce dummy activities that correspond for instance to the completion time of a given set of activities. In this context one can use the constraint to get the maximum completion time of a set of tasks.
- Remark
Note that is a constraint and not just a function that computes the maximum value of a collection of variables: potential values of influence the variables of , and reciprocally potential values that can be assigned to variables of influence .
The constraint is called in JaCoP (http://www.jacop.eu/).
- Algorithm
A filtering algorithm for the constraint is described inΒ [Beldiceanu01].
The constraint is entailed if all the following conditions hold:
is fixed.
At least one variable of is assigned value .
All variables of have their maximum value less than or equal to value .
- 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 0 1 1 1 1 1 1 1 1 3 7 15 31 63 127 255 2 5 19 65 211 665 2059 6305 3 - 37 175 781 3367 14197 58975 4 - - 369 2101 11529 61741 325089 5 - - - 4651 31031 201811 1288991 6 - - - - 70993 543607 4085185 7 - - - - - 1273609 11012415 8 - - - - - - 26269505 Solution count for : domains
- Systems
max in Choco, max in Gecode, max in JaCoP, maximum in MiniZinc, maximum in SICStus.
- See also
common keyword: Β (order constraint).
generalisation: Β ( replaced by ).
implies: , .
soft variant: Β (open constraint).
specialisation: Β (maximum or order replaced by absolute maximum).
- Keywords
characteristic of a constraint: maximum, automaton, automaton without counters, reified automaton constraint.
constraint arguments: reverse of a constraint, pure functional dependency.
constraint network structure: centered cyclic(1) constraint network(1).
constraint type: order constraint.
- Cond. implications
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
We use a similar definition that the one that was utilised for the constraint. Within the arc constraint, we replace the comparison operator by .
PartsΒ (A) andΒ (B) of FigureΒ 5.249.1 respectively show the initial and final graph associated with the first example of the Example slot. Since we use the graph property, the vertex of rank 0 (without considering the loops) of the final graph is outlined with a thick circle.
Figure 5.249.1. Initial and final graph of the constraint
(a) (b)
- Automaton
FigureΒ 5.249.2 depicts the automaton associated with the constraint. Let be the variable of the collection. To each pair corresponds a signature variable as well as the following signature constraint: .
Figure 5.249.2. Counter free automaton of the constraint
Figure 5.249.3. Hypergraph of the reformulation corresponding to the automaton of the constraint
FigureΒ 5.249.3 depicts a second counter free non deterministic automaton associated with the constraint, where the argument is also part of the sequence passed to the automaton.
Figure 5.249.4. Counter free non deterministic automaton of the constraint assuming that the union of the domain of the variables is the set and that the elements of are first passed to the automaton followed by (state means that no value strictly greater than value was found and that value was already encountered at least once)
Figure 5.249.5. Hypergraph of the reformulation corresponding to the counter free non deterministic automaton of the constraint
FigureΒ 5.249.6 depicts a third deterministic automaton with one counter associated with the constraint, where the argument is unified to the final value of the counter.
Figure 5.249.6. Automaton (with one counter) of the constraint and its glue constraint
Figure 5.249.7. Hypergraph of the reformulation corresponding to the automaton (with one counter) of the constraint: since all states variables are fixed to the unique state of the automaton, the transitions constraints share only the counter variable and the constraint network is Berge-acyclic