5.150. highest_peak

DESCRIPTIONLINKSAUTOMATON
Origin

Derived from πš™πšŽπšŠπš”.

Constraint

πš‘πš’πšπš‘πšŽπšœπš_πš™πšŽπšŠπš”(π™·π™΄π™Έπ™Άπ™·πšƒ,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Arguments
π™·π™΄π™Έπ™Άπ™·πšƒπšπšŸπšŠπš›
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
π™·π™΄π™Έπ™Άπ™·πšƒβ‰₯0
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›β‰₯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 . π™·π™΄π™Έπ™Άπ™·πšƒ is the maximum value of the peak variables. If no such variable exists π™·π™΄π™Έπ™Άπ™·πšƒ is equal to 0.

Example
8,πšŸπšŠπš›-1,πšŸπšŠπš›-1,πšŸπšŠπš›-4,πšŸπšŠπš›-8,πšŸπšŠπš›-6,πšŸπšŠπš›-2,πšŸπšŠπš›-7,πšŸπšŠπš›-1

The πš‘πš’πšπš‘πšŽπšœπš_πš™πšŽπšŠπš” constraint holds since 8 is the maximum peak of the sequence 1 1 4 8 6 2 7 1.

Figure 5.150.1. The sequence and its highest peak
ctrs/highest_peak1
Typical
π™·π™΄π™Έπ™Άπ™·πšƒ>0
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>2
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
Symmetry

Items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ can be reversed.

See also

common keyword: πšπšŽπšŽπš™πšŽπšœπš_πšŸπšŠπš•πš•πšŽπš’, πš™πšŽπšŠπš”Β (sequence).

Keywords

characteristic of a constraint: automaton, automaton with counters.

combinatorial object: sequence.

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

Automaton

FigureΒ 5.150.2 depicts the automaton associated with the πš‘πš’πšπš‘πšŽπšœπš_πš™πšŽπšŠπš” constraint. To each pair of consecutive variables (πš…π™°πš i ,πš…π™°πš i+1 ) of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ corresponds a signature variable πš‚ i . The following signature constraint links πš…π™°πš i , πš…π™°πš i+1 and πš‚ i :

πš…π™°πš i >πš…π™°πš i+1 β‡”πš‚ i =0 ∧ πš…π™°πš i =πš…π™°πš i+1 β‡”πš‚ i =1 ∧ πš…π™°πš i <πš…π™°πš i+1 β‡”πš‚ i =2.

Figure 5.150.2. Automaton of the πš‘πš’πšπš‘πšŽπšœπš_πš™πšŽπšŠπš” constraint
ctrs/highest_peak2
Figure 5.150.3. Hypergraph of the reformulation corresponding to the automaton of the πš‘πš’πšπš‘πšŽπšœπš_πš™πšŽπšŠπš” constraint
ctrs/highest_peak3