## 5.173. inverse_within_range

Origin
Constraint

Synonyms

$\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi \pi }$, $\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }$.

Arguments
 $\mathrm{\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 }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }-\mathrm{\pi \pi \pi \pi }\right)$
Restrictions
 $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi },\mathrm{\pi \pi \pi }\right)$
Purpose

If the ${i}^{th}$ variable of the collection $\mathrm{\pi }$ is assigned to $j$ and if $j$ is less than or equal to the number of items of the collection $\mathrm{\pi }$ then the ${j}^{th}$ variable of the collection $\mathrm{\pi }$ is assigned to $i$.

Conversely, if the ${j}^{th}$ variable of the collection $\mathrm{\pi }$ is assigned to $i$ and if $i$ is less than or equal to the number of items of the collection $\mathrm{\pi }$ then the ${i}^{th}$ variable of the collection $\mathrm{\pi }$ is assigned to $j$.

Example
$\left(\begin{array}{c}β©9,4,2βͺ,\hfill \\ β©9,3,9,2βͺ\hfill \end{array}\right)$

Since the second item of $\mathrm{\pi }$ is assigned to 4, the fourth item of $\mathrm{\pi }$ is assigned to 2. Similarly, since the third item of $\mathrm{\pi }$ is assigned to 2, the second item of $\mathrm{\pi }$ is assigned to 3. FigureΒ 5.173.1 illustrates the correspondence between $\mathrm{\pi }$ and $\mathrm{\pi }$.

Typical
 $|\mathrm{\pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi }.\mathrm{\pi \pi \pi }\right)>1$ $|\mathrm{\pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi }.\mathrm{\pi \pi \pi }\right)>1$
Symmetry

Arguments are permutable w.r.t. permutation $\left(\mathrm{\pi },\mathrm{\pi }\right)$.

Usage

Consider an integer value $m$ and a sequence of $n$ variables $S$ from which you have to select a subsequence ${S}^{\text{'}}$ such that:

• All variables of ${S}^{\text{'}}$ have to be assigned to distinct values from $\left[1,m\right]$,

• All variables not in ${S}^{\text{'}}$ have to be assigned a value, not necessarily distinct, outside $\left[1,m\right]$.

As for the $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$ constraint we may want to create explicitly a value variable for each value in [1,m] in order to state some specific constraints on the value variables or to use a heuristics involving the original variables of $S$ as well as the value variables. The purpose of the constraint is to link the variables of $S$ with the value variables.

specialisation: $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$Β (the 2 collections have not necessarly the same number of items).

Keywords
Arc input(s)

$\mathrm{\pi }$ $\mathrm{\pi }$

Arc generator
$\mathrm{\pi \pi \pi \pi \pi Έ\pi \pi  \pi Ό\pi Ά}_\mathrm{\pi \pi  \pi \pi ·\pi \pi Ά\pi }$$\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi }\mathtt{1},\mathrm{\pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi }\mathtt{1}.\mathrm{\pi \pi \pi }=\mathrm{\pi }\mathtt{2}.\mathrm{\pi \pi \pi ’}$
Graph class
 $\beta ’$$\mathrm{\pi ±\pi Έ\pi Ώ\pi °\pi \pi \pi Έ\pi \pi ΄}$ $\beta ’$$\mathrm{\pi ½\pi Ύ}_\mathrm{\pi »\pi Ύ\pi Ύ\pi Ώ}$ $\beta ’$$\mathrm{\pi \pi \pi Ό\pi Ό\pi ΄\pi \pi \pi Έ\pi ²}$