5.267. peak
| DESCRIPTION | LINKS | AUTOMATON |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
-
A variable of the sequence of variables is a peak if and only if there exists an such that and and . is the total number of peaks of the sequence of variables .
- Example
-
The constraint holds since the sequence contains two peaks that respectively correspond to the variables that are assigned to values 8 and 7.
Figure 5.267.1. The sequence and its two peaks

- Symmetries
- Usage
Useful for constraining the number of peaks of a sequence of domain variables.
- Remark
Since the arity of the arc constraint is not fixed, the constraint cannot be currently described. However, this would not hold anymore if we were introducing a slot that specifies how to merge adjacent vertices of the final graph.
- See also
common keyword: , Β (sequence).
related: .
specialisation: Β (the variable counting the number of peaks is set to 0 and removed).
- Keywords
characteristic of a constraint: automaton, automaton with counters.
combinatorial object: sequence.
constraint network structure: sliding cyclic(1) constraint network(2).
- Automaton
FigureΒ 5.267.2 depicts the automaton associated with the constraint. To each pair of consecutive variables of the collection corresponds a signature variable . The following signature constraint links , and : .
Figure 5.267.2. Automaton of the constraint

Figure 5.267.3. Hypergraph of the reformulation corresponding to the automaton of the constraint
