## 5.344. 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(2,1,β©\mathrm{\pi \pi \pi }-\left\{0,2\right\},\mathrm{\pi \pi \pi }-\left\{0,1\right\},\mathrm{\pi \pi \pi }-\mathrm{\beta  },\mathrm{\pi \pi \pi }-\left\{1\right\}βͺ\right)$ $\left(0,1,β©\mathrm{\pi \pi \pi }-\left\{0,2\right\},\mathrm{\pi \pi \pi }-\left\{0,1\right\},\mathrm{\pi \pi \pi }-\mathrm{\beta  },\mathrm{\pi \pi \pi }-\left\{1\right\}βͺ\right)$ $\left(0,2,β©\mathrm{\pi \pi \pi }-\left\{0,2\right\},\mathrm{\pi \pi \pi }-\left\{0,1\right\},\mathrm{\pi \pi \pi }-\mathrm{\beta  },\mathrm{\pi \pi \pi }-\left\{1\right\}βͺ\right)$ $\left(0,4,β©\mathrm{\pi \pi \pi }-\left\{0,2\right\},\mathrm{\pi \pi \pi }-\left\{0,1\right\},\mathrm{\pi \pi \pi }-\mathrm{\beta  },\mathrm{\pi \pi \pi }-\left\{1\right\}βͺ\right)$

The following examples are taken fromΒ [Law05]:

• The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(2,1,\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ\right)$ constraint holds since the first occurrence of value 2 precedes the first occurrence of value 1 (i.e.,Β the set $\left\{0,2\right\}$ occurs before the set $\left\{0,1\right\}$).

• The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(0,1,\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ\right)$ constraint holds since the first occurrence of value 0 precedes the first occurrence of value 1 (i.e.,Β the set $\left\{0,2\right\}$ occurs before the set $\left\{0,1\right\}$).

• The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(0,2,\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ\right)$ constraint holds since βthere is no set in $\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ$ that contains 2 but not 0β.

• The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(0,4,\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ\right)$ constraint holds since no set in $\beta ©\left\{0,2\right\},\left\{0,1\right\},\left\{\right\},\left\{1\right\}\beta ͺ$ contains value 4.

Typical
 $\mathrm{\pi }<\mathrm{\pi }$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$
Arg. properties

Suffix-contractible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

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 }$.

Systems
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 }$).