Abstract
In constraint programming the Alldifferent constraint is one of the oldest and most used global constraints. The algorithm by Régin enforces generalized arc-consistency, which is the strongest level of consistency for a single constraint. It is also the most time consuming despite several optimizations that were developed by others.
This paper parallelizes the Alldifferent generalized arc-consistent filtering algorithm, which is one of the first attempts for any global constraint. It does so by using a parallel graph search algorithm for two major parts of Régin’s algorithm: finding a maximum matching and finding the strongly connected components. Most effective known optimizations are also ported. Experiments solving a large N-queens problem or a resource constrained scheduling problem show that generalized arc-consistent filtering can be significantly sped-up on a 64-core shared-memory system and on a 200-core distributed-memory system. We discuss also several scenarios where this algorithm should be applied or not.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
AMD: Memory population guidelines for AMD EPYC processors. Tech. Rep. 56301, revision 1.1, Advanced Micro Devices (2018)
Azad, A., Buluç, A., Pothen, A.: Computing maximum cardinality matchings in parallel on bipartite graphs via tree-grafting. IEEE Trans. Parallel Distrib. Syst. 28(1), 44–59 (2016). https://doi.org/10.1109/TPDS.2016.2546258
Bessiere, C., Narodytska, N., Quimper, C.-G., Walsh, T.: The alldifferent constraint with precedences. In: Achterberg, T., Beck, J.C. (eds.) CPAIOR 2011. LNCS, vol. 6697, pp. 36–52. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21311-3_6
Bisseling, R.H.: Parallel Scientific Computing: A Structured Approach Using BSP. 2nd edn. Oxford University Press (2020)
Blelloch, G.E., Gu, Y., Shun, J., Sun, Y.: Parallelism in randomized incremental algorithms. In: Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, p. 467–478. SPAA 2016, Association for Computing Machinery, NY (2016). https://doi.org/10.1145/2935764.2935766
Briggs, P., Torczon, L.: An efficient representation for sparse sets. ACM Lett. Program. Lang. Syst. 2(1–4), 59–69 (1993). https://doi.org/10.1145/176454.176484
Campeotto, F., Dal Palù, A., Dovier, A., Fioretto, F., Pontelli, E.: Exploring the use of GPUs in constraint solving. In: Flatt, M., Guo, H.-F. (eds.) PADL 2014. LNCS, vol. 8324, pp. 152–167. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-04132-2_11
Cheriyan, J., Mehlhorn, K.: Algorithms for dense graphs and networks on the random access computer. Algorithmica 15(6), 521–549 (1996). https://doi.org/10.1007/BF01940880
Erbas, C., Tanik, M.M.: Generating solutions to the N-queens problem using 2-circulants. Math. Mag. 68(5), 343–356 (1995). http://www.jstor.org/stable/2690923
Gecode Team: Gecode: generic constraint development environment (2019). http://www.gecode.org
Gent, I.P., Miguel, I., Nightingale, P.: Generalised arc consistency for the alldifferent constraint: an empirical survey. Artif. Intell. 172(18), 1973–2000 (2008). https://doi.org/10.1016/j.artint.2008.10.006
Gent, I.P., et al.: A review of literature on parallel constraint solving. Theory Pract. Logic Program. 18(5–6), 725–758 (2018). https://doi.org/10.1017/S1471068418000340
Graham, R.L.: Bounds on multiprocessing timing anomalies. SIAM J. Appl. Math. 17(2), 416–429 (1969). https://doi.org/10.1137/0117039
Granvilliers, L., Hains, G.: A conservative scheme for parallel interval narrowing. Inf. Process. Lett. 74(3–4), 141–146 (2000). https://doi.org/10.1016/S0020-0190(00)00048-X
Hamadi, Y.: Optimal distributed arc-consistency. Constraints 7(3–4), 367–385 (2002). https://doi.org/10.1023/A:1020594125144
van Hoeve, W.-J.: The alldifferent constraint: a survey. CoRR cs.PL/0105015 (2001). https://arxiv.org/abs/cs/0105015
van Hoeve, W.-J., Katriel, I.: Global constraints. In: Rossi, F., van Beek, P., Walsh, T. (eds.) Handbook of Constraint Programming, Foundations of Artificial Intelligence, vol. 2, pp. 169–208. Elsevier (2006). https://doi.org/10.1016/S1574-6526(06)80010-6
Hopcroft, J.E., Karp, R.M.: A n5/2 algorithm for maximum matchings in bipartite. In: 12th Annual Symposium on Switching and Automata Theory, SWAT 1971, pp. 122–125 (1971). https://doi.org/10.1109/SWAT.1971.1
Huawei: Tecal RH2288H v2 rack server v100r002. Tech. rep., Huawei Technologies Co., Ltd. (2013), issue 01
Kasif, S.: On the parallel complexity of discrete relaxation in constraint satisfaction networks. Artif. Intell. 45(3), 275–286 (1990). https://doi.org/10.1016/0004-3702(90)90009-O
Van Kessel, P., Quimper, C.-G.: Filtering algorithms based on the word-ram model. In: Hoffmann, J., Selman, B. (eds.) Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence, 22–26 July 2012, Toronto, Ontario, AAAI Press (2012). http://www.aaai.org/ocs/index.php/AAAI/AAAI12/paper/view/5135
Leconte, M.: A bounds-based reduction scheme for constraints of difference. In: Second International Workshop on Constraint-Based Reasoning, Key West, FL, p. 19–28 (1996)
López-Ortiz, A., Quimper, C.-G., Tromp, J., van Beek, P.: A fast and simple algorithm for bounds consistency of the alldifferent constraint. In: Gottlob, G., Walsh, T. (eds.) IJCAI-03, Proceedings of the Eighteenth International Joint Conference on Artificial Intelligence, Acapulco, 9–15 August 2003, pp. 245–250. Morgan Kaufmann (2003). http://ijcai.org/Proceedings/03/Papers/036.pdf
Mehlhorn, K., Thiel, S.: Faster algorithms for bound-consistency of the sortedness and the alldifferent constraint. In: Dechter, R. (ed.) CP 2000. LNCS, vol. 1894, pp. 306–319. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-45349-0_23
Nguyen, T., Deville, Y.: A distributed arc-consistency algorithm. Sci. Comput. Program. 30(1–2), 227–250 (1998). https://doi.org/10.1016/S0167-6423(97)00012-9
Nightingale, P.: Are adjacency lists worthwhile in alldifferent. Tech. rep., Citeseer (2009)
Puget, J.: A fast algorithm for the bound consistency of alldiff constraints. In: Mostow, J., Rich, C. (eds.) Proceedings of the Fifteenth National Conference on Artificial Intelligence and Tenth Innovative Applications of Artificial Intelligence Conference, AAAI 98, IAAI 98, 26–30 July 1998, Madison, Wisconsin, pp. 359–366. AAAI Press/The MIT Press (1998). http://www.aaai.org/Library/AAAI/1998/aaai98-051.php
Régin, J.-C.: A filtering algorithm for constraints of difference in csps. In: Hayes-Roth, B., Korf, R.E. (eds.) Proceedings of the 12th National Conference on Artificial Intelligence, Seattle, WA, 31 July–4 August 1994, vol. 1, pp. 362–367. AAAI Press/The MIT Press (1994). http://www.aaai.org/Library/AAAI/1994/aaai94-055.php
Régin, J.-C., Malapert, A.: Parallel constraint programming. In: Handbook of Parallel Constraint Reasoning, pp. 337–379. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-63516-3_9
Rolf, C.C., Kuchcinski, K.: Parallel consistency in constraint programming. In: Arabnia, H.R. (ed.) Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications, PDPTA 2009, Las Vegas, Nevada, 13–17 July 2009, 2 vols, pp. 638–644. CSREA Press (2009)
Ruiz-Andino, A., Araujo, L., Sáenz-Pérez, F., Ruz, J.J.: Parallel arc-consistency for functional constraints. In: Sagonas, K. (ed.) Proceedings of the International Workshop on Implementation Technology for Programming Languages Based on Logic, held in conjunction with the Joint International Conference and Symposium on Logic Programming, Manchester, UK, 20 June 1998, pp. 86–100 (1998)
Suijlen, W.J.: BSPonMPI - BSPlib implementation on top MPI (2019). https://github.com/wijnand-suijlen/bsponmpi, version 1.1
Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972). https://doi.org/10.1137/0201010
Topcuoglu, H., Hariri, S., Wu, M.: Performance-effective and low-complexity task scheduling for heterogeneous computing. IEEE Trans. Parallel Distrib. Syst. 13(3), 260–274 (2002). https://doi.org/10.1109/71.993206
Valiant, L.G.: A bridging model for parallel computation. Commun. ACM 33(8), 103–111 (1990)
Yzelman, A.N., Bisseling, R.H., Roose, D., Meerbergen, K.: MulticoreBSP for C: a high-performance library for shared-memory parallel programming. Int. J. Parallel Prog. 42(4), 619–642 (2013). https://doi.org/10.1007/s10766-013-0262-9
Zhang, X., Li, Q., Zhang, W.: A fast algorithm for generalized arc consistency of the alldifferent constraint. In: Lang, J. (ed.) Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, 13–19 July 2018, Stockholm, Sweden, pp. 1398–1403. ijcai.org (2018). https://doi.org/10.24963/ijcai.2018/194
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Suijlen, W., de Framond, F., Lallouet, A., Petitet, A. (2022). A Parallel Algorithm for GAC Filtering of the Alldifferent Constraint. In: Schaus, P. (eds) Integration of Constraint Programming, Artificial Intelligence, and Operations Research. CPAIOR 2022. Lecture Notes in Computer Science, vol 13292. Springer, Cham. https://doi.org/10.1007/978-3-031-08011-1_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-08011-1_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-08010-4
Online ISBN: 978-3-031-08011-1
eBook Packages: Computer ScienceComputer Science (R0)