Improving GAC-4 for Table and MDD Constraints

  • Guillaume Perez
  • Jean-Charles Régin
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8656)


We introduce GAC-4R, MDD-4, and MDD-4R three new algorithms for maintaining arc consistency for table and MDD constraints. GAC-4R improves the well-known GAC-4 algorithm by managing the internal data structures in a different way. Instead of maintaining the internal data structures only by studying the consequences of deletions, we propose to reset the data structures by recomputing them from scratch whenever it saves time. This idea avoids the major drawback of the GAC-4 algorithm, i.e., its cost at a shallow search-tree depth. We also show that this idea can be exploited in MDD constraints. Experiments show that GAC-4R is competitive with the best arc-consistency algorithms for table constraints, and that MDD-4R clearly outperforms all classical algorithms for table or MDD constraints.


Current Domain Table Constraint Reset Operation Internal Data Structure Extensional Constraint 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Andersen, H.R., Hadzic, T., Hooker, J.N., Tiedemann, P.: A Constraint Store Based on Multivalued Decision Diagrams. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 118–132. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Bergman, D., van Hoeve, W.-J., Hooker, J.N.: Manipulating MDD Relaxations for Combinatorial Optimization. In: Achterberg, T., Beck, J.C. (eds.) CPAIOR 2011. LNCS, vol. 6697, pp. 20–35. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  3. 3.
    Bessière, C., Régin, J.-C.: Arc consistency for general constraint networks: preliminary results. In: Proceedings of IJCAI 1997, Nagoya, pp. 398–404 (1997)Google Scholar
  4. 4.
    Bessière, C., Régin, J.-C.: Refining the basic constraint propagation algorithm. In: Proceedings of IJCAI 2001, Seattle, WA, USA, pp. 309–315 (2001)Google Scholar
  5. 5.
    Briggs, P., Torczon, L.: An efficient representation for sparse sets. ACM Letters on Programming Languages and Systems 2, 59–69 (1993)CrossRefGoogle Scholar
  6. 6.
    Bryant, R.E.: Graph-based algorithms for boolean function manipulation. IEEE Transactions on Computers C35(8), 677–691 (1986)CrossRefGoogle Scholar
  7. 7.
    Cheng, K., Yap, R.: An mdd-based generalized arc consistency algorithm for positive and negative table constraints and some global constraints. Constraints 15 (2010)Google Scholar
  8. 8.
    Cheng, K.C.K., Yap, R.H.C.: Maintaining generalized arc consistency on ad hoc r-ary constraints. In: Stuckey, P.J. (ed.) CP 2008. LNCS, vol. 5202, pp. 509–523. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Gent, I., Jefferson, C., Miguel, I., Nightingale, P.: Data structures for generalised arc consistency for extensional constraints. In: Proc. AAAI 2007, Vancouver, Canada, pp. 191–197 (2007)Google Scholar
  10. 10.
    Hadzic, T., Hooker, J.N., O’Sullivan, B., Tiedemann, P.: Approximate Compilation of Constraints into Multivalued Decision Diagrams. In: Stuckey, P.J. (ed.) CP 2008. LNCS, vol. 5202, pp. 448–462. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Hoda, S., van Hoeve, W.-J., Hooker, J.N.: A systematic approach to MDD-based constraint programming. In: Cohen, D. (ed.) CP 2010. LNCS, vol. 6308, pp. 266–280. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  12. 12.
    Katsirelos, G., Walsh, T.: A compression algorithm for large arity extensional constraints. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 379–393. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  13. 13.
    Lecoutre, C.: Csp/maxcsp/wcsp solver competitions (2009),
  14. 14.
    Lecoutre, C.: Str2: optimized simple tabular reduction for table constraints. Constraints 16(4), 341–371 (2011)zbMATHMathSciNetCrossRefGoogle Scholar
  15. 15.
    Lecoutre, C., Likitvivatanavong, C., Yap, R.H.C.: A path-optimal gac algorithm for table constraints. In: ECAI, pp. 510–515 (2012)Google Scholar
  16. 16.
    Lhomme, O., Régin, J.-C.: A fast arc consistency algorithm for n-ary constraints. In: Proc. AAAI 2005, Pittsburgh, USA, pp. 405–410 (2005)Google Scholar
  17. 17.
    Lhomme, O.: Practical reformulations with table constraints. In: ECAI, pp. 911–912 (2012)Google Scholar
  18. 18.
    Mairy, J.-B., Van Hentenryck, P., Deville, Y.: Optimal and efficient filtering algorithms for table constraints. Constraints 19(1), 77–120 (2014)MathSciNetCrossRefGoogle Scholar
  19. 19.
    Mohr, R., Masini, G.: Good old discrete relaxation. In: Proceedings of ECAI 1988, pp. 651–656 (1988)Google Scholar
  20. 20.
    Régin, J.-C.: AC-*: A configurable, generic and adaptive arc consistency algorithm. In: van Beek, P. (ed.) CP 2005. LNCS, vol. 3709, pp. 505–519. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Régin, J.-C.: Improving the expressiveness of table constraints. In: CP 2011, Proceedings Workshop ModRef 2011 (2011)Google Scholar
  22. 22.
    Rice, M., Kulhari, S.: A survey of static variable ordering heuristics for efficient bdd/mdd construction. University of California, Tech. Rep. (2008)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Guillaume Perez
    • 1
  • Jean-Charles Régin
    • 1
  1. 1.Université Nice-Sophia Antipolis, I3S UMR 6070, CNRSFrance

Personalised recommendations