## 5.289. nvalues_except_0

Origin
Constraint

$\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi ‘\pi \pi \pi \pi }_\mathtt{0}\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ},\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }\right)$

Arguments
 $\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)$ $\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }$ $\mathrm{\pi \pi \pi \pi }$
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

Let $N$ be the number of distinct values, different from 0, assigned to the variables of the $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ collection. Enforce condition $N\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }$ to hold.

Example
$\left(β©4,5,5,4,0,1βͺ,=,3\right)$

The $\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi ‘\pi \pi \pi \pi }_\mathtt{0}$ constraint holds since the number of distinct values, different from 0, occurring within the collection $\beta ©4,5,5,4,0,1\beta ͺ$ is equal (i.e.,Β $\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}$ is set toΒ $=$) to its third argument $\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }=3$.

Typical
 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$ $\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }>1$ $\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }<|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(1,\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },0\right)$ $\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\beta \left[=,<,\beta ₯,>,\beta €\right]$
Symmetries
• Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ are permutable.

• All occurrences of two distinct values of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$ that are both different from 0 can be swapped; all occurrences of a value of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$ that is different from 0 can be renamed to any unused value that is also different from 0.

Arg. properties
• Contractible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ when $\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\beta \left[<,\beta €\right]$.

• Extensible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ when $\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\beta \left[\beta ₯,>\right]$.

Reformulation

The $\mathrm{\pi \pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi ‘\pi \pi \pi \pi }_\mathtt{0}$$\left(\beta ©{V}_{1},{V}_{2},\beta ―,{V}_{|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|}\beta ͺ,\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ},\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }\right)$ constraint can be expressed in term of the conjunction $\mathrm{\pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi \pi }\mathit{1},\beta ©0,{V}_{1},{V}_{2},\beta ―,{V}_{|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|}\beta ͺ\right)$ $\beta §$ $\mathrm{\pi \pi }\mathit{1}-1\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }$.

Used in
Keywords
Arc input(s)

$\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$

Arc generator
$\mathrm{\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 }\mathtt{1},\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
 $\beta ’\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi \pi \pi }=\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi \pi \pi }$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$\mathrm{\pi \pi ΄\pi »\pi Ύ\pi Ώ}\mathrm{\pi »\pi Έ\pi Ό\pi Έ\pi }$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.289.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property we show the different strongly connected components of the final graph. Each strongly connected component corresponds to a value distinct from 0 that is assigned to some variables of the $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ collection. Beside value 0, the 3 following values 1, 4 and 5 are assigned to the variables of the $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ collection.