Skip to main content

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

Abstract

A wide range of constraints can be specified using automata or formal languages. The Grammar constraint restricts the values taken by a sequence of variables to be a string from a given context-free language. Based on an AND/OR decomposition, we show that this constraint can be converted into clauses in conjunctive normal form without hindering propagation. Using this decomposition, we can propagate the Grammar constraint in O(n 3) time. The decomposition also provides an efficient incremental propagator. Down a branch of the search tree of length k, we can enforce GAC k times in the same O(n 3) time. On specialized languages, running time can be even better. For example, propagation of the decomposition requires just O(n|δ|) time for regular languages where |δ| is the size of the transition table of the automaton recognizing the regular language. Experiments on a shift scheduling problem with a constraint solver and a state of the art SAT solver show that we can solve problems using this decomposition that defeat existing constraint solvers.

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. Pesant, G.: A regular language membership constraint for finite sequences of variables. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 295–482. Springer, Heidelberg (2004)

    Google Scholar 

  2. Quimper, C.-G., Walsh, T.: Global grammar constraints. In: Benhamou, F. (ed.) CP 2006. LNCS, vol. 4204. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  3. Sellmann, M.: The theory of grammar constraints. In: Benhamou, F. (ed.) CP 2006. LNCS, vol. 4204, pp. 530–544. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  4. Demassey, S., Pesant, G., Rousseau, L.: A cost-regular based hybrid column generation approach. Constraints 11, 315–333 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  5. Eén, N., Sörensso, N.: Translating pseudo-Boolean constraints into SAT. Journal on Satisfiability, Boolean Modelling and Computation 2, 1–26 (2006)

    MATH  Google Scholar 

  6. Vempaty, N.R.: Solving constraint satisfaction problems using finite state automata. In: 10th National Conf. on AI, pp. 453–458. AAAI, Stanford, California, USA (1992)

    Google Scholar 

  7. Amilhastre, J.: Representation par automate d’ensemble de solutions de problèmes de satsifaction de contraintes. PhD thesis, Universite Montpellier II / CNRS, LIRMM (1999)

    Google Scholar 

  8. Amilhastre, J., Fargier, H., Marquis, P.: Consistency restoration and explanations in dynamic CSPs - application to configuration. Artificial Intelligence 135, 199–234 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  9. Boigelot, B., Wolper, P.: Representing arithmetic constraints with finite automata: An overview. In: Van Hentenryck, P. (ed.) CP 2002. LNCS, vol. 2470, pp. 1–19. Springer, Heidelberg (2002)

    Google Scholar 

  10. Beldiceanu, N., Carlsson, M., Petit, T.: Deriving filtering algorithms from constraint checkers. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 107–122. Springer, Heidelberg (2004)

    Google Scholar 

  11. Côté, M.C., Gendron, B., Rousseau, L.M.: The regular constraint for integer programming modeling. In: 4th Int. Conf. on Integration of AI and OR Techniques in Constraint Programming (CPAIOR 2007), pp. 29–43 (2007)

    Google Scholar 

  12. Golden, K., Pang, W.: Constraint reasoning over strings. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 377–391. Springer, Heidelberg (2003)

    Google Scholar 

  13. Moskewicz, M., Madigan, C., Zhao, Y., Zhang, L., Malik, S.: CHAFF: engineering an efficient SAT solver. In: Proc. of the 38th Design Automation Conf (DAC 2001), pp. 530–535 (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Christian Bessière

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Quimper, CG., Walsh, T. (2007). Decomposing Global Grammar Constraints. In: Bessière, C. (eds) Principles and Practice of Constraint Programming – CP 2007. CP 2007. Lecture Notes in Computer Science, vol 4741. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74970-7_42

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74970-7_42

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74969-1

  • Online ISBN: 978-3-540-74970-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics