5.254. min_increasing_slope

DESCRIPTIONLINKSAUTOMATON
Origin

Motivated by time series.

Constraint

πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ(𝙼𝙸𝙽,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Arguments
π™Όπ™Έπ™½πšπšŸπšŠπš›
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
𝙼𝙸𝙽β‰₯0
𝙼𝙸𝙽<πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>0
Purpose

Given a sequence of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚=V 1 ,V 2 ,β‹―,V n , sets 𝙼𝙸𝙽 to 0 if βˆ„i∈[1,n-1]|V i <V i+1 , otherwise sets 𝙼𝙸𝙽 to min i∈[1,n-1]|V i <V i+1 V i+1 -V i .

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

The first πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ constraint holds since the sequence 1 1 5 8 6 2 2 1 5 contains two increasing subsequences 1 5 8 and 1 5 and the minimum slope is equal to min(5-1,8-5,5-1)=3 as shown on FigureΒ 5.254.1.

Figure 5.254.1. Illustration of the first example of the Example slot: a sequence of nine variables V 1 , V 2 , V 3 , V 4 , V 5 , V 6 , V 7 , V 8 , V 9 respectively fixed to values 1, 1, 5, 8, 6, 2, 2, 1, 5 and the corresponding minimum slope on the strictly increasing subsequences 1 5 8 and 1 5 (𝙼𝙸𝙽=3)
ctrs/min_increasing_slope-1-tikz
Typical
𝙼𝙸𝙽>1
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>2
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>2
Symmetry

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

Arg. properties

Functional dependency: 𝙼𝙸𝙽 determined by πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Usage

Getting the minimum slope over the increasing sequences of time series.

Counting
Length (n)2345678
Solutions9646257776117649209715243046721

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

ctrs/min_increasing_slope-2-tikz

ctrs/min_increasing_slope-3-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

062070252924343212870
1222256351256537105193622280084
211414518642872851537210601773
3-8981062147292550765106480
4--5670488531336722475484
5---3825266781981369232
6----261241330730161
7-----18136341618
8------129019

Solution count for πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ: domains 0..n

ctrs/min_increasing_slope-4-tikz

ctrs/min_increasing_slope-5-tikz

Keywords

characteristic of a constraint: automaton, automaton with counters.

combinatorial object: sequence.

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

filtering: glue matrix.

modelling: functional dependency.

Cond. implications

πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ(𝙼𝙸𝙽,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Β Β Β  withΒ  πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)=𝙼𝙸𝙽+1

Β Β implies πš–πšŠπš‘_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ(π™Όπ™°πš‡,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Β Β Β  whenΒ  πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)=π™Όπ™°πš‡+1.

Automaton

FigureΒ 5.254.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).

Figure 5.254.2. Automaton for the πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ constraint and its glue matrix (note that the reverse of πš–πš’πš—_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ is πš–πš’πš—_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπš•πš˜πš™πšŽ)
ctrs/min_increasing_slope-6-tikz