## 5.268. period

 DESCRIPTION LINKS
Origin

N. Beldiceanu

Constraint

$\mathrm{𝚙𝚎𝚛𝚒𝚘𝚍}\left(\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳},\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂},\mathrm{𝙲𝚃𝚁}\right)$

Arguments
 $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}$ $\mathrm{𝚍𝚟𝚊𝚛}$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$ $\mathrm{𝙲𝚃𝚁}$ $\mathrm{𝚊𝚝𝚘𝚖}$
Restrictions
 $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}\ge 1$ $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}\le |\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂},\mathrm{𝚟𝚊𝚛}\right)$ $\mathrm{𝙲𝚃𝚁}\in \left[=,\ne ,<,\ge ,>,\le \right]$
Purpose

Let us note ${V}_{0},{V}_{1},...,{V}_{m-1}$ the variables of the $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ collection. $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}$ is the period of the sequence ${V}_{0}{V}_{1}...{V}_{m-1}$ according to constraint $\mathrm{𝙲𝚃𝚁}$. This means that $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}$ is the smallest natural number such that ${V}_{i}\mathrm{𝙲𝚃𝚁}{V}_{i+\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}}$ holds for all $i\in 0,1,...,m-\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}-1$.

Example
$\left(\begin{array}{c}3,〈\begin{array}{c}\mathrm{𝚟𝚊𝚛}-1,\hfill \\ \mathrm{𝚟𝚊𝚛}-1,\hfill \\ \mathrm{𝚟𝚊𝚛}-4,\hfill \\ \mathrm{𝚟𝚊𝚛}-1,\hfill \\ \mathrm{𝚟𝚊𝚛}-1,\hfill \\ \mathrm{𝚟𝚊𝚛}-4,\hfill \\ \mathrm{𝚟𝚊𝚛}-1,\hfill \\ \mathrm{𝚟𝚊𝚛}-1\hfill \end{array}〉,=\hfill \end{array}\right)$

The $\mathrm{𝚙𝚎𝚛𝚒𝚘𝚍}$ constraint holds since, as depicted by Figure 5.268.1, its first argument $\mathrm{𝙿𝙴𝚁𝙸𝙾𝙳}=3$ is equal (i.e., since $\mathrm{𝙲𝚃𝚁}$ is set to $=$) to the period of the sequence $11411411$.

##### Figure 5.268.1. A sequence that has a period of 3 Symmetries
• Items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ can be reversed.

• Items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ can be shifted.

• All occurrences of two distinct values of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}$ can be swapped; all occurrences of a value of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}$ can be renamed to any unused value.

Algorithm

When $\mathrm{𝙲𝚃𝚁}$ corresponds to the equality constraint, a potentially incomplete filtering algorithm based on 13 deductions rules is described in [BeldiceanuPoder04]. The generalisation of these rules to the case where $\mathrm{𝙲𝚃𝚁}$ is not the equality constraint is discussed.

See also

soft variant: $\mathrm{𝚙𝚎𝚛𝚒𝚘𝚍}_\mathrm{𝚎𝚡𝚌𝚎𝚙𝚝}_\mathtt{0}$ (value 0 can match any other value).

Keywords