## 5.329. sum_set

Origin

H.Β Cambazard

Constraint

$\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi }\left(\mathrm{\pi \pi  },\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi },\mathrm{\pi ²\pi \pi },\mathrm{\pi  \pi °\pi }\right)$

Arguments
 $\mathrm{\pi \pi  }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\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 },\mathrm{\pi \pi \pi \pi }-\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi ²\pi \pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\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 },\left[\mathrm{\pi \pi \pi },\mathrm{\pi \pi \pi \pi }\right]\right)$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }.\mathrm{\pi \pi \pi \pi }\beta ₯0$
Purpose

Let $\mathrm{\pi \pi \pi Ό}$ denote the sum of the $\mathrm{\pi \pi \pi \pi }$ attributes of the $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ collection for which the corresponding values $\mathrm{\pi \pi \pi }$ occur in the set $\mathrm{\pi \pi  }$. Enforce the following constraint to hold: $\mathrm{\pi \pi \pi Ό}\mathrm{\pi ²\pi \pi }\mathrm{\pi  \pi °\pi }$.

Example
$\left(\begin{array}{c}\left\{2,3,6\right\},\hfill \\ β©\begin{array}{cc}\mathrm{\pi \pi \pi }-2\hfill & \mathrm{\pi \pi \pi \pi }-7,\hfill \\ \mathrm{\pi \pi \pi }-9\hfill & \mathrm{\pi \pi \pi \pi }-1,\hfill \\ \mathrm{\pi \pi \pi }-5\hfill & \mathrm{\pi \pi \pi \pi }-7,\hfill \\ \mathrm{\pi \pi \pi }-6\hfill & \mathrm{\pi \pi \pi \pi }-2\hfill \end{array}βͺ,=,9\hfill \end{array}\right)$

The $\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi }$ constraint holds since the sum of the $\mathrm{\pi \pi \pi \pi }$ attributes $7+2$ for which the corresponding $\mathrm{\pi \pi \pi }$ attribute belongs to the first argument $\mathrm{\pi \pi  }=\left\{2,3,6\right\}$ is equal (i.e.,Β since $\mathrm{\pi ²\pi \pi }$ is set to $=$) to its last argument $\mathrm{\pi  \pi °\pi }=9$.

Symmetry

Items of $\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$ are permutable.

Keywords
Arc input(s)

$\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi }$

Arc generator
$\mathrm{\pi \pi Έ\pi Ώ\pi Ή}$$\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi \pi \pi \pi }\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi \pi }_\mathrm{\pi \pi \pi }$$\left(\mathrm{\pi \pi \pi \pi \pi \pi }.\mathrm{\pi \pi \pi },\mathrm{\pi \pi  }\right)$
Graph property(ies)
$\mathrm{\pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi »\pi \pi ΄\pi },\mathrm{\pi \pi \pi \pi }\right)\mathrm{\pi ²\pi \pi }\mathrm{\pi  \pi °\pi }$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.329.1 respectively show the initial and final graph associated with the Example slot.