5.382. subgraph_isomorphism
DESCRIPTION | LINKS |
- Origin
- Constraint
- Arguments
- Restrictions
- Purpose
Given two directed graphs and enforce a one to one correspondence, defined by the function , between the vertices of the graph and the vertices of an induced subgraph of so that, if there is an arc from to in the graph , then there is also an arc from the image of to the image of in the induced subgraph of . The vertices of both graphs are respectively defined by the two collections of vertices and . Within collection the set of successors of each node is fixed, while this is not the case for the collection . This stems from the fact that the graph is not fixed (i.e.,Β the lower and upper bounds of the target graph are specified when we post the constraint, while the induced subgraph of a solution to the constraint corresponds to a graph for which the upper and lower bounds are identical).
- Example
-
FigureΒ 5.382.1 gives the pattern (see PartΒ (A)) and target graph (see PartΒ (B)) of the Example slot as well as the one to one correspondence (see PartΒ (C)) between the pattern graph and the induced subgraph of the target graph. The constraint since:
To the arc from vertex 1 to vertex 4 in the pattern graph corresponds the arc from vertex 4 to 5 in the induced subgraph of the target graph.
To the arc from vertex 1 to vertex 2 in the pattern graph corresponds the arc from vertex 4 to 2 in the induced subgraph of the target graph.
To the arc from vertex 2 to vertex 1 in the pattern graph corresponds the arc from vertex 2 to 4 in the induced subgraph of the target graph.
To the arc from vertex 2 to vertex 4 in the pattern graph corresponds the arc from vertex 2 to 5 in the induced subgraph of the target graph.
To the arc from vertex 2 to vertex 3 in the pattern graph corresponds the arc from vertex 2 to 3 in the induced subgraph of the target graph.
Figure 5.382.1. Illustration of the Example slot: (A)Β The pattern graph, (B)Β a possible initial target graph β plain arcs must belong to the induced subgraph, while dotted arcs may or may not belong to the induced subgraph β and (C)Β the correspondence, denoted by thick dashed arcs, between the vertices of the pattern graph and the vertices of the induced subgraph of the target graph. Within a set variable a bold value (respectively a plain value) represents a value that for sure belong (respectively that may belong) to the set.
- Typical
- Symmetries
Items of are permutable.
Items of are permutable.
- Usage
Within the context of constraint programming the constraint was used for finding symmetriesΒ [Puget03], [Puget05a], [Puget05b].
- Algorithm
[Ullmann76], [Regin95], [LarrosaValiente02], [ZampelliDevilleSolnonSorlinDupont07].
- See also
related: .
- Keywords
constraint arguments: constraint involving set variables.