## 5.180. k_same_modulo

Origin
Constraint

$\mathrm{\pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi ΄\pi \pi },\mathrm{\pi Ό}\right)$

Type
 $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }-\mathrm{\pi \pi \pi \pi }\right)$
Arguments
 $\mathrm{\pi \pi ΄\pi \pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }-\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$ $\mathrm{\pi Ό}$ $\mathrm{\pi \pi \pi }$
Restrictions
 $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi \pi \pi }\right)$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>0$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi \pi ΄\pi \pi },\mathrm{\pi \pi \pi }\right)$ $|\mathrm{\pi \pi ΄\pi \pi }|>1$ $\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi £\pi }$$\left(\mathrm{\pi \pi ΄\pi \pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi Ό}>0$
Purpose

Given a collection of $|\mathrm{\pi \pi ΄\pi \pi }|$ sets, each containing the same number of domain variables, the $\mathrm{\pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint enforces a $\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint between each pair of consecutive sets.

Example
$\left(\begin{array}{c}β©\begin{array}{c}\mathrm{\pi \pi \pi }-β©\begin{array}{c}\mathrm{\pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-9,\hfill \\ \mathrm{\pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-5,\hfill \\ \mathrm{\pi \pi \pi }-2,\hfill \\ \mathrm{\pi \pi \pi }-1\hfill \end{array}βͺ,\hfill \\ \mathrm{\pi \pi \pi }-β©\begin{array}{c}\mathrm{\pi \pi \pi }-6,\hfill \\ \mathrm{\pi \pi \pi }-4,\hfill \\ \mathrm{\pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-5,\hfill \\ \mathrm{\pi \pi \pi }-5\hfill \end{array}βͺ,\hfill \\ \mathrm{\pi \pi \pi }-β©\begin{array}{c}\mathrm{\pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-3,\hfill \\ \mathrm{\pi \pi \pi }-4,\hfill \\ \mathrm{\pi \pi \pi }-2,\hfill \\ \mathrm{\pi \pi \pi }-8,\hfill \\ \mathrm{\pi \pi \pi }-7\hfill \end{array}βͺ\hfill \end{array}βͺ,3\hfill \end{array}\right)$

The $\mathrm{\pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint holds since:

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

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

Typical
 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$ $\mathrm{\pi Ό}>1$
Symmetries
• Items of $\mathrm{\pi \pi ΄\pi \pi }$ are permutable.

• Items of $\mathrm{\pi \pi ΄\pi \pi }.\mathrm{\pi \pi \pi }$ are permutable.

• An occurrence of a value $u$ of $\mathrm{\pi \pi ΄\pi \pi }.\mathrm{\pi \pi \pi }.\mathrm{\pi \pi \pi }$ can be replaced by any other value $v$ such that $v$ is congruent to $u$ modulo $\mathrm{\pi Ό}$.

Keywords
Arc input(s)

$\mathrm{\pi \pi ΄\pi \pi }$

Arc generator
$\mathrm{\pi \pi ΄\pi \pi »}$$\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }\mathtt{1},\mathrm{\pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi \pi \pi }\mathtt{1}.\mathrm{\pi \pi \pi },\mathrm{\pi \pi \pi }\mathtt{2}.\mathrm{\pi \pi \pi },\mathrm{\pi Ό}\right)$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$=|\mathrm{\pi \pi ΄\pi \pi }|-1$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.180.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{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint.