## 5.284. npair

Origin
Constraint

$\mathrm{\pi \pi \pi \pi \pi }\left(\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi },\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }\right)$

Arguments
 $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi ‘}-\mathrm{\pi \pi \pi \pi },\mathrm{\pi ’}-\mathrm{\pi \pi \pi \pi }\right)$
Restrictions
 $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }\beta ₯\mathrm{\pi \pi \pi }\left(1,|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|\right)$ $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }\beta €|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi },\left[\mathrm{\pi ‘},\mathrm{\pi ’}\right]\right)$
Purpose

$\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$ is the number of distinct pairs of values assigned to the pairs of variables of the collection $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

Example
$\left(\begin{array}{c}2,β©\begin{array}{cc}\mathrm{\pi ‘}-3\hfill & \mathrm{\pi ’}-1,\hfill \\ \mathrm{\pi ‘}-1\hfill & \mathrm{\pi ’}-5,\hfill \\ \mathrm{\pi ‘}-3\hfill & \mathrm{\pi ’}-1,\hfill \\ \mathrm{\pi ‘}-3\hfill & \mathrm{\pi ’}-1,\hfill \\ \mathrm{\pi ‘}-1\hfill & \mathrm{\pi ’}-5\hfill \end{array}βͺ\hfill \end{array}\right)$

The $\mathrm{\pi \pi \pi \pi \pi }$ constraint holds since its first argument $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }=2$ is set to the number of distinct pairs $\beta ©\mathrm{\pi ‘}-3\mathrm{\pi ’}-1\beta ͺ$ and $\beta ©\mathrm{\pi ‘}-1\mathrm{\pi ’}-5\beta ͺ$ of its second argument $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

Typical
 $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }>1$ $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }<|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|$ $|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }.\mathrm{\pi ‘}\right)>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }.\mathrm{\pi ’}\right)>1$
Symmetries
• Items of $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ are permutable.

• Attributes of $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ are permutable w.r.t. permutation $\left(\mathrm{\pi ‘},\mathrm{\pi ’}\right)$ (permutation applied to all items).

• All occurrences of two distinct tuples of values of $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$ can be swapped; all occurrences of a tuple of values of $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$ can be renamed to any unused tuple of values.

Arg. properties
• Functional dependency: $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$ determined by $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

• Contractible wrt. $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ when $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }=1$ and $|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|>0$.

• Contractible wrt. $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ when $\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }=|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|$.

Remark

This is an example of a number of distinct values constraint where there is more than one attribute that is associated with each vertex of the final graph.

related: $\mathrm{\pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \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 \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }\mathrm{mod}\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$), $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }/\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$).

specialisation: $\mathrm{\pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \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 }$

Arc generator
$\mathrm{\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 }\mathtt{1},\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
 $\beta ’\mathrm{\pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi ‘}=\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi ‘}$ $\beta ’\mathrm{\pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi ’}=\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi ’}$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$=\mathrm{\pi ½\pi Ώ\pi °\pi Έ\pi \pi }$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.284.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property we show the different strongly connected components of the final graph. Each strongly connected component corresponds to a pair of values that is assigned to some pairs of variables of the $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ collection. In our example we have the following pairs of values: $\beta ©\mathrm{\pi ‘}-3\mathrm{\pi ’}-1\beta ͺ$ and $\beta ©\mathrm{\pi ‘}-1\mathrm{\pi ’}-5\beta ͺ$.