## 5.50. between_min_max

Origin
Constraint

Arguments
 $\mathrm{\pi  \pi °\pi }$ $\mathrm{\pi \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)$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>0$
Purpose

$\mathrm{\pi  \pi °\pi }$ is greater than or equal to at least one variable of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ and less than or equal to at least one variable of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

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

The first constraint holds since its first argument 3 is greater than or equal to the minimum value of the values of the collection $\beta ©1,1,4,8\beta ͺ$ and less than or equal to the maximum value of $\beta ©1,1,4,8\beta ͺ$.

Typical
 $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }\right)>1$
Symmetries
• Items of $\mathrm{\pi  \pi °\pi \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 ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }$.

Arg. properties

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

Reformulation

By introducing two extra variables $\mathrm{\pi Ό\pi Έ\pi ½}$ and $\mathrm{\pi Ό\pi °\pi }$, the $\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$ constraint can be expressed in term of the following conjunction of constraints:

Β Β Β $\mathrm{\pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ό\pi Έ\pi ½},\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$,

Β Β Β $\mathrm{\pi \pi \pi ‘\pi \pi \pi \pi }$$\left(\mathrm{\pi Ό\pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$,

Β Β Β $\mathrm{\pi  \pi °\pi }\beta ₯\mathrm{\pi Ό\pi Έ\pi ½}$,

Β Β Β $\mathrm{\pi  \pi °\pi }\beta €\mathrm{\pi Ό\pi °\pi }$.

Counting
 Length ($n$) 2 3 4 5 6 7 8 Solutions 17 184 2417 37806 689201 14376608 338051265

Number of solutions for : domains $0..n$

Length ($n$)2345678
Total1718424173780668920114376608338051265
 Parameter value

0537369465170993127360926269505
17555436751102023181721537281919
25555937501113489201889941366849
3-375437501116191207858142649535
4--3696751113489207858142915649
5---4651102023201889942649535
6----70993181721541366849
7-----127360937281919
8------26269505

Solution count for : domains $0..n$

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

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

Graph class
 $\beta ’$$\mathrm{\pi °\pi ²\pi \pi ²\pi »\pi Έ\pi ²}$ $\beta ’$$\mathrm{\pi ±\pi Έ\pi Ώ\pi °\pi \pi \pi Έ\pi \pi ΄}$ $\beta ’$$\mathrm{\pi ½\pi Ύ}_\mathrm{\pi »\pi Ύ\pi Ύ\pi Ώ}$

Arc input(s)

$\mathrm{\pi Έ\pi \pi ΄\pi Ό}$ $\mathrm{\pi  \pi °\pi \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 },\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }\right)$

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

Graph class
 $\beta ’$$\mathrm{\pi °\pi ²\pi \pi ²\pi »\pi Έ\pi ²}$ $\beta ’$$\mathrm{\pi ±\pi Έ\pi Ώ\pi °\pi \pi \pi Έ\pi \pi ΄}$ $\beta ’$$\mathrm{\pi ½\pi Ύ}_\mathrm{\pi »\pi Ύ\pi Ύ\pi Ώ}$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.50.1 respectively show the initial and final graph associated with the second graph constraint of the first example of the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property, the two arcs of the final graph are stressed in bold. The constraint holds since 3 is greater than 1 and since 3 is less than 8.

Automaton

FigureΒ 5.50.2 depicts the automaton associated with the constraint. To each pair $\left(\mathrm{\pi  \pi °\pi },{\mathrm{\pi  \pi °\pi }}_{i}\right)$, where ${\mathrm{\pi  \pi °\pi }}_{i}$ is a variable of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ corresponds a signature variable ${S}_{i}$. The following signature constraint links $\mathrm{\pi  \pi °\pi }$, ${\mathrm{\pi  \pi °\pi }}_{i}$ and ${S}_{i}$: $\left(\mathrm{\pi  \pi °\pi }<{\mathrm{\pi  \pi °\pi }}_{i}\beta {S}_{i}=0\right)\beta §\left(\mathrm{\pi  \pi °\pi }={\mathrm{\pi  \pi °\pi }}_{i}\beta {S}_{i}=1\right)\beta §\left(\mathrm{\pi  \pi °\pi }>{\mathrm{\pi  \pi °\pi }}_{i}\beta {S}_{i}=2\right)$.