5.90. correspondence
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
The variables of collection correspond to the variables of collection according to the permutation (i.e.,Β ).
- Example
-
As illustrated by FigureΒ 5.90.1, the constraint holds since:
The first item of collection corresponds to the item of collection .
The second item of collection corresponds to the item of collection .
The third item of collection corresponds to the item of collection .
The fourth item of collection corresponds to the item of collection .
The fifth item of collection corresponds to the item of collection .
The sixth item of collection corresponds to the item of collection .
Figure 5.90.1. Illustration of the correspondence between the items of the and the collections according to the permutation defined by the items of the collection of the Example slot
- Typical
- Symmetry
All occurrences of two distinct values in or can be swapped; all occurrences of a value in or can be renamed to any unused value.
- Remark
Similar to the constraint except that we also provide the permutation that allows to go from the items of collection to the items of collection .
- Algorithm
An arc-consistency filtering algorithm for the constraint is described inΒ [Cymer12], [CymerPhD13]. The algorithm is based on the following ideas:
First, one can map solutions to the constraint to perfect matchings in a bipartite graph derived from the domain of the variables of the constraint in the following way: to each variable of the collection there is a from vertex; similarly, to each variable of the collection there is a to vertex; finally, there is an edge between the from vertex and the to vertex if and only if the corresponding domains intersect and if belongs to the domain of the permutation variable.
Second, Dulmage-Mendelsohn decompositionΒ [DulmageMendelsohn58] is used to characterise all edges that do not belong to any perfect matching, and therefore prune the corresponding variables.
- See also
-
specialisation: Β ( parameter removed).
- Keywords
characteristic of a constraint: derived collection.
combinatorial object: permutation.
constraint arguments: constraint between three collections of variables.
- Derived Collection
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph property(ies)
-
- Graph class
-
- Graph model
PartsΒ (A) andΒ (B) of FigureΒ 5.90.2 respectively show the initial and final graph associated with the Example slot. In both graphs the source vertices correspond to the derived collection , while the sink vertices correspond to the collection . Since the final graph contains exactly arcs the constraint holds. As we use the graph property, the arcs of the final graph are stressed in bold.
Figure 5.90.2. Initial and final graph of the constraint
(a) (b) - Signature
Because of the second condition of the arc constraint and since both, the attributes of the collection and the attributes of the collection are all-distinct, the final graph contains at most arcs. Therefore we can rewrite the graph property to . This leads to simplify to .