5.51. big_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 . Similarly a variable () is a valley if and only if there exists an such that and and . A peak variable () is a potential big peak wrt a non-negative integer if and only if:
is a peak,
, is a valley (or if there is no valley before position ), is a valley (or if there is no valley after position ), , and .
Let and be the largest and the smallest satisfying conditionΒ 2. Now a potential big peak () is a big peak if and only if the interval does not contain any potential big peak that is strictly higher than . The constraint holds if and only if is the total number of big peaks of the sequence of variables .
- Example
-
As shown part PartΒ (A) of FigureΒ 5.51.1, the first constraint holds since the sequence contains seven big peaks wrt a tolerance of 0 (i.e., we consider standard peaks).
As shown part PartΒ (B) of FigureΒ 5.51.1, the second constraint holds since the same sequence contains only four big peaks wrt a tolerance of 1.
Figure 5.51.1. Illustration of the Example slot: PartΒ (A) a sequence of 21 variables , , ..., respectively fixed to values 4, 2, 2, 4, 3, 8, 6, 7, 7, 9, 5, 6, 3, 12, 12, 6, 6, 8, 4, 5, 1 and its corresponding 7 peaks ( corresponds to standard peaks) with their respective heights , , , , , , (the left and right hand sides of each peak are coloured in light orange and light red) PartΒ (B) the same sequence of variables and its 4 big peaks when with their respective heights , , ,
- Typical
- Symmetries
- Arg. properties
Functional dependency: determined by and .
Contractible wrt. when and .
- Usage
Useful for constraining the number of big peaks of a sequence of domain variables, by ignoring too small valleys that artificially create small peaks wrt .
- See also
specialisation: Β (the tolerance is set to 0 and removed).
- Keywords
characteristic of a constraint: automaton, automaton with counters.
combinatorial object: sequence.
- Automaton
FigureΒ 5.51.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.51.2. Automaton for the constraint where , , , and respectively stand for the number of big peaks already encountered, the altitude at the start of the current potential big peak, the altitude of the current potential big peak, the smallest value that can be assigned to a variable of , the parameter