Skip to main content
Log in

Undirected forest constraints

  • Published:
Annals of Operations Research Aims and scope Submit manuscript

Abstract

We present two constraints that partition the vertices of an undirected n-vertex, m-edge graph \(\mathcal {G}=( \mathcal {V}, \mathcal {E})\) into a set of vertex-disjoint trees. The first is the resource-forest constraint, where we assume that a subset \(\mathcal {R}\subseteq \mathcal {V}\) of the vertices are resource vertices. The constraint specifies that each tree in the forest must contain at least one resource vertex. This is the natural undirected counterpart of the tree constraint (Beldiceanu et al., CP-AI-OR’05, Springer, Berlin, 2005), which partitions a directed graph into a forest of directed trees where only certain vertices can be tree roots. We describe a hybrid-consistency algorithm that runs in \(\mathop {\mathcal {O}}(m+n)\) time for the resource-forest constraint, a sharp improvement over the \(\mathop {\mathcal {O}}(mn)\) bound that is known for the directed case. The second constraint is proper-forest. In this variant, we do not have the requirement that each tree contains a resource, but the forest must contain only proper trees, i.e., trees that have at least two vertices each. We develop a hybrid-consistency algorithm for this case whose running time is \(\mathop {\mathcal {O}}(mn)\) in the worst case, and \(\mathop {\mathcal {O}}(m\sqrt{n})\) in many (typical) cases.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Beldiceanu, N., Katriel, I., & Lorca, X. (2006). Undirected forest constrainsts. In LNCS: Vol. 3990. CP-AI-OR’06. Berlin: Springer.

    Google Scholar 

  • Beldiceanu, N., Flener, P., & Lorca, X. (2005). The tree constraint. In LNCS: Vol. 3524. CP-AI-OR’05 (pp. 64–78). Berlin: Springer.

    Google Scholar 

  • Laurière, J.-L. (1978). A language and a program for stating and solving combinatorial problems. Artificial Intelligence, 10, 29–127.

    Article  Google Scholar 

  • Beldiceanu, N., & Contejean, E. (1994). Introducing global constraint in CHIP. Mathematical and Computer Modelling, 20(12), 97–123.

    Article  Google Scholar 

  • Sellmann, M. (2003). Cost-based filtering for shortest path constraints. In LNCS: Vol. 2833. CP 2003 (pp. 694–708). Berlin: Springer.

    Google Scholar 

  • Dincbas, M., Van Hentenryck, P., Simonis, H., Aggoun, A., Graf, T., & Berthier, F. (1988). The constraint logic programming language CHIP. In Int. conf. on fifth generation computer systems (FGCS’88) (pp. 693–702). Japan, Tokyo.

    Google Scholar 

  • Puget, J.-F. (1994). A C++ Implementation of CLP. In Second Singapore international conference on intelligent systems (SPICIS) (pp. 256–261). Singapore, November 1994.

  • Cayley, A. (1889). A theorem on trees. Quarterly Journal of Mathematics, 23, 376–378.

    Google Scholar 

  • Bessière, C., Hebrard, E., Hnich, B., Kızıltan, Z., & Walsh, T. (2005). The range and oots constraints: Specifying counting and occurrence problems. In IJCAI-05 (pp. 60–65).

  • Mackworth, A. K. (1977). Consistency in networks of relations. Artificial Intelligence, 8(1), 99–118.

    Article  Google Scholar 

  • Laurière, J.-L. (1978). A language and a program for stating and solving combinatorial problems. Artificial Intelligence, 10, 29–127.

    Article  Google Scholar 

  • van Hentenryck, P. (1989). Constraint satisfaction in logic programming. Cambridge: MIT Press.

    Google Scholar 

  • Bessière, C., & van Hentenryck, P. (2003). To be or not to be… a global constraint. In Principles and practice of constraint programming CP’03 (pp. 789–794).

  • Régin, J.-C. (1994). A filtering algorithm for constraints of difference in CSP. In AAAI’94 (pp. 362–367).

  • Berge, C. (1985). Graphs and hypergraphs. Amsterdam: Elsevier.

    Google Scholar 

  • Sellmann, M. (2002). Reduction techniques in constraint programming and combinatorial optimization. Ph.D. thesis, University of Paderborn.

  • Régin, J.-C. (1994). A filtering algorithm for constraints of difference in CSP. In AAAI-94 (pp. 362–367).

  • Micali, S., & Vazirani, V. V. (1980). An \(\mathcal{O}(\sqrt{|V|}\cdot |{E}|)\) algorithm for finding maximum matching in general graphs. In FOCS 1980 (pp. 17–27). New York: IEEE Press.

    Google Scholar 

  • Beldiceanu, N., Petit, T., & Rochart, G. (2005). Bounds of graph characteristics. In P. van Beek (Ed.), LNCS: Vol. 3709. CP 2005, (pp. 742–746). Berlin: Springer.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xavier Lorca.

Additional information

A preliminary version appeared in the proceedings of CP-AI-OR 2006 (Beldiceanu et al. 2006).

This work was done while Irit Katriel was at the University of Aarhus, Århus, Denmark.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Beldiceanu, N., Katriel, I. & Lorca, X. Undirected forest constraints. Ann Oper Res 171, 127–147 (2009). https://doi.org/10.1007/s10479-008-0374-6

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10479-008-0374-6

Keywords

Navigation