5.398. symmetric_cardinality
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
Put in relation two sets: for each element of one set gives the corresponding elements of the other set to which it is associated. In addition, it constraints the number of elements associated with each element to be in a given interval.
- Example
-
The constraint holds since:
,
,
,
,
,
,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval ,
The number of elements of belongs to interval .
- Typical
- Symmetries
Items of are permutable.
Items of are permutable.
- Usage
The most simple example of applying is a variant of personnel assignment problem, where one person can be assigned to perform between and jobs, and every job requires between and persons. In addition every job requires different kind of skills. The previous problem can be modelled as follows:
For each person we create an item of the collection,
For each job we create an item of the collection,
There is an arc between a person and the particular job if this person is qualified to perform it.
- Remark
The constraint generalises the constraint by allowing a variable to take more than one value.
- Algorithm
A first flow-based arc-consistency algorithm for the constraint is described inΒ [KocjanKreuger04]. A second arc-consistency filtering algorithm exploiting matching theoryΒ [DulmageMendelsohn58] is described inΒ [Cymer12], [CymerPhD13].
- See also
common keyword: Β (constraint involving set variables).
generalisation: Β ( replaced by ).
- Keywords
-
combinatorial object: relation.
constraint arguments: constraint involving set variables.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph property(ies)
-
- Graph model
The graph model used for the is similar to the one used in the or in the constraints: we use an equivalence in the arc constraint and ask all arc constraints to hold.
PartsΒ (A) andΒ (B) of FigureΒ 5.398.1 respectively show the initial and final graph associated with the Example slot. Since we use the graph property, all the arcs of the final graph are stressed in bold.
Figure 5.398.1. Initial and final graph of the constraint
(a) (b) - Signature
Since we use the arc generator on the collections and , the number of arcs of the initial graph is equal to . Therefore the maximum number of arcs of the final graph is also equal to and we can rewrite to . So we can simplify to .