5.260. min_width_peak

DESCRIPTIONLINKSAUTOMATON
Origin

derived from πš™πšŽπšŠπš”

Constraint

πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš”(𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™·,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonym

πš–πš’πš—_πš‹πšŠπšœπšŽ_πš™πšŽπšŠπš”.

Arguments
𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™·πšπšŸπšŠπš›
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™·β‰₯0
𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™·β‰€|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|-2
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
Purpose

Given a sequence πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ constraint 𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· to be fixed to the width of the smallest peak, or to 0 if no peak exists.

Example
(5,4,4,2,2,3,5,5,6,3,1,1,2,2,2,2,2,2,1)
(5,4,6,7,9,8,5,4)
(0,4,4,2,0,0,4,5)

The first πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš” constraint holds since the sequence 4 4 2 2 3 5 5 6 3 1 1 2 2 2 2 2 2 1 contains two peaks of respective width 5 and 6 (see FigureΒ 5.260.1) and since its argument 𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· is fixed to the smallest value 5.

Figure 5.260.1. Illustration of the first example of the Example slot: a sequence of eighteen variables V 1 , V 2 , V 3 , V 4 , V 5 , V 6 , V 7 , V 8 , V 9 , V 10 , V 11 , V 12 , V 13 , V 14 , V 15 , V 16 , V 17 , V 18 respectively fixed to values 4, 4, 2, 2, 3, 5, 5, 6, 3, 1, 1, 2, 2, 2, 2, 2, 2, 1 and its two peaks of width 5 and 6.
ctrs/min_width_peak-1-tikz
Typical
𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™·>1
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>2
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 πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions9646257776117649209715243046721

Number of solutions for πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš”: domains 0..n

ctrs/min_width_peak-2-tikz

ctrs/min_width_peak-3-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

095029517921108869498439791
1-14230320556637117439826327058
2--1002100284204249289363060
3---679170242687223413256
4----44801304522345982
5-----29154968946
6------188628

Solution count for πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš”: domains 0..n

ctrs/min_width_peak-4-tikz

ctrs/min_width_peak-5-tikz

See also

common keyword: πš™πšŽπšŠπš”Β (sequence).

Keywords

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

combinatorial object: sequence.

constraint arguments: reverse of a constraint, pure functional dependency.

filtering: glue matrix.

modelling: functional dependency.

Automaton

FigureΒ 5.260.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.260.2. Automaton of the πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš” constraint: the start of the first potential peak is discovered while triggering the transition from s to j, the top of a peak is discovered while triggering the transition from j to k, the end of a peak and the start of the next potential peak are discovered while triggering the transition from k to j; the counters W, C and F respectively stand for min_width, current and first.
ctrs/min_width_peak-6-tikz
Figure 5.260.3. Glue matrix associated with the automaton of the πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš” constraint, where n stands for |πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|
s {>|=} * j <{<|=} * k >{>|=} *

s {>|=} *

Β Β Β Β 0

ctrs/min_width_peak-8-tikz

𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· ←

ctrs/min_width_peak-9-tikz

𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· ←

ctrs/min_width_peak-10-tikz

j <{<|=} *

𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· β†’

ctrs/min_width_peak-11-tikz

minW β†’,n-F β†’-F ←,W ←

ctrs/min_width_peak-12-tikz

min𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· β†’,n-F β†’-F ←,𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· ←

ctrs/min_width_peak-13-tikz

k >{>|=} *

𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· β†’

ctrs/min_width_peak-14-tikz

min𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· β†’,n-F β†’-F ←,𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· ←

ctrs/min_width_peak-15-tikz

min𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· β†’,𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· ←

ctrs/min_width_peak-16-tikz

ctrs/min_width_peak-7-tikz
Figure 5.260.4. Illustrating the use of the state pair (j,j) of the glue matrix for linking 𝙼𝙸𝙽_πš†π™Έπ™³πšƒπ™· with the counters variables obtained after reading the prefix 4,6,7,9 and corresponding suffix 9,8,5,4 of the sequence 4,6,7,9,8,5,4; note that the suffix 9,8,5,4 (in pink) is proceed in reverse order; the left (resp.Β right) table shows the initialisation (for i=0) and the evolution (for i>0) of the state of the automaton and its counters W, C and F upon reading the prefix 4,6,7,9 (resp.Β the reverse suffix 4,5,8,9).
ctrs/min_width_peak-17-tikz
Figure 5.260.5. Hypergraph of the reformulation corresponding to the automaton of the πš–πš’πš—_πš πš’πšπšπš‘_πš™πšŽπšŠπš” constraint
ctrs/min_width_peak-18-tikz