## 5.282. same_interval

Origin
Constraint

$\mathrm{\pi \pi \pi \pi }_\mathrm{\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},\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}\right)$

Arguments
 $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}$ $\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 \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}$ $\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 \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}$ $\mathrm{\pi \pi \pi }$
Restrictions
 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|=|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$ $\mathrm{\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 }\right)$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2},\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}>0$
Purpose

Let ${N}_{i}$ (respectively ${M}_{i}$) denote the number of variables of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}$ (respectively $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}$) that take a value in the interval $\left[\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}Β·i,\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}Β·i+\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}-1$. For all integer $i$ we have ${N}_{i}={M}_{i}$.

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

In the example, the third argument $\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}=3$ defines the following family of intervals $\left[3Β·k,3Β·k+2\right]$, where $k$ is an integer. Consequently the values of the collection $\beta ©1,7,6,0,1,7\beta ͺ$ are respectively located within intervals $\left[0,2\right]$, $\left[6,8\right]$, $\left[6,8\right]$, $\left[0,2\right]$, $\left[0,2\right]$, $\left[6,8\right]$. Therefore intervals $\left[0,2\right]$ and $\left[6,8\right]$ are respectively used 3 and 3 times. Similarly, the values of the collection $\beta ©8,8,8,0,1,2\beta ͺ$ are respectively located within intervals $\left[6,8\right]$, $\left[6,8\right]$, $\left[6,8\right]$, $\left[0,2\right]$, $\left[0,2\right]$, $\left[0,2\right]$. As before intervals $\left[0,2\right]$ and $\left[6,8\right]$ are respectively used 3 and 3 times. Consequently the $\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ constraint holds. FigureΒ 5.282.1 illustrates this correspondence.

Symmetries
• Arguments are permutable w.r.t. permutation $\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)$.

• Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}$ are permutable.

• Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}$ are permutable.

• An occurrence of a value of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$ that belongs to the $k$-th interval, of size $\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}$, can be replaced by any other value of the same interval.

Algorithm

See algorithm of the $\mathrm{\pi \pi \pi \pi }$ constraint.

Used in

specialisation: $\mathrm{\pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }/\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$).

Keywords
Arc input(s)

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

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 \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}=\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi \pi \pi }/\mathrm{\pi \pi Έ\pi \pi ΄}_\mathrm{\pi Έ\pi ½\pi \pi ΄\pi \pi  \pi °\pi »}$
Graph property(ies)
 $\beta ’\text{for}\text{all}\text{connected}\text{components:}$$\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$=$$\mathrm{\pi \pi \pi \pi \pi }$ $\beta ’$$\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$=|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|$ $\beta ’$$\mathrm{\pi \pi \pi \pi \pi }$$=|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.282.2 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$ and $\mathrm{\pi \pi \pi \pi \pi }$ 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 $\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ 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 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|$.

• The number of sinks of the final graph is equal to $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$.

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 $\mathrm{\pi \pi  \pi \pi ·\pi \pi Ά\pi }$ arc generator on the collections $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}$ and $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}$, we have that the maximum number of sources and sinks of the final graph is respectively equal to $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|$ and $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$. Therefore we can rewrite $\mathrm{\pi \pi \pi \pi \pi \pi \pi }=|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|$ to $\mathrm{\pi \pi \pi \pi \pi \pi \pi }\beta ₯|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}|$ and simplify $\underset{Μ²}{\stackrel{Β―}{\mathrm{\pi \pi \pi \pi \pi \pi \pi }}}$ to $\stackrel{Β―}{\mathrm{\pi \pi \pi \pi \pi \pi \pi }}$. In a similar way, we can rewrite $\mathrm{\pi \pi \pi \pi \pi }=|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$ to $\mathrm{\pi \pi \pi \pi \pi }\beta ₯|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}|$ and simplify $\underset{Μ²}{\stackrel{Β―}{\mathrm{\pi \pi \pi \pi \pi }}}$ to $\stackrel{Β―}{\mathrm{\pi \pi \pi \pi \pi }}$.