This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Bounds of MIN_NCC and MAX_NCC and filtering scheme for graph domain variables

Dimitri Justeau-Allaire Corresponding author: dimitri.justeau@gmail.com CIRAD, UMR AMAP, Montpellier, France Institut Agronomique néo-Calédonien (IAC), Nouméa, New Caledonia AMAP, Univ Montpellier, CIRAD, CNRS, INRAE, IRD, Montpellier, France Philippe Birnbaum CIRAD, UMR AMAP, Montpellier, France Institut Agronomique néo-Calédonien (IAC), Nouméa, New Caledonia AMAP, Univ Montpellier, CIRAD, CNRS, INRAE, IRD, Montpellier, France Xavier Lorca Centre de Génie Industriel, IMT Mines Albi, Albi, France
(May 2018)
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].

  • GG: The graph domain variable.

  • VTV_{T}: The set of mandatory vertices.

  • ETE_{T}: The set of mandatory arcs.

  • VUV_{U}: The set of potential vertices.

  • EUE_{U}: The set of potential arcs.

  • VFV_{F}: The set of removed vertices.

  • EFE_{F}: The set of removed arcs.

  • G(VT,ET)G(V_{T},E_{T}): The graph kernel.

  • G(VTU,ETU)G(V_{TU},E_{TU}): The graph envelope.

  • cc(G)cc(G): The set of connected components of GG, cc[cond](G)cc_{[cond]}(G) denotes the set of connected components of GG verifying condcond.

  • If ii is a connected component, lil_{i} is the length of any elementary sequence made from all the vertices of ii, or more simple, lil_{i} is the size of ii.

The MIN_NCC Constraint

Given a graph domain variable GG and an integer domain variable PP, the constraint MIN_NCC(G,P)\text{MIN\_NCC}(G,P) holds if PP is the size of the smallest connected component of GG. We denote by MIN_NCC¯(G)\underline{\text{MIN\_NCC}}(G) and MIN_NCC¯(G)\overline{\text{MIN\_NCC}}(G) the lower and upper bounds of the MIN_NCC graph property, computed from GG. 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.

MIN_NCC¯(G)={0if |VT|=0;1if |VT|1|VU|1;minicc(G(VT,ET))liif |VT|1|VU|=0.\displaystyle\underline{\text{MIN\_NCC}}(G)=\left\{\begin{array}[]{ll}0&\text{if }|V_{T}|=0;\\ 1&\text{if }|V_{T}|\geq 1\land|V_{U}|\geq 1;\\ \min_{i\in\textit{cc}(G(V_{T},E_{T}))}l_{i}&\text{if }|V_{T}|\geq 1\land|V_{U}|=0.\end{array}\right. (4)
MIN_NCC¯(G)={minicc[|VT|1](G(VTU,ETU))liif |VT|1;maxicc(G(VTU,ETU))liif |VT|=0.\displaystyle\overline{\text{MIN\_NCC}}(G)=\left\{\begin{array}[]{ll}\min_{i\in\textit{cc}_{[|V_{T}|\geq 1]}(G(V_{TU},E_{TU}))}l_{i}&\text{if }|V_{T}|\geq 1;\\ \max_{i\in\textit{cc}(G(V_{TU},E_{TU}))}l_{i}&\text{if }|V_{T}|=0.\end{array}\right. (7)

We now suggest a filtering scheme for the MIN_NCC(G,P)\text{MIN\_NCC}(G,P) 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. 1.

    Trivial case: if P¯>|VTU|\underline{P}>|V_{TU}| then fail.

  2. 2.

    Trivial case: if P¯>0\underline{P}>0 and |ETU|<max(1,P¯1)|E_{TU}|<\max(1,\underline{P}-1) then fail.

  3. 3.

    If MIN_NCC¯(G)<P¯\overline{\text{MIN\_NCC}}(G)<\underline{P} then fail. Note that a sufficient condition is |cc[|VTU|<P¯|VT|1](G(VTU,ETU))|1|\textit{cc}_{[|V_{TU}|<\underline{P}\land|V_{T}|\geq 1]}(G(V_{TU},E_{TU}))|\geq 1, that is the existence of a mandatory connected component in the envelope strictly smaller than P¯\underline{P}.

  4. 4.

    If MIN_NCC¯(G)>P¯\underline{\text{MIN\_NCC}}(G)>\overline{P} then fail.

  5. 5.

    If P¯<MIN_NCC¯(G)\underline{P}<\underline{\text{MIN\_NCC}}(G) then set P¯\underline{P} to MIN_NCC¯(G)\underline{\text{MIN\_NCC}}(G).

  6. 6.

    If P¯>MIN_NCC¯(G)\overline{P}>\overline{\text{MIN\_NCC}}(G) then set P¯\overline{P} to MIN_NCC¯(G)\overline{\text{MIN\_NCC}}(G).

  7. 7.

    Every UU-vertex of any optional connected component smaller than P¯\underline{P} (that is, in cc[|VTU|<P¯|VT|=0](G(VTU,ETU))\textit{cc}_{[|V_{TU}|<\underline{P}\land|V_{T}|=0]}\allowbreak(G(V_{TU},E_{TU}))) is turned into a FF-vertex.

  8. 8.

    If MIN_NCC¯(G)<P¯\underline{\text{MIN\_NCC}}(G)<\underline{P} then:

    1. (a)

      If |VT|1|V_{T}|\geq 1, every UU-vertex of any mandatory connected component of size P¯\underline{P} (that is, in cc[|VTU|=P¯|VT|1](G(VTU,ETU))\textit{cc}_{[|V_{TU}|=\underline{P}\land|V_{T}|\geq 1]}(G(V_{TU},E_{TU}))), is turned into a TT-vertex. PP can then be instantiated to P¯\underline{P}.

    2. (b)

      Consider each connected component icc[|VT|<P¯](G(VT,ET))i\in\textit{cc}_{[|V_{T}|<\underline{P}]}(G(V_{T},E_{T})), if there is exactly one UU-arc (xx, yy) outgoing from ii (xiyix\in i\land y\notin i), it is turned into a TT-arc. If yy is a UU-vertex, it is turned into a TT-vertex. Similarly, if there are several UU-arcs outgoing from ii but all of them are connected to a single UU-vertex, then it is turned into a TT-vertex.

  9. 9.

    If GG had been modified in step 8b, recompute MIN_NCC¯(G)\underline{\text{MIN\_NCC}}(G) and repeat steps 4 and 5.

  10. 10.

    If MIN_NCC¯(G)>P¯\overline{\text{MIN\_NCC}}(G)>\overline{P} then:

    1. (a)

      If P¯=0\overline{P}=0 every UU-vertex is turned into a FF-vertex.

    2. (b)

      If P¯=1|VU|=1minicc(G(VT,ET))li>1\overline{P}=1\land|V_{U}|=1\land\min_{i\in\textit{cc}(G(V_{T},E_{T}))}l_{i}>1 then the only UU-vertex is turned into a TT-vertex and every UU-arc outgoing from it and which is not a loop is turned into a FF-arc.

The MAX_NCC Constraint

Given a graph domain variable GG and an integer domain variable PP, the constraint MAX_NCC(G,P)\text{MAX\_NCC}(G,P) holds if PP is the size of the largest connected component of GG. We denote by MAX_NCC¯(G)\underline{\text{MAX\_NCC}}(G) and MAX_NCC¯(G)\overline{\text{MAX\_NCC}}(G) the lower and upper bounds of the MAX_NCC graph property, computed from GG. 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.

MAX_NCC¯(G)=maxicc(G(XT,ET))li;\displaystyle\underline{\textbf{MAX\_NCC}}(G)=\max_{i\in\textit{cc}(G(X_{T},E_{T}))}l_{i}; (8)
MAX_NCC¯(G)=maxicc(G(XTU,ETU))li.\displaystyle\overline{\textbf{MAX\_NCC}}(G)=\max_{i\in\textit{cc}(G(X_{TU},E_{TU}))}l_{i}. (9)

We now suggest a filtering scheme for the MAX_NCC(G,P)\text{MAX\_NCC}(G,P) 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. 1.

    Trivial case: if P¯>|XTU|\underline{P}>|X_{TU}| then fail.

  2. 2.

    Trivial case: if P¯>0\underline{P}>0 and |ETU|<max(1,P¯1)|E_{TU}|<\max(1,\underline{P}-1) then fail.

  3. 3.

    If MAX_NCC¯(G)<P¯\overline{\textbf{MAX\_NCC}}(G)<\underline{P} then fail.

  4. 4.

    If MAX_NCC¯(G)>P¯\underline{\textbf{MAX\_NCC}}(G)>\overline{P} then fail. Note that a sufficient condition is |cc[|XT|>P¯](G(XT,ET))|1|\textit{cc}_{[|X_{T}|>\overline{P}]}(G(X_{T},E_{T}))|\geq 1, that is the existence of connected component in the kernel strictly greater than P¯\overline{P}.

  5. 5.

    If P¯<MAX_NCC¯(G)\underline{P}<\underline{\text{MAX\_NCC}}(G) then set P¯\underline{P} to MAX_NCC¯(G)\underline{\text{MAX\_NCC}}(G).

  6. 6.

    If P¯>MAX_NCC¯(G)\overline{P}>\overline{\text{MAX\_NCC}}(G) then set P¯\overline{P} to MAX_NCC¯(G)\overline{\text{MAX\_NCC}}(G).

  7. 7.

    If MAX_NCC¯(G)>P¯\overline{\text{MAX\_NCC}}(G)>\overline{P} then:

    1. (a)

      If P¯=1\overline{P}=1 then every UU-arc (x,y)(x,y) such that xyx\neq y is turned into a FF-arc.

    2. (b)

      If P¯=0\overline{P}=0 then every UU-vertex is turned into a FF-vertex.

    3. (c)

      Every UU-arc linked to a maximal size connected component in the kernel, that is in cc[|XT|=P¯](G(XT,ET))\textit{cc}_{[|X_{T}|=\overline{P}]}(G(X_{T},E_{T})) is turned into a FF-arc.

    4. (d)

      Any UU-arc linking two connected components of G(XT,ET)G(X_{T},E_{T}) of size s1s_{1} and s2s_{2} such that s1+s2>P¯s_{1}+s_{2}>\overline{P} is turned into a FF-arc.

    5. (e)

      If GG had been modified in step 7d, recompute MAX_NCC¯(G)\overline{\text{MAX\_NCC}}(G) and repeat steps 3 and 6.

  8. 8.

    If |cc[|VTU|P¯](G(VTU,ETU))|=1|\textit{cc}_{[|V_{TU}|\geq\underline{P}]}(G(V_{TU},E_{TU}))|=1 and the size of this single candidate component is exactly P¯\underline{P} then any UU-vertex of it is turned into a TT-vertex. PP can then be instantiated to P¯\underline{P}.

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.