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