5.52. big_valley

DESCRIPTIONLINKSAUTOMATON
Origin

Derived from πšŸπšŠπš•πš•πšŽπš’.

Constraint

πš‹πš’πš_πšŸπšŠπš•πš•πšŽπš’(𝙽,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄)

Arguments
π™½πšπšŸπšŠπš›
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄πš’πš—πš
Restrictions
𝙽β‰₯0
2*π™½β‰€πš–πšŠπš‘(|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|-1,0)
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄β‰₯0
Purpose

A variable V v (1<k<m) is a valley if and only if there exists an i (1<i≀v) such that V i-1 >V i and V i =V i+1 =β‹―=V v and V v <V v+1 . Similarly a variable V p (1<p<m) of the sequence of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚=V 1 ,β‹―,V m is a peak if and only if there exists an i (1<i≀p) such that V i-1 <V i and V i =V i+1 =β‹―=V p and V p >V p+1 . A valley variable V v (1<v<m) is a potential big valley wrt a non-negative integer πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄ if and only if:

  1. V v is a valley,

  2. βˆƒi,j∈[1,m] | i<v<j, V i is a peak (or i=1 if there is no peak before position p), V j is a peak (or i=m if there is no peak after position p), V i -V v >πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄, and V j -V v >πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄.

Let i v and j v be the largest i and the smallest j satisfying conditionΒ 2. Now a potential big valley V v (1<v<m) is a big valley if and only if the interval [i,j] does not contain any potential big valley that is strictly less than V v . The constraint πš‹πš’πš_πšŸπšŠπš•πš•πšŽπš’ holds if and only if 𝙽 is the total number of big valleys of the sequence of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Example
(7,9,11,11,9,10,5,7,6,6,4,8,7,10,1,1,7,7,5,9,8,12,0)
(4,9,11,11,9,10,5,7,6,6,4,8,7,10,1,1,7,7,5,9,8,12,1)

As shown part PartΒ (A) of FigureΒ 5.52.1, the first πš‹πš’πš_πšŸπšŠπš•πš•πšŽπš’ constraint holds since the sequence 9 11 11 9 10 5 7 6 6 4 8 7 10 1 1 7 7 5 9 8 12 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 9 11 11 9 10 5 7 6 6 4 8 7 10 1 1 7 7 5 9 8 12 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 V 1 , V 2 , ..., V 21 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 (πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄=0 corresponds to standard valleys) with their respective depths d 1 0 =1, d 2 0 =2, d 3 0 =3, d 4 0 =1, d 5 0 =6, d 6 0 =2, d 7 0 =1 (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 πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄=1 with their respective depths d 1 1 =2, d 2 1 =3, d 3 1 =6, d 4 1 =2
ctrs/big_valley-1-tikz
Typical
𝙽β‰₯1
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>6
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄>1
Symmetries
  • Items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ can be reversed.

  • One and the same constant can be added to the πšŸπšŠπš› attribute of all items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Arg. properties
  • Functional dependency: 𝙽 determined by πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ and πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄.

  • Contractible wrt. πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ when 𝙽=0 and πšƒπ™Ύπ™»π™΄πšπ™°π™½π™²π™΄=0.

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.

constraint arguments: pure functional dependency.

modelling: functional dependency.

Automaton

FigureΒ 5.52.2 depicts the automaton associated with the πš‹πš’πš_πšŸπšŠπš•πš•πšŽπš’ constraint. To each pair of consecutive variables (πš…π™°πš i ,πš…π™°πš i+1 ) of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ corresponds a signature variable S i . The following signature constraint links πš…π™°πš i , πš…π™°πš i+1 and S i : (πš…π™°πš i <πš…π™°πš i+1 ⇔S i =0) ∧ (πš…π™°πš i =πš…π™°πš i+1 ⇔S i =1) ∧ (πš…π™°πš i >πš…π™°πš i+1 ⇔S i =2).

Figure 5.52.2. Automaton for the πš‹πš’πš_πšŸπšŠπš•πš•πšŽπš’ where C, S, V, π‘šπ‘Žπ‘₯ 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
ctrs/big_valley-2-tikz