## 5.209. k_same_modulo

Origin
Constraint

$𝚔_\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}\left(\mathrm{𝚂𝙴𝚃𝚂},𝙼\right)$

Type
 $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$
Arguments
 $\mathrm{𝚂𝙴𝚃𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚜𝚎𝚝}-\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\right)$ $𝙼$ $\mathrm{𝚒𝚗𝚝}$
Restrictions
 $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂},\mathrm{𝚟𝚊𝚛}\right)$ $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|\ge 1$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚂𝙴𝚃𝚂},\mathrm{𝚜𝚎𝚝}\right)$ $|\mathrm{𝚂𝙴𝚃𝚂}|>1$ $\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚜𝚒𝚣𝚎}$$\left(\mathrm{𝚂𝙴𝚃𝚂},\mathrm{𝚜𝚎𝚝}\right)$ $𝙼>0$
Purpose

Given a collection of $|\mathrm{𝚂𝙴𝚃𝚂}|$ sets, each containing the same number of domain variables, the $𝚔_\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$ constraint forces a $\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$ constraint between each pair of consecutive sets.

Example
$\left(\begin{array}{c}〈\begin{array}{c}\mathrm{𝚜𝚎𝚝}-〈1,9,1,5,2,1〉,\hfill \\ \mathrm{𝚜𝚎𝚝}-〈6,4,1,1,5,5〉,\hfill \\ \mathrm{𝚜𝚎𝚝}-〈1,3,4,2,8,7〉\hfill \end{array}〉,3\hfill \end{array}\right)$

The $𝚔_\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$ constraint holds since:

• The first and second collections of variables are assigned 1 value in $\left\{0,3,\cdots ,3·k\right\}$, 3 values in $\left\{1,4,\cdots ,1+3·k\right\}$ and 2 values in $\left\{2,5,\cdots ,2+3·k\right\}$.

• The second and third collections of variables are also assigned 1 value in $\left\{0,3,\cdots ,3·k\right\}$, 3 values in $\left\{1,4,\cdots ,1+3·k\right\}$ and 2 values in $\left\{2,5,\cdots ,2+3·k\right\}$.

Typical
 $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|>1$ $𝙼>1$
Symmetries
• Items of $\mathrm{𝚂𝙴𝚃𝚂}$ are permutable.

• Items of $\mathrm{𝚂𝙴𝚃𝚂}.\mathrm{𝚜𝚎𝚝}$ are permutable.

• An occurrence of a value $u$ of $\mathrm{𝚂𝙴𝚃𝚂}.\mathrm{𝚜𝚎𝚝}.\mathrm{𝚟𝚊𝚛}$ can be replaced by any other value $v$ such that $v$ is congruent to $u$ modulo $𝙼$.

Arg. properties

Contractible wrt. $\mathrm{𝚂𝙴𝚃𝚂}$.

Keywords
Arc input(s)

$\mathrm{𝚂𝙴𝚃𝚂}$

Arc generator
$\mathrm{𝑃𝐴𝑇𝐻}$$↦\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚜𝚎𝚝}\mathtt{1},\mathrm{𝚜𝚎𝚝}\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$$\left(\mathrm{𝚜𝚎𝚝}\mathtt{1}.\mathrm{𝚜𝚎𝚝},\mathrm{𝚜𝚎𝚝}\mathtt{2}.\mathrm{𝚜𝚎𝚝},𝙼\right)$
Graph property(ies)
$\mathrm{𝐍𝐀𝐑𝐂}$$=|\mathrm{𝚂𝙴𝚃𝚂}|-1$

Graph model

Parts (A) and (B) of Figure 5.209.1 respectively show the initial and final graph associated with the Example slot. To each vertex corresponds a collection of variables, while to each arc corresponds a $\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$ constraint.

##### Figure 5.209.1. Initial and final graph of the $𝚔_\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚖𝚘𝚍𝚞𝚕𝚘}$ constraint  (a) (b)