## 5.288. set_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 there exists a set variable ${v}_{1}$ of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ such that $\mathrm{\pi }$ does not belong to ${v}_{1}$ and $\mathrm{\pi }$ does, then there also exists a set variable ${v}_{2}$ preceding ${v}_{1}$ such that $\mathrm{\pi }$ belongs to ${v}_{2}$ and $\mathrm{\pi }$ does not.

Example
$\left(\begin{array}{c}2,1,β©\begin{array}{c}\mathrm{\pi \pi \pi }-\left\{0,2\right\},\hfill \\ \mathrm{\pi \pi \pi }-\left\{0,1\right\},\hfill \\ \mathrm{\pi \pi \pi }-\mathrm{\beta  },\hfill \\ \mathrm{\pi \pi \pi }-\left\{1\right\}\hfill \end{array}βͺ\hfill \end{array}\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 2 precedes the first occurrence of value 1.

Algorithm

A filtering algorithm for maintaining value precedence on a sequence of set variables 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 }$.

specialisation: $\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 }\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 \pi \pi \pi }\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$).