5.292. nvisible_from_end

DESCRIPTIONLINKSAUTOMATON
Origin

Derived from πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšœπšπšŠπš›πš

Constraint

πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš(𝙽,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonyms

πš—πšŸπš’πšœπš’πš‹πš•πšŽ, πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πš›πš’πšπš‘πš.

Arguments
π™½πšπšŸπšŠπš›
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
𝙽β‰₯πš–πš’πš—(1,|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|)
𝙽≀|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|
Purpose

The i π‘‘β„Ž (1≀i≀|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|) variable of the sequence πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ is visible if and only if all variables after the i π‘‘β„Ž variable are strictly smaller than the i π‘‘β„Ž variable itself. 𝙽 is the total number of visible variables of the sequence of variables πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

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

The first πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš constraint holds since the sequence 1 6 2 1 4 8 2 contains two visible items that respectively correspond to the seventh and sixth items.

Typical
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>2
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>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/nvisible_from_end-1-tikz

ctrs/nvisible_from_end-2-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

16302252275290084469648080425
233030536755279488905617238570
3-49016102940058354812780180
4--521060201587604238367
5---642018060661500
6----775646410
7-----81260
8------9

Solution count for πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš: domains 0..n

ctrs/nvisible_from_end-3-tikz

ctrs/nvisible_from_end-4-tikz

See also

implies: πšŠπšπš•πšŽπšŠπšœπš_πš—πšŸπšŠπš•πšžπšŽ.

related: πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšœπšπšŠπš›πšΒ (count from the start of the sequence rather than from the end).

Keywords

combinatorial object: sequence.

constraint arguments: pure functional dependency.

modelling: functional dependency.

Automaton

FigureΒ 5.292.1 depicts the automaton associated with the πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš constraint.

Figure 5.292.1. Automaton of the πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš constraint with two counters M and C, where M records the largest value encountered so far, and C the number of visible values from the right hand side of the sequence πš…π™°πš 1 , πš…π™°πš 2 , ..., πš…π™°πš n (i.e., the sequence πš…π™°πš n , πš…π™°πš n-1 , ..., πš…π™°πš 1 is passed to the automaton)
ctrs/nvisible_from_end-5-tikz
Figure 5.292.2. Hypergraph of the reformulation corresponding to the automaton (with two counters) of the πš—πšŸπš’πšœπš’πš‹πš•πšŽ_πšπš›πš˜πš–_πšŽπš—πš constraint (since all states of the automaton are accepting there is no restriction on the last variable Q n )
ctrs/nvisible_from_end-6-tikz