, Volume 14, Issue 2, pp 273–292 | Cite as

New filtering algorithms for combinations of among constraints

  • Willem-Jan van Hoeve
  • Gilles Pesant
  • Louis-Martin Rousseau
  • Ashish Sabharwal


Several combinatorial problems, such as car sequencing and rostering, feature sequence constraints, restricting the number of occurrences of certain values in every subsequence of a given length. We present three new filtering algorithms for the sequence constraint, including the first that establishes domain consistency in polynomial time. The filtering algorithms have complementary strengths: One borrows ideas from dynamic programming; another reformulates it as a regular constraint; the last is customized. The last two algorithms establish domain consistency, and the customized one does so in polynomial time. We provide experimental results that demonstrate the practical usefulness of each. We also show that the customized algorithm applies naturally to a generalized version of the sequence constraint that allows subsequences of varied lengths. The significant computational advantage of using a single generalized sequence constraint over a semantically equivalent collection of among or sequence constraints is demonstrated empirically.


Sequence constraint Domain consistency Polynomial time filtering Car sequencing Regular constraint 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apt, K. (2003). Principles of constraint programming. Cambridge: Cambridge University Press.Google Scholar
  2. 2.
    Beldiceanu, N., & Carlsson, M. (2001). Revisiting the cardinality operator and introducing the cardinality-path constraint family. In P. Codognet (Ed.), Proceedings of the 17th international conference on logic programming (ICLP 2001), LNCS (Vol. 2237, pp. 59–73). New York: Springer.Google Scholar
  3. 3.
    Beldiceanu, N., Carlsson, M., & Rampon, J.-X. (2005). Global constraint catalog. Technical Report T2005-08, SICS.Google Scholar
  4. 4.
    Beldiceanu, N., & Contejean, E. (1994). Introducing global constraints in CHIP. Journal of Mathematical and Computer Modelling, 20(12), 97–123.zbMATHCrossRefGoogle Scholar
  5. 5.
    Dechter, R. (2003). Constraint processing. San Francisco: Morgan Kaufmann.Google Scholar
  6. 6.
    Demassey, S., Pesant, G., & Rousseau, L.-M. (2006). A cost-regular based hybrid column generation approach. Constraints, 11, 315–333.zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Dincbas, M., Simonis, H., & van Hentenryck, P. (1988). Solving the car-sequencing problem in constraint logic programming. In Y. Kodratoff (Ed.), Proceedings of the European conference on artificial intelligence (ECAI) (pp. 290–295).Google Scholar
  8. 8.
    Gent, I., & Walsh, T. (1999). CSPLib: A benchmark library for constraints. Technical report, TR APES-09-1999. at
  9. 9.
    Mohr, R., & Masini, G. (1988). Good old discrete relaxation. In European conference on artificial intelligence (ECAI) (pp. 651–656).Google Scholar
  10. 10.
    Pesant, G. (2004). A regular language membership constraint for finite sequences of variables. In M. Wallace (Ed.), Proceedings of the tenth international conference on principles and practice of constraint programming (CP 2004), Lecture Notes in Computer Science (Vol. 3258, pp. 482–495). New York: Springer.Google Scholar
  11. 11.
    Régin, J.-C. (1996). Generalized arc consistency for global cardinality constraint. In Proceedings of the thirteenth national conference on artificial intelligence and eighth innovative applications of artificial intelligence conference (AAAI / IAAI) (Vol. 1, pp. 209–215). Cambridge: AAAI/MIT Press.Google Scholar
  12. 12.
    Régin, J.-C. (2005). Combination of among and cardinality constraints. In R. Barták, & M. Milano (Eds.), Proceedings of the second international conference on integration of AI and OR techniques in constraint programming for combinatorial optimization problems (CP-AI-OR 2005), lecture notes in computer science (Vol. 3524, pp. 288–303). New York: Springer.Google Scholar
  13. 13.
    Régin, J.-C., & Puget, J.-F. (1997). A filtering algorithm for global sequencing constraints. In G. Smolka (Ed.), Proceedings of the third international conference on principles and practice of constraint programming (CP97), LNCS (Vol. 1330, pp. 32–46). New York: Springer.CrossRefGoogle Scholar
  14. 14.
    Trick, M. (2003). A dynamic programming approach for consistency and propagation for knapsack constraints. Annals of Operations Research, 118, 73–84.zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    van Hoeve, W.-J., Pesant, G., Rousseau, L.-M., & Sabharwal, A. (2006). Revisiting the sequence constraint. In CP-06: 12th international conference on principles and practice of constraint programming, lecture notes in computer science (Vol. 4204, pp. 620–634). Nantes, France, September.Google Scholar
  16. 16.
    Zemmouri, T., Chan, P., Hiroux, M., & Weil, G. (2004). Multiple-level models: An application to employee timetabling. In E. K. Burke, & M. Trick (Eds.), Proceedings of the 5th international conference on the practice and theory of automated timetabling (PATAT’04) (pp. 397–412).Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • Willem-Jan van Hoeve
    • 1
  • Gilles Pesant
    • 2
    • 3
  • Louis-Martin Rousseau
    • 2
    • 3
    • 4
  • Ashish Sabharwal
    • 5
  1. 1.Tepper School of BusinessCarnegie Mellon UniversityPittsburghUSA
  2. 2.École Polytechnique de MontréalMontrealCanada
  3. 3.CIRRELTUniversité de MontréalMontrealCanada
  4. 4.Oméga Optimisation Inc.MontrealCanada
  5. 5.Department of Computer ScienceCornell UniversityIthacaUSA

Personalised recommendations