Skip to main content

Automatically Improving Constraint Models in Savile Row through Associative-Commutative Common Subexpression Elimination

  • Conference paper
Principles and Practice of Constraint Programming (CP 2014)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8656))

Abstract

When solving a problem using constraint programming, constraint modelling is widely acknowledged as an important and difficult task. Even a constraint modelling expert may explore many models and spend considerable time modelling a single problem. Therefore any automated assistance in the area of constraint modelling is valuable. Common sub-expression elimination (CSE) is a type of constraint reformulation that has proved to be useful on a range of problems. In this paper we demonstrate the value of an extension of CSE called Associative-Commutative CSE (AC-CSE). This technique exploits the properties of associativity and commutativity of binary operators, for example in sum constraints. We present a new algorithm, X-CSE, that is able to choose from a larger palette of common subexpressions than previous approaches. We demonstrate substantial gains in performance using X-CSE. For example on BIBD we observed speed increases of more than 20 times compared to a standard model and that using X-CSE outperforms a sophisticated model from the literature. For Killer Sudoku we found that X-CSE can render some apparently difficult instances almost trivial to solve, and we observe speed increases up to 350 times. For BIBD and Killer Sudoku the common subexpressions are not present in the initial model: an important part of our methodology is reformulations at the preprocessing stage, to create the common subexpressions for X-CSE to exploit. In summary we show that X-CSE, combined with preprocessing and other reformulations, is a powerful technique for automated modelling of problems containing associative and commutative constraints.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Araya, I., Neveu, B., Trombettoni, G.: Exploiting common subexpressions in numerical CSPs. In: Stuckey, P.J. (ed.) CP 2008. LNCS, vol. 5202, pp. 342–357. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  2. Beldiceanu, N., Simonis, H.: A constraint seeker: Finding and ranking global constraints from examples. In: Lee (ed.) [10], pp. 12–26

    Google Scholar 

  3. Bessiere, C., Cardon, S., Debruyne, R., Lecoutre, C.: Efficient algorithms for singleton arc consistency. Constraints 16(1), 25–53 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  4. Choi, C.W., Lee, J.H.M.: Solving the salinity control problem in a potable water system. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 33–48. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Frisch, A., Jefferson, C., Miguel, I.: CSPLib problem 035: Molnar’s problem, http://www.csplib.org/Problems/prob035

  6. Frisch, A.M., Jefferson, C., Miguel, I.: Constraints for breaking more row and column symmetries. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 318–332. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Frisch, A.M., Jefferson, C., Miguel, I.: Symmetry-breaking as a prelude to implied constraints: A constraint modelling pattern. In: Proc. 16th European Conference on Artificial Intelligence, ECAI 2004 (2004)

    Google Scholar 

  8. Frisch, A.M., Miguel, I., Walsh, T.: CGRASS: A system for transforming constraint satisfaction problems. In: O’Sullivan, B. (ed.) CologNet 2002. LNCS (LNAI), vol. 2627, pp. 15–30. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  9. Jefferson, C., Moore, N., Nightingale, P., Petrie, K.E.: Implementing logical connectives in constraint programming. Artificial Intelligence 174, 1407–1429 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  10. Lee, J. (ed.): CP 2011. LNCS, vol. 6876. Springer, Heidelberg (2011)

    MATH  Google Scholar 

  11. Mears, C., Niven, T., Jackson, M., Wallace, M.: Proving symmetries by model transformation. In: Lee (ed.) [10], pp. 591–605

    Google Scholar 

  12. Nightingale, P.: Savile Row, a constraint modelling assistant (2014), http://savilerow.cs.st-andrews.ac.uk/

    Google Scholar 

  13. Puget, J.F.: Constraint programming next challenge: Simplicity of use. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 5–8. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  14. Puget, J.F.: Symmetry breaking using stabilizers. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 585–599. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Rendl, A.: Effective Compilation of Constraint Models. Ph.D. thesis, University of St Andrews (2010)

    Google Scholar 

  16. Rendl, A., Miguel, I., Gent, I.P., Jefferson, C.: Automatically enhancing constraint model instances during tailoring. In: Bulitko, V., Beck, J.C. (eds.) SARA. AAAI (2009)

    Google Scholar 

  17. Smith, B.M.: Symmetry and search in a network design problem. In: Barták, R., Milano, M. (eds.) CPAIOR 2005. LNCS, vol. 3524, pp. 336–350. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  18. Stuckey, P.J., Tack, G.: MiniZinc with functions. In: Gomes, C., Sellmann, M. (eds.) CPAIOR 2013. LNCS, vol. 7874, pp. 268–283. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  19. Van Hentenryck, P.: The OPL Optimization Programming Language. MIT Press, Cambridge (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Nightingale, P., Akgün, Ö., Gent, I.P., Jefferson, C., Miguel, I. (2014). Automatically Improving Constraint Models in Savile Row through Associative-Commutative Common Subexpression Elimination. In: O’Sullivan, B. (eds) Principles and Practice of Constraint Programming. CP 2014. Lecture Notes in Computer Science, vol 8656. Springer, Cham. https://doi.org/10.1007/978-3-319-10428-7_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-10428-7_43

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-10427-0

  • Online ISBN: 978-3-319-10428-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics