5.348. size_max_starting_seq_alldifferent

DESCRIPTIONLINKSGRAPH
Origin

Inspired by πšœπš’πš£πšŽ_πš–πšŠπš‘_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš.

Constraint

πšœπš’πš£πšŽ_πš–πšŠπš‘_πšœπšπšŠπš›πšπš’πš—πš_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(πš‚π™Έπš‰π™΄,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonyms

πšœπš’πš£πšŽ_πš–πšŠπš‘πš’πš–πšŠπš•_πšœπšπšŠπš›πšπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ_πšŠπš•πš•πšπš’πšπš, πšœπš’πš£πšŽ_πš–πšŠπš‘πš’πš–πšŠπš•_πšœπšπšŠπš›πšπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ_πšŠπš•πš•πšπš’πšœπšπš’πš—πšŒπš, πšœπš’πš£πšŽ_πš–πšŠπš‘πš’πš–πšŠπš•_πšœπšπšŠπš›πšπš’πš—πš_πšœπšŽπššπšžπšŽπš—πšŒπšŽ_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš.

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

πš‚π™Έπš‰π™΄ is the size of the maximal sequence (among all sequences of consecutive variables of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ starting at position one) for which the πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš constraint holds.

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

The first πšœπš’πš£πšŽ_πš–πšŠπš‘_πšœπšπšŠπš›πšπš’πš—πš_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš constraint holds since the constraint πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(βŒ©πšŸπšŠπš›-9,πšŸπšŠπš›-2,πšŸπšŠπš›-4,πšŸπšŠπš›-5βŒͺ) holds and since πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(βŒ©πšŸπšŠπš›-9,πšŸπšŠπš›-2,πšŸπšŠπš›-4,πšŸπšŠπš›-5,πšŸπšŠπš›-2βŒͺ) does not hold.

Typical
πš‚π™Έπš‰π™΄>2
πš‚π™Έπš‰π™΄<|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
Symmetry

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

Arg. properties

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

Remark

A conditional constraintΒ [MittalFalkenhainer90] with the specific structure that one can relax the constraints on the last variables of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions9646257776117649209715243046721

Number of solutions for πšœπš’πš£πšŽ_πš–πšŠπš‘_πšœπšπšŠπš›πšπš’πš—πš_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš: domains 0..n

ctrs/size_max_starting_seq_alldifferent-1-tikz

ctrs/size_max_starting_seq_alldifferent-2-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

13161251296168072621444782969
26242002160288124587528503056
3-241802160308705160969920232
4--1201440235204300808817984
5---720126002688006123600
6----50401209603265920
7-----403201270080
8------362880

Solution count for πšœπš’πš£πšŽ_πš–πšŠπš‘_πšœπšπšŠπš›πšπš’πš—πš_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš: domains 0..n

ctrs/size_max_starting_seq_alldifferent-3-tikz

ctrs/size_max_starting_seq_alldifferent-4-tikz

See also

common keyword: πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš, πš˜πš™πšŽπš—_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš, πšœπš’πš£πšŽ_πš–πšŠπš‘_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πšΒ (all different,disequality).

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

Keywords

characteristic of a constraint: all different, disequality, hypergraph.

combinatorial object: sequence.

constraint arguments: pure functional dependency.

constraint type: sliding sequence constraint, open constraint, conditional constraint.

modelling: functional dependency.

Arc input(s)

πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚

Arc generator
𝑃𝐴𝑇𝐻_1β†¦πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—

Arc arity
*
Arc constraint(s)
πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—)
Graph property(ies)
𝐍𝐀𝐑𝐂=πš‚π™Έπš‰π™΄

Graph model

Note that this is an example where the arc constraints do not have the same arity. However they correspond to the same constraint.

PartsΒ (A) andΒ (B) of FigureΒ 5.348.1 respectively show the initial and final graph associated with the first example of the Example slot.

Figure 5.348.1. (A)Β Initial and (B)Β final graph of the πšœπš’πš£πšŽ_πš–πšŠπš‘_πšœπšπšŠπš›πšπš’πš—πš_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(4,〈9,2,4,5,2,7,4βŒͺ) constraint of the first example of the Example slot where each ellipse represents an hyperedge corresponding to an πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš constraint (e.g., the fourth ellipse represents the constraint πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πšβŒ©9,2,4,5βŒͺ)
ctrs/size_max_starting_seq_alldifferent-5-tikz