5.283. same_modulo

DESCRIPTIONLINKSGRAPH
Origin

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

Constraint

πšœπšŠπš–πšŽ_πš–πš˜πšπšžπš•πš˜(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2,𝙼)

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

For each integer R in [0,𝙼-1], let 𝑁1 R (respectively 𝑁2 R ) denote the number of variables of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚1 (respectively πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚2) that have R as a rest when divided by 𝙼. For all R in [0,𝙼-1] we have that 𝑁1 R =𝑁2 R .

Example
πšŸπšŠπš›-1,πšŸπšŠπš›-9,πšŸπšŠπš›-1,πšŸπšŠπš›-5,πšŸπšŠπš›-2,πšŸπšŠπš›-1,πšŸπšŠπš›-6,πšŸπšŠπš›-4,πšŸπšŠπš›-1,πšŸπšŠπš›-1,πšŸπšŠπš›-5,πšŸπšŠπš›-5,3

The values of the first collection 〈1,9,1,5,2,1βŒͺ are respectively associated with the equivalence classes 1 mod 3=1, 9 mod 3=0, 1 mod 3=1, 5 mod 3=2, 2 mod 3=2, 1 mod 3=1. Therefore the equivalence classes 0, 1, and 2 are respectively used 1, 3, and 2 times. Similarly, the values of the second collection 〈6,4,1,1,5,5βŒͺ are respectively associated with the equivalence classes 6 mod 3=0, 4 mod 3=1, 1 mod 3=1, 1 mod 3=1, 5 mod 3=2, 5 mod 3=2. Therefore the equivalence classes 0, 1, and 2 are respectively used 1, 3, and 2 times. Consequently the πšœπšŠπš–πšŽ_πš–πš˜πšπšžπš•πš˜ constraint holds. FigureΒ 5.283.1 illustrates this correspondence.

Figure 5.283.1. Correspondence between the equivalence classes associated with collection 〈1,9,1,5,2,1βŒͺ and with collection 〈6,4,1,1,5,5βŒͺ
ctrs/same_modulo1
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 u of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš› can be replaced by any other value v such that v is congruent to u modulo 𝙼.

Used in

πš”_πšœπšŠπš–πšŽ_πš–πš˜πšπšžπš•πš˜.

See also

implies: 𝚞𝚜𝚎𝚍_πš‹πš’_πš–πš˜πšπšžπš•πš˜.

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

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

system of constraints: πš”_πšœπšŠπš–πšŽ_πš–πš˜πšπšžπš•πš˜.

Keywords

characteristic of a constraint: modulo.

combinatorial object: permutation.

constraint arguments: constraint between two collections of variables.

Arc input(s)

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

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

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

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.283.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.283.2. Initial and final graph of the πšœπšŠπš–πšŽ_πš–πš˜πšπšžπš•πš˜ constraint
ctrs/same_moduloA
(a)
ctrs/same_moduloB
(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 ππ’πˆππŠ Β―.