5.338. same_interval

DESCRIPTIONLINKSGRAPH
Origin

Derived from πšœπšŠπš–πšŽ.

Constraint

πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2,πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»)

Arguments
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»πš’πš—πš
Restrictions
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1|=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2|
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1,πšŸπšŠπš›)
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2,πšŸπšŠπš›)
πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»>0
Purpose

Let N i (respectively M i ) denote the number of variables of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1 (respectively πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2) that take a value in the interval [πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»Β·i,πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»Β·i+πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»-1. For all integer i we have N i =M i .

Example
(1,7,6,0,1,7,8,8,8,0,1,2,3)

In the example, the third argument πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»=3 defines the following family of intervals [3Β·k,3Β·k+2], where k is an integer. Consequently the values of the collection 〈1,7,6,0,1,7βŒͺ are respectively located within intervals [0,2], [6,8], [6,8], [0,2], [0,2], [6,8]. Therefore intervals [0,2] and [6,8] are respectively used 3 and 3 times. Similarly, the values of the collection 〈8,8,8,0,1,2βŒͺ are respectively located within intervals [6,8], [6,8], [6,8], [0,2], [0,2], [0,2]. As before intervals [0,2] and [6,8] are respectively used 3 and 3 times. Consequently the πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš• constraint holds. FigureΒ 5.338.1 illustrates this correspondence.

Figure 5.338.1. Illustration of the correspondence between the items of the πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1 and of the πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2 collections of the Example slot
ctrs/same_interval-1-tikz
Typical
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1|>1
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1.πšŸπšŠπš›)>1
πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2.πšŸπšŠπš›)>1
πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»>1
πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»<πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1.πšŸπšŠπš›)
πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»<πš›πšŠπš—πšπšŽ(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2.πšŸπšŠπš›)
Symmetries
  • Arguments are permutable w.r.t. permutation (πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2) (πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»).

  • Items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1 are permutable.

  • Items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2 are permutable.

  • An occurrence of a value of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš› that belongs to the k-th interval, of size πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™», can be replaced by any other value of the same interval.

Arg. properties

Aggregate: πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1(πšžπš—πš’πš˜πš—), πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2(πšžπš—πš’πš˜πš—), πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»(πš’πš).

Algorithm

See algorithm of the πšœπšŠπš–πšŽ constraint.

Used in

πš”_πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš•.

See also

implies: 𝚞𝚜𝚎𝚍_πš‹πš’_πš’πš—πšπšŽπš›πšŸπšŠπš•.

soft variant: 𝚜𝚘𝚏𝚝_πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš•_πšŸπšŠπš›Β (variable-based violation measure).

specialisation: πšœπšŠπš–πšŽΒ (πšŸπšŠπš›πš’πšŠπš‹πš•πšŽ/πšŒπš˜πš—πšœπšπšŠπš—πš replaced by πšŸπšŠπš›πš’πšŠπš‹πš•πšŽ).

system of constraints: πš”_πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš•.

Keywords

characteristic of a constraint: sort based reformulation.

combinatorial object: permutation.

constraint arguments: constraint between two collections of variables.

modelling: interval.

Arc input(s)

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

Arc generator
π‘ƒπ‘…π‘‚π·π‘ˆπΆπ‘‡β†¦πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ1,πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ2)

Arc arity
Arc constraint(s)
πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ1.πšŸπšŠπš›/πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»=πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ2.πšŸπšŠπš›/πš‚π™Έπš‰π™΄_π™Έπ™½πšƒπ™΄πšπš…π™°π™»
Graph property(ies)
β€’ for all connected components: ππ’πŽπ”π‘π‚π„=ππ’πˆππŠ
β€’ ππ’πŽπ”π‘π‚π„=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1|
β€’ ππ’πˆππŠ=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2|

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.338.2 respectively show the initial and final graph associated with the Example slot. Since we use the ππ’πŽπ”π‘π‚π„ and ππ’πˆππŠ graph properties, the source and sink vertices of the final graph are stressed with a double circle. Since there is a constraint on each connected component of the final graph we also show the different connected components. Each of them corresponds to an equivalence class according to the arc constraint. The πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš• constraint holds since:

  • Each connected component of the final graph has the same number of sources and of sinks.

  • The number of sources of the final graph is equal to |πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1|.

  • The number of sinks of the final graph is equal to |πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2|.

Figure 5.338.2. Initial and final graph of the πšœπšŠπš–πšŽ_πš’πš—πšπšŽπš›πšŸπšŠπš• constraint
ctrs/same_intervalA
(a)
ctrs/same_intervalB
(b)
Signature

Since the initial graph contains only sources and sinks, and since isolated vertices are eliminated from the final graph, we make the following observations:

  • Sources of the initial graph cannot become sinks of the final graph,

  • Sinks of the initial graph cannot become sources of the final graph.

From the previous observations and since we use the π‘ƒπ‘…π‘‚π·π‘ˆπΆπ‘‡ arc generator on the collections πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1 and πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2, we have that the maximum number of sources and sinks of the final graph is respectively equal to |πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1| and |πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2|. Therefore we can rewrite ππ’πŽπ”π‘π‚π„=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1| to ππ’πŽπ”π‘π‚π„β‰₯|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1| and simplify ππ’πŽπ”π‘π‚π„ Β― Μ² to ππ’πŽπ”π‘π‚π„ Β―. In a similar way, we can rewrite ππ’πˆππŠ=|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2| to ππ’πˆππŠβ‰₯|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2| and simplify ππ’πˆππŠ Β― Μ² to ππ’πˆππŠ Β―.