Abstract
Matrix models are ubiquitous for constraint problems. Many such problems have a matrix of variables \(\mathcal{M}\), with the same constraint C 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 also provide a domain consistency filtering algorithm for the conjunction of lexicographic ordering constraints between adjacent rows of \(\mathcal{M}\) and (possibly different) automaton constraints on the rows. We evaluate the impact of our methods in terms of runtime and search effort on a large set of nurse rostering problem instances.
Similar content being viewed by others
References
Beeri, C., Fagin, R., Maier, D., Yannakakis, M. (1983). On the desirability of acyclic database schemes. Journal of the ACM, 30, 479–513.
Beldiceanu, N., Carlsson, M., Flener, P., Pearson, J. (2010). On matrices, automata, and double counting. In: A. Lodi, M. Milano, P. Toth (Eds.), CPAIOR 2010, LNCS (vol. 6140, pp. 10–24). Springer.
Beldiceanu, N., Carlsson, M., Petit, T. (2004). Deriving filtering algorithms from constraint checkers. In: M.G. Wallace (Ed.), CP 2004, LNCS (vol. 3258, pp. 107–122). Springer.
Beldiceanu, N., Carlsson, M., Rampon, J.X. (2012). Global constraint catalog, 2nd edition (revision a). Tech. Rep. T2012:03. Swedish Institute of Computer Science. Available at http://soda.swedish-ict.se/5195/. The current working version of the catalogue is at http://www.emn.fr/z-info/sdemasse/aux/doc/catalog.pdf.
Bessière, C., Hebrard, E., Hnich, B., Kızıltan, Z., Walsh, T. (2008). SLIDE: A useful special case of the CARDPATH constraint. In: M. Ghallab, et al. (Eds.), ECAI 2008 (pp. 475–479). IOS Press.
Brand, S., Narodytska, N., Quimper, C.G., Stuckey, P.J., Walsh, T. (2007). Encodings of the sequence constraint. In: C. Bessière (Ed.), CP 2007, LNCS (vol. 4741, pp. 210–224). Springer.
Carlsson, M., Beldiceanu, N. (2002). Arc-consistency for a chain of lexicographic ordering constraints. Tech. Rep. T2002-18. Swedish Institute of Computer Science. ftp://ftp.sics.se/pub/SICS-reports/Reports/SICS-T-2002-18-SE.ps.Z.
Carlsson, M., et al. (2007). SICStus Prolog User’s Manual. Swedish Institute of Computer Science, 4.0 edition. http://www.sics.se/sicstus/.
Côté, M.C., Gendron, B., Rousseau, L.M. (2007). Modeling the regular constraint with integer programming. In: P. Van Hentenryck, L. Wolsey (Eds.), CPAIOR 2007, LNCS (vol. 4150, pp. 29–43). Springer.
Flener, P., Frisch, A.M., Hnich, B., Kızıltan, Z., Miguel, I., Pearson, J., Walsh, T. (2002). Breaking row and column symmetries in matrix models. In: P. Van Hentenryck (Ed.), CP 2002, LNCS (vol. 2470, pp. 462–476). Springer.
Frisch, A.M., Hnich, B., Kızıltan, Z., Miguel, I., Walsh, T. (2002). Global constraints for lexicographic orderings. In: P. Van Hentenryck (Ed.), CP 2002, LNCS (vol. 2470, pp. 93–108). Springer.
Frisch, A.M., Hnich, B., Kızıltan, Z., Miguel, I., Walsh, T. (2006). Propagation algorithms for lexicographic ordering constraints. Artificial Intelligence, 170(10), 803–834.
Frisch, A.M., Jefferson, C., Miguel, I. (2003). Constraints for breaking more row and column symmetries. In: F. Rossi (Ed.), CP 2003, LNCS (vol. 2833, pp. 318–332). Springer.
de Haan, R., Narodytska, N., Walsh, T. (2012). The RegularGcc matrix constraint. CoRR abs/1201.0564.
Jukna, S. (2001). Extremal combinatorics. Springer.
Law, Y.C., Lee, J.H.M. (2004). Global constraints for integer and set value precedence. In: M.G. Wallace (Ed.), CP 2004, LNCS (vol. 3258, pp. 362–376). Springer.
Menana, J., Demassey, S. (2009). Sequencing and counting with the multicost-regular constraint. In: W.J. van Hoeve, J.N. Hooker (Eds.), CPAIOR 2009, LNCS (vol. 5547, pp. 178–192). Springer.
Métivier, J.P., Boizumault, P., Loudni, S. (2009). Solving nurse rostering problems using soft global constraints. In: I.P. Gent (Ed.), CP 2009, LNCS (vol. 5732, pp. 73–87). Springer.
Pesant, G. (2004). A regular language membership constraint for finite sequences of variables. In: M.G. Wallace (Ed.), CP 2004, LNCS (vol. 3258, pp. 482–495). Springer.
Régin, J.C., Gomes, C. (2004). The cardinality matrix constraint. In: M.G. Wallace (Ed.), CP 2004, LNCS (vol. 3258, pp. 572–587). Springer.
Vanhoucke, M., Maenhout, B. (2009). On the characterization and generation of nurse scheduling problem instances. European Journal of Operational Research, 196(2), 457–467. NSPLib is at http://www.projectmanagement.ugent.be/nsp.php.
Author information
Authors and Affiliations
Corresponding author
Additional information
This paper extends a prior version published as [2].
Rights and permissions
About this article
Cite this article
Beldiceanu, N., Carlsson, M., Flener, P. et al. On matrices, automata, and double counting in constraint programming. Constraints 18, 108–140 (2013). https://doi.org/10.1007/s10601-012-9134-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10601-012-9134-y