Bounds of MIN_NCC and MAX_NCC and filtering scheme for graph domain variables
Abstract
Graph domain variables and constraints are an extension of constraint programming introduced by Dooms et al. [3]. This approach had been further investigated by Fages in its PhD thesis [4]. On the other hand, Beldiceanu et al. presented a generic filtering scheme for global constraints based on graph properties [1]. This scheme strongly relies on the computation of graph properties’ bounds and can be used in the context of graph domain variables and constraints with a few adjustments [2]. Bounds of MIN_NCC and MAX_NCC had been defined for the graph-based representation of global constraint for the path_with_loops graph class [1]. In this note we generalize those bounds for graph domain variables and for any graph class. We also provide a filtering scheme for any graph class and arbitrary bounds.
Introduction and Notations
We use the notations introduced in [1].
-
•
: The graph domain variable.
-
•
: The set of mandatory vertices.
-
•
: The set of mandatory arcs.
-
•
: The set of potential vertices.
-
•
: The set of potential arcs.
-
•
: The set of removed vertices.
-
•
: The set of removed arcs.
-
•
: The graph kernel.
-
•
: The graph envelope.
-
•
: The set of connected components of , denotes the set of connected components of verifying .
-
•
If is a connected component, is the length of any elementary sequence made from all the vertices of , or more simple, is the size of .
The MIN_NCC Constraint
Given a graph domain variable and an integer domain variable , the constraint holds if is the size of the smallest connected component of . We denote by and the lower and upper bounds of the MIN_NCC graph property, computed from . Sharp bounds of MIN_NCC had been defined in [1] for graph-based representation of global constraints, in the particular case of the path_with_loops graph class. We adjusted them for the context of graph domain variables, and for any graph class.
(4) | |||
(7) |
We now suggest a filtering scheme for the constraint that is adapted from the filtering scheme introduced in [1] for the path_with_loops graph class in the context of graph-based representation of global constraints.
-
1.
Trivial case: if then fail.
-
2.
Trivial case: if and then fail.
-
3.
If then fail. Note that a sufficient condition is , that is the existence of a mandatory connected component in the envelope strictly smaller than .
-
4.
If then fail.
-
5.
If then set to .
-
6.
If then set to .
-
7.
Every -vertex of any optional connected component smaller than (that is, in ) is turned into a -vertex.
-
8.
If then:
-
(a)
If , every -vertex of any mandatory connected component of size (that is, in ), is turned into a -vertex. can then be instantiated to .
-
(b)
Consider each connected component , if there is exactly one -arc (, ) outgoing from (), it is turned into a -arc. If is a -vertex, it is turned into a -vertex. Similarly, if there are several -arcs outgoing from but all of them are connected to a single -vertex, then it is turned into a -vertex.
-
(a)
- 9.
-
10.
If then:
-
(a)
If every -vertex is turned into a -vertex.
-
(b)
If then the only -vertex is turned into a -vertex and every -arc outgoing from it and which is not a loop is turned into a -arc.
-
(a)
The MAX_NCC Constraint
Given a graph domain variable and an integer domain variable , the constraint holds if is the size of the largest connected component of . We denote by and the lower and upper bounds of the MAX_NCC graph property, computed from . Sharp bounds of MAX_NCC had been defined in [1] for graph-based representation of global constraints, in the particular case of the path_with_loops graph class. Those bounds remain unchanged in the context of graph domain variables, for any graph class.
(8) | |||
(9) |
We now suggest a filtering scheme for the constraint that is adapted from the filtering scheme introduced in [1] for the path_with_loops graph class in the context of graph-based representation of global constraints.
-
1.
Trivial case: if then fail.
-
2.
Trivial case: if and then fail.
-
3.
If then fail.
-
4.
If then fail. Note that a sufficient condition is , that is the existence of connected component in the kernel strictly greater than .
-
5.
If then set to .
-
6.
If then set to .
-
7.
If then:
-
(a)
If then every -arc such that is turned into a -arc.
-
(b)
If then every -vertex is turned into a -vertex.
-
(c)
Every -arc linked to a maximal size connected component in the kernel, that is in is turned into a -arc.
-
(d)
Any -arc linking two connected components of of size and such that is turned into a -arc.
- (e)
-
(a)
-
8.
If and the size of this single candidate component is exactly then any -vertex of it is turned into a -vertex. can then be instantiated to .
References
- Beldiceanu et al. [a] Nicolas Beldiceanu, Mats Carlsson, Sophie Demassey, and Thierry Petit. Graph Properties Based Filtering. In Principles and Practice of Constraint Programming - CP 2006, Lecture Notes in Computer Science, pages 59–74. Springer, Berlin, Heidelberg, a. ISBN 978-3-540-46267-5 978-3-540-46268-2. doi: 10.1007/11889205˙7.
- Beldiceanu et al. [b] Nicolas Beldiceanu, Thierry Petit, and Guillaume Rochart. Bounds of graph parameters for global constraints. 40(4):327–353, b. ISSN 0399-0559, 1290-3868. doi: 10.1051/ro:2007001.
- [3] Gregoire Dooms, Yves Deville, and Pierre Dupont. CP(Graph): Introducing a Graph Computation Domain in Constraint Programming. In Principles and Practice of Constraint Programming - CP 2005, Lecture Notes in Computer Science, pages 211–225. Springer, Berlin, Heidelberg. ISBN 978-3-540-29238-8 978-3-540-32050-0. doi: 10.1007/11564751˙18.
- [4] Jean-Guillaume Fages. On the use of graphs within constraint-programming. 20(4):498–499. ISSN 1383-7133, 1572-9354. doi: 10.1007/s10601-015-9223-9.