Matrix models are ubiquitous for constraint problems. Many such problems have a matrix of variables \(\mathcal{M}\), with the same constraint defined by a finite-state automaton \(\mathcal{A}\) on each row of \(\mathcal{M}\) and a global cardinality constraint \({\mathit{gcc}}\) on each column of \(\mathcal{M}\). We give two methods for deriving, by double counting, necessary conditions on the cardinality variables of the \({\mathit{gcc}}\) constraints from the automaton \(\mathcal{A}\). The first method yields linear necessary conditions and simple arithmetic constraints. The second method introduces the cardinality automaton, which abstracts the overall behaviour of all the row automata and can be encoded by a set of linear constraints. We evaluate the impact of our methods on a large set of nurse rostering problem instances.


  1. 1.
    Beeri, C., Fagin, R., Maier, D., Yannakakis, M.: On the desirability of acyclic database schemes. Journal of the ACM 30, 479–513 (1983)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    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
  3. 3.
    Beldiceanu, N., Carlsson, M., Rampon, J.-X.: Global constraint catalog. Technical Report T2005-08, Swedish Institute of Computer Science (2005), The current working version is at: www.emn.fr/x-info/sdemasse/gccat/doc/catalog.pdf
  4. 4.
    Bessière, C., Hebrard, E., Hnich, B., Kiziltan, Z., Walsh, T.: SLIDE: A useful special case of the CARDPATH constraint. In: ECAI 2008, pp. 475–479. IOS Press, Amsterdam (2008)Google Scholar
  5. 5.
    Brand, S., Narodytska, N., Quimper, C.-G., Stuckey, P.J., Walsh, T.: Encodings of the sequence constraint. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 210–224. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Côté, M.-C., Gendron, B., Rousseau, L.-M.: Modeling the regular constraint with integer programming. In: Van Hentenryck, P., Wolsey, L.A. (eds.) CPAIOR 2007. LNCS, vol. 4510, pp. 29–43. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Flener, P., Frisch, A.M., Hnich, B., Kiziltan, Z., Miguel, I., Pearson, J., Walsh, T.: Breaking row and column symmetries in matrix models. In: Van Hentenryck, P. (ed.) CP 2002. LNCS, vol. 2470, pp. 462–476. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  8. 8.
    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)Google Scholar
  9. 9.
    Jukna, S.: Extremal Combinatorics. Springer, Heidelberg (2001)MATHGoogle Scholar
  10. 10.
    Menana, J., Demassey, S.: Sequencing and counting with the multicost-regular constraint. In: van Hoeve, W.-J., Hooker, J.N. (eds.) CPAIOR 2009. LNCS, vol. 5547, pp. 178–192. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Métivier, J.-P., Boizumault, P., Loudni, S.: Solving nurse rostering problems using soft global constraints. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 73–87. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  12. 12.
    Pesant, G.: A regular language membership constraint for finite sequences of variables. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 482–495. Springer, Heidelberg (2004)Google Scholar
  13. 13.
    Régin, J.-C., Gomes, C.: The cardinality matrix constraint. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 572–587. Springer, Heidelberg (2004)Google Scholar
  14. 14.
    Vanhoucke, M., Maenhout, B.: On the characterization and generation of nurse scheduling problem instances. European Journal of Operational Research 196(2), 457–467 (2009); NSPLib is at: www.projectmanagement.ugent.be/nsp.php Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Nicolas Beldiceanu
    • 1
  • Mats Carlsson
    • 2
  • Pierre Flener
    • 3
  • Justin Pearson
    • 3
  1. 1.Mines de Nantes, LINA UMR CNRS 6241NantesFrance
  2. 2.SICSKistaSweden
  3. 3.Department of Information TechnologyUppsala UniversitySweden

Personalised recommendations