5.236. longest_decreasing_sequence

DESCRIPTIONLINKSAUTOMATON
Origin

constraint on sequences

Constraint

πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ(𝙻,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonym

πšœπš’πš£πšŽ_πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ.

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

𝙻 is the largest difference between the first and the last value of the maximum decreasing sequences of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

A sequence of consecutive variables X i ,X i+1 ,β‹―,X j (1≀i≀j≀|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|) of the collection of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ is a maximum decreasing sequence if all the following conditions simultaneously apply:

  • X i β‰₯X i+1 β‰₯β‹―β‰₯X j ,

  • i=1 or X i-1 <X i ,

  • i=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚| or X j <X j+1 .

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

FigureΒ 5.236.1 gives a graphical representation of the third example of the Example slot with its two maximum decreasing sequences in red of respective size 6 and 2. The corresponding πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint holds since its first argument 𝙻 is fixed to the maximum size 6.

Figure 5.236.1. Illustration of the third example of the Example slot: a sequence of eight variables V 1 , V 2 , V 3 , V 4 , V 5 , V 6 , V 7 , V 8 respectively fixed to values 10, 8, 8, 6, 4, 9, 10, 8 and its two maximum decreasing sequences in red of respective size 10-4=6 and 10-8=2.
ctrs/longest_decreasing_sequence-1-tikz
Typical
𝙻>0
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>1
πš—πšŸπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>2
Symmetry

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/longest_decreasing_sequence-2-tikz

ctrs/longest_decreasing_sequence-3-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

062070252924343212870
1218122750441225382144314
211616113981136189132685090
3-101621942208162111062074365
4--1102024289303750844603682
5---1410301345067667792840
6----2107252264810197174
7-----36360210379696
8------7156690

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

ctrs/longest_decreasing_sequence-4-tikz

ctrs/longest_decreasing_sequence-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.236.2 depicts the automaton associated with the πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint.

Figure 5.236.2. Automaton of the πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint and its glue matrix (note that the reverse of the πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint is the πš•πš˜πš—πšπšŽπšœπš_πš’πš—πšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint)
ctrs/longest_decreasing_sequence-6-tikz
Figure 5.236.3. Hypergraph of the reformulation corresponding to the automaton of the πš•πš˜πš—πšπšŽπšœπš_πšπšŽπšŒπš›πšŽπšŠπšœπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ constraint
ctrs/longest_decreasing_sequence-7-tikz