5.189. increasing_peak

DESCRIPTIONLINKSAUTOMATON
Origin

Derived from πš™πšŽπšŠπš” and πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš.

Constraint

πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš”(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Argument
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>0
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
Purpose

A variable V k (1<k<m) of the sequence of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚=V 1 ,β‹―,V m is a peak if and only if there exists an i (1<i≀k) such that V i-1 <V i and V i =V i+1 =β‹―=V k and V k >V k+1 .

When considering all the peaks of the sequence πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ from left to right enforce all peaks to be increasing, i.e.Β the altitude of each peak is greater than or equal to the altitude of its preceding peak when it exists.

Example
(1,5,5,3,5,2,2,7,4)

The πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš” constraint holds since the sequence 1 5 5 3 5 2 2 7 4 contains three peaks, in bold, that are increasing.

Figure 5.189.1. Illustration of the Example slot: a sequence of ten variables V 1 , V 2 , V 3 , V 4 , V 5 , V 6 , V 7 , V 8 , V 9 , V 10 respectively fixed to values 1, 5, 5, 4, 3, 5, 2, 2, 7, 4 and its corresponding three peaks, in red, respectively located at altitudes 5, 5 and 7
ctrs/increasing_peak-1-tikz
Typical
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|β‰₯7
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
πš™πšŽπšŠπš”(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)β‰₯3
Symmetry

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

Arg. properties
  • Prefix-contractible wrt. πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

  • Suffix-contractible wrt. πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions9646257553105798166687829090469

Number of solutions for πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš”: domains 0..n

ctrs/increasing_peak-2-tikz

ctrs/increasing_peak-3-tikz

See also

implied by: πšŠπš•πš•_πšŽπššπšžπšŠπš•_πš™πšŽπšŠπš”.

related: πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš”, πš™πšŽπšŠπš”.

Keywords

characteristic of a constraint: automaton, automaton with counters, automaton with same input symbol.

combinatorial object: sequence.

constraint network structure: sliding cyclic(1) constraint network(2).

Cond. implications

πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš”(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Β Β Β  withΒ  πš™πšŽπšŠπš”(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>0

Β Β implies πš—πš˜πš_πšŠπš•πš•_πšŽπššπšžπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚).

Automaton

FigureΒ 5.189.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.189.2. Automaton for the πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš” constraint (note the conditional transition from state w to state v testing that the counter 𝐴𝑙𝑑𝑖𝑑𝑒𝑑𝑒 is less than or equal to πš…π™°πš i for enforcing that all peaks from left to right are in increasing altitude)
ctrs/increasing_peak-4-tikz
Figure 5.189.3. Hypergraph of the reformulation corresponding to the automaton of the πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πš™πšŽπšŠπš” constraint where A i stands for the value of the counter 𝐴𝑙𝑑𝑖𝑑𝑒𝑑𝑒 (since all states of the automaton are accepting there is no restriction on the last variable Q n-1 )
ctrs/increasing_peak-5-tikz