, Volume 19, Issue 1, pp 30–56 | Cite as

An optimal arc consistency algorithm for a particular case of sequence constraint

  • Mohamed Siala
  • Emmanuel Hebrard
  • Marie-José Huguet


The AtMostSeqCard constraint is the conjunction of a cardinality constraint on a sequence of n variables and of n − q + 1 constraints AtMost u on each subsequence of size q. This constraint is useful in car-sequencing and crew-rostering problems. In van Hoeve et al. (Constraints 14(2):273–292, 2009), two algorithms designed for the AmongSeq constraint were adapted to this constraint with an O(2 q n) and O(n 3) worst case time complexity, respectively. In Maher et al. (2008), another algorithm similarly adaptable to filter the AtMostSeqCard constraint with a time complexity of O(n 2) was proposed. In this paper, we introduce an algorithm for achieving arc consistency on the AtMostSeqCard constraint with an O(n) (hence optimal) worst case time complexity. Next, we show that this algorithm can be easily modified to achieve arc consistency on some extensions of this constraint. In particular, the conjunction of a set of m AtMostSeqCard constraints sharing the same scope can be filtered in O(nm). We then empirically study the efficiency of our propagator on instances of the car-sequencing and crew-rostering problems.


Sequencing constraints Filtering algorithm Arc consistency Car sequencing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Beldiceanu, N., & Carlsson, M. (2001). Revisiting the cardinality operator and introducing the cardinality-path constraint family. In ICLP (pp. 59–73).Google Scholar
  2. 2.
    Beldiceanu, N., & Contejean, E. (1994). Introducing global constraints in CHIP. Mathematical Computation Modelling, 20(12), 97–123.CrossRefzbMATHGoogle Scholar
  3. 3.
    Bessiere, C., Hebrard, E., Hnich, B., Kiziltan, Z., Walsh, T. (2006). The slide meta-constraint. In CPAI workshop, held alongside CP.Google Scholar
  4. 4.
    Bessiere, C., Hebrard, E., Hnich, B., Kiziltan, Z., Walsh, T. (2008). Slide: A useful special case of the cardpath constraint. In ECAI (pp. 475–479).Google Scholar
  5. 5.
    Brand, S., Narodytska, N., Quimper, C.-G., Stuckey, P.J., Walsh, T. (2007). Encodings of the sequence constraint. In CP (pp. 210–224).Google Scholar
  6. 6.
    Demassey, S., Pesant, G., Rousseau, L.-M. (2006). A cost-regular based hybrid column generation approach. Constraints, 11(4), 315–333.CrossRefzbMATHMathSciNetGoogle Scholar
  7. 7.
    Dincbas, M., Simonis, H., Van Hentenryck, P. (1988). Solving the car-sequencing problem in constraint logic programming. In ECAI (pp. 290–295).Google Scholar
  8. 8.
    Gent, I.P., & Walsh, T. (1999). CSPLib: a benchmark library for constraints. In CP (pp. 480–481).Google Scholar
  9. 9.
    Hindi, K.-S., & Ploszajski, G. (1994). Formulation and solution of a selection and sequencing problem in car manufacture. Computers & Industrial Engineering, 26(1), 203–211.CrossRefGoogle Scholar
  10. 10.
    Maher, M.J., Narodytska, N., Quimper, C.-G., Walsh, T. (2008). Flow-based propagators for the Sequence and related global constraints. In CP (pp. 159–174).Google Scholar
  11. 11.
    Menana, J., & Demassey, S. (2009). Sequencing and counting with the multicost-regular constraint. In CPAIOR (pp. 178–192).Google Scholar
  12. 12.
    Perron, L., & Shaw, P. (2004). Combining forces to solve the car sequencing problem. In CPAIOR (pp. 225–239).Google Scholar
  13. 13.
    Perron, L., Shaw, P., Furnon, V. (2004). Propagation guided large neighborhood search. In CP (pp. 468–481).Google Scholar
  14. 14.
    Pesant, G. (2004). A regular language membership constraint for finite sequences of variables. In CP (pp. 482–495).Google Scholar
  15. 15.
    Pesant, G. (2008) Constraint-based rostering. In PATAT.Google Scholar
  16. 16.
    Régin, J.-C. (1996). Generalized arc consistency for global cardinality constraint. In AAAI (pp. 209–215)Google Scholar
  17. 17.
    Régin, J.-C., & Puget, J.-F. (1997). A filtering algorithm for global sequencing constraints. In CP (pp. 32–46).Google Scholar
  18. 18.
    Siala, M., Hebrard, E., Huguet, M.-J. (2012). A study of branching heuristics for the car-sequencing problem. In SSNOW workshop, held alongside CPAIOR.Google Scholar
  19. 19.
    Smith, B.M. (1997). Succeed-first or fail-first: a case study in variable and value ordering. In PACT (pp. 321–330).Google Scholar
  20. 20.
    Solnon, C., Cung, V., Nguyen, A., Artigues, C. (2008). The car sequencing problem: overview of state-of-the-art methods and industrial case-study of the ROADEF’2005 challenge problem. EJOR, 191, 912–927.CrossRefzbMATHMathSciNetGoogle Scholar
  21. 21.
    van Hoeve, W.J., Pesant, G., Rousseau, L.-M., Sabharwal, A. (2009). New filtering algorithms for combinations of among constraints. Constraints, 14(2), 273–292.CrossRefzbMATHMathSciNetGoogle Scholar
  22. 22.
    van Hoeve, W.J., Pesant, G., Rousseau, L.-M., Sabharwal, A. (2006). Revisiting the sequence constraint. In CP (pp. 620–634).Google Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  • Mohamed Siala
    • 1
    • 2
  • Emmanuel Hebrard
    • 1
    • 3
  • Marie-José Huguet
    • 1
    • 2
  1. 1.CNRSLAASToulouseFrance
  2. 2.Univ de Toulouse, INSA, LAASToulouseFrance
  3. 3.Univ de Toulouse, LAASToulouseFrance

Personalised recommendations