5.347. size_max_seq_alldifferent

DESCRIPTIONLINKSGRAPH
Origin

N.Β Beldiceanu

Constraint

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

Synonyms

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

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

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

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

The first πšœπš’πš£πšŽ_πš–πšŠπš‘_𝚜𝚎𝚚_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš constraint holds since the constraint πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš(βŒ©πšŸπšŠπš›-4,πšŸπšŠπš›-5,πšŸπšŠπš›-2,πšŸπšŠπš›-7βŒͺ) holds and since the following three constraints do 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 πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions9646257776117649209715243046721

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

ctrs/size_max_seq_alldifferent-1-tikz

ctrs/size_max_seq_alldifferent-2-tikz

Length (n)2345678
Total9646257776117649209715243046721
Parameter
value

13456789
26362001050592234104208224
3-243003480386404284004981032
4--12025204536080136014028336
5---7202268057120013728960
6----50402217607378560
7-----403202358720
8------362880

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

ctrs/size_max_seq_alldifferent-3-tikz

ctrs/size_max_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, conditional constraint.

modelling: functional dependency.

Arc input(s)

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

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

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

Graph model

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