## 5.152. in

Origin

Domain definition.

Constraint

$\mathrm{\pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }\right)$

Synonyms

$\mathrm{\pi \pi \pi }$, $\mathrm{\pi \pi }_\mathrm{\pi \pi \pi }$.

Arguments
 $\mathrm{\pi  \pi °\pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\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 }\right)$
Restrictions
 $|\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }|>0$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi },\mathrm{\pi \pi \pi }\right)$
Purpose

Enforce the domain variable $\mathrm{\pi  \pi °\pi }$ to take a value within the values described by the $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ collection.

Example
$\left(3,β©1,3βͺ\right)$

The $\mathrm{\pi \pi }$ constraint holds since its first argument $\mathrm{\pi  \pi °\pi }=3$ occurs within the collection of values $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }=\beta ©1,3\beta ͺ$.

Typical
$|\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }|>1$
Symmetries
• Items of $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ are permutable.

• $\mathrm{\pi  \pi °\pi }$ can be set to any value of $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }.\mathrm{\pi \pi \pi }$.

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

Remark

Entailment occurs immediately after posting this constraint.

The $\mathrm{\pi \pi }$ constraint is called $\mathrm{\pi \pi \pi }$ inΒ Gecode (http://www.gecode.org/).

Systems

member in Choco, in in JaCoP, in in SICStus, in_set in SICStus.

Used in
Keywords
Derived Collection
$\mathrm{\pi \pi \pi }\left(\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),\left[\mathrm{\pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }-\mathrm{\pi  \pi °\pi }\right)\right]\right)$
Arc input(s)

$\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ $\mathrm{\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 },\mathrm{\pi \pi \pi \pi \pi \pi }\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }.\mathrm{\pi \pi \pi }=\mathrm{\pi \pi \pi \pi \pi \pi }.\mathrm{\pi \pi \pi }$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$=1$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.152.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 unique arc of the final graph is stressed in bold.

Signature

Since all the $\mathrm{\pi \pi \pi }$ attributes of the $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ collection are distinct and because of the arc constraint $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }.\mathrm{\pi \pi \pi }=\mathrm{\pi \pi \pi \pi \pi \pi }.\mathrm{\pi \pi \pi }$ the final graph contains at most one arc. Therefore we can rewrite $\mathrm{\pi \pi \pi \pi }=1$ to $\mathrm{\pi \pi \pi \pi }\beta ₯1$ and simplify $\underset{Μ²}{\stackrel{Β―}{\mathrm{\pi \pi \pi \pi }}}$ to $\stackrel{Β―}{\mathrm{\pi \pi \pi \pi }}$.

Automaton

FigureΒ 5.152.2 depicts the automaton associated with the $\mathrm{\pi \pi }$ constraint. Let ${\mathrm{\pi  \pi °\pi »}}_{i}$ be the $\mathrm{\pi \pi \pi }$ attribute of the ${i}^{th}$ item of the $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ collection. To each pair $\left(\mathrm{\pi  \pi °\pi },{\mathrm{\pi  \pi °\pi »}}_{i}\right)$ corresponds a 0-1 signature variable ${\mathrm{\pi }}_{i}$ as well as the following signature constraint: $\mathrm{\pi  \pi °\pi }={\mathrm{\pi  \pi °\pi »}}_{i}\beta {\mathrm{\pi }}_{i}$.