## 5.55. circular_change

Origin
Constraint

$\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄},\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi ²\pi \pi }\right)$

Arguments
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ $\mathrm{\pi \pi \pi \pi }$ $\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)$ $\mathrm{\pi ²\pi \pi }$ $\mathrm{\pi \pi \pi \pi }$
Restrictions
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}\beta ₯0$ $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}\beta €|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|$ $\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)$
Purpose

$\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ is the number of times that $\mathrm{\pi ²\pi \pi }$ holds on consecutive variables of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$. The last and the first variables of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ are also considered to be consecutive.

Example

In the example the changes within the $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }=\beta ©4,4,3,4,1\beta ͺ$ collection are located between values 4 and 3, 3 and 4, 4 and 1, and 1 and 4 (i.e.,Β since the third argument $\mathrm{\pi ²\pi \pi }$ of the $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint is set to , we count one change for each disequality constraint between two consecutive variables that holds). Consequently, the corresponding $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint holds since its first argument $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ is fixed to 4.

Typical
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}>0$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }\right)>1$
Symmetries
• Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ can be shifted.

• One and the same constant can be added to the $\mathrm{\pi \pi \pi }$ attribute of all items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

Keywords
Arc input(s)

$\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$

Arc generator
$\mathrm{\pi Ά\pi Ό\pi  \pi Ά\pi \pi Ό\pi }$$\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{1},\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi \pi \pi }\mathrm{\pi ²\pi \pi }\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi \pi \pi }$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$=\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$

Graph model

Since we are also interested in the constraint that links the last and the first variable we use the arc generator $\mathrm{\pi Ά\pi Ό\pi  \pi Ά\pi \pi Ό\pi }$ to produce the arcs of the initial graph.

PartsΒ (A) andΒ (B) of FigureΒ 5.55.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property, the arcs of the final graph are stressed in bold.

Automaton

FigureΒ 5.55.2 depicts the automaton associated with the $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi }$ constraint. To each pair of consecutive variables $\left({\mathrm{\pi  \pi °\pi }}_{i},{\mathrm{\pi  \pi °\pi }}_{\left(i\mathrm{mod}|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|\right)+1}\right)$ of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ corresponds a 0-1 signature variable ${\mathrm{\pi }}_{i}$. The following signature constraint links ${\mathrm{\pi  \pi °\pi }}_{i}$, ${\mathrm{\pi  \pi °\pi }}_{\left(i\mathrm{mod}|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|\right)+1}$ and ${\mathrm{\pi }}_{i}$: ${\mathrm{\pi  \pi °\pi }}_{i}\mathrm{\pi ²\pi \pi }{\mathrm{\pi  \pi °\pi }}_{\left(i\mathrm{mod}|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|\right)+1}\beta {\mathrm{\pi }}_{i}$.