## 5.166. int_value_precede

Origin
Constraint

$\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi },\mathrm{\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Arguments
 $\mathrm{\pi }$ $\mathrm{\pi \pi \pi }$ $\mathrm{\pi }$ $\mathrm{\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)$
Restrictions
 $\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

If value $\mathrm{\pi }$ occurs in the collection of variables $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ then its first occurrence should be preceded by an occurrence of value $\mathrm{\pi }$.

Example
$\left(0,1,β©4,0,6,1,0βͺ\right)$

The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$ constraint holds since the first occurrence of value 0 precedes the first occurrence of value 1.

Typical
 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(1,\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi }\right)$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(1,\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi }\right)$
Symmetries
• An occurrence of a value of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$ that is different from $\mathrm{\pi }$ and $\mathrm{\pi }$ can be replaced by any other value that is also different from $\mathrm{\pi }$ and $\mathrm{\pi }$.

• All occurrences of values $\mathrm{\pi }$ and $\mathrm{\pi }$ can be swapped in $\mathrm{\pi }$, $\mathrm{\pi }$ and $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$.

Algorithm

A filtering algorithm for maintaining value precedence is presented inΒ [YatChiuLawJimmyLee04]. Its complexity is linear to the number of variables of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

generalisation: $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ of 2 $\mathrm{\pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ of at least 2 $\mathrm{\pi \pi \pi \pi \pi \pi }$), $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi }\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$).
FigureΒ 5.166.1 depicts the automaton associated with the $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$ constraint. Let ${\mathrm{\pi  \pi °\pi }}_{i}$ be the ${i}^{th}$ variable of the $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ collection. To each triple $\left(\mathrm{\pi },\mathrm{\pi },{\mathrm{\pi  \pi °\pi }}_{i}\right)$ corresponds a signature variable ${\mathrm{\pi }}_{i}$ as well as the following signature constraint: .