Abstract
The N-Queens Puzzle is a fascinating combinatorial problem. Up to now, the number of distinct valid placements of N non-attacking queens on a generalized N × N chessboard cannot be computed by a formula. The computation of these numbers is instead based on an exhaustive search whose complexity grows dramatically with the problem size N. Solutions counts are currently known for all N up to 26. The parallelization of the search for solutions is embarrassingly simple. It is achieved by pre-placing the queens within a certain board region. These pre-placements partition the search space. The chosen extent of the pre-placement allows for a wide range of the partitioning granularity. This ease of partitioning makes the N-Queens Puzzle a great show-off case for tremendously parallel computation approaches and a flexible benchmark for parallel compute resources. This article presents the Q27 Project, an open-source effort targeting the computation of the solution count of the 27-Queens Puzzle. It is the first undertaking pushing the frontier of the N-Queens Puzzle that exploits the complete symmetry group D 4 of the square. This reduces the overall computational complexity already to an eighth in comparison to a naive exploration of the whole search space. This article details the coronal pre-placement that enables the partitioning of the overall search under this approach. With respect to the physical implementation of the computation, it describes the hardware structure that explores the resulting subproblems efficiently by exploiting bit-level operations and their mapping to FPGA devices as well as the infrastructure that organizes the contributing devices in a distributed computation. The performance of several FPGA platforms is evaluated using the Q27 computation as a benchmark, and some intriguing observations obtained from the available partial solutions are presented. Finally, an estimate on the remaining run time and on the expected magnitude of the final result is dared.
Similar content being viewed by others
Notes
The original website at http://nqueens.ing.udec.cl/ has been abolished.
References
BOINC - Open-source software for volunteer computing. Website: http://boinc.ssl.berkeley.edu/.
MC#. Website: http://www.mcsharp.net/.
nQueens: n = 25. Website: http://www-sop.inria.fr/oasis/ProActive2/apps/nqueens25.html.
NQueens@Home (finished). Website: http://www.rechenkraft.net/wiki/NQueens@Home_%28beendet%29.
Queens@TUD. Website: http://queens.inf.tu-dresden.de/.
DNK7_F5_PCIe Hardware Manual (2014). Website: http://www.dinigroup.com/product/data/DNK7_F5PCIe/files/Hardware_Manual_DNK7_F5_PCIe_REV4.pdf.
Bell, J., & Stevens, B. (2009). A survey of known results and research areas for n-queens. Discrete Mathematics, 309(1), 1–31. doi:10.1016/j.disc.2007.12.043.
Dijkstra, E.W. (1971). The problem of eight queens. In A short introduction to the art of programming, chap. 9. https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD316.9.html.
Engelhardt, M. (2010). Der Stammbaum der Lösungen des Damenproblems, (pp. 68–71): Spektrum der Wissenschaft. http://www.spektrum.de/artikel/1037434&%5Fz=798888.
Engelhardt, M.R. (2007). A group-based search for solutions of the n-queens problem. Discrete Mathematics, 307(21), 2535–2551. doi:10.1016/j.disc.2007.01.
Jacobs, K., & Jungnickel, D. (1983). Einfürung in die Kombinatorik. Berlin: de Gruyter. In German.
Kerber, A. (1999). Applied finite group actions. Berlin: Springer.
Kise, K., Katagiri, T., Honda, H., & Yuba, T. (2004). Solving the 24-Queens problem using MPI on a PC cluster. Tech. Rep. UEC-IS-200, The University of Electro-Communications.
Knodel, O., & Spallek, R.G. (2015). RC3E: provision and management of reconfigurable hardware accelerators in a cloud environment. Tech. Rep. FSP/2015/0, CoRR.
Preußer, T.B., Nägel, B., & Spallek, R.G. (2009). Putting queens in carry chains. In 3rd HIPEAC workshop on reconfigurable computing (pp. 83–92).
Preußer, T.B., & Spallek, R.G. (2009). Mapping basic prefix computations to fast carry-chain structures. In IEEE (ed.) international conference on field programmable logic and applications (FPL) (pp. 604–608).
Rivin, I., Vardi, I., & Zimmerman, P. (1994). The n-queens problem. The American Mathematical Monthly, 101(7), 629–639. doi:10.2307/2974691.
Sloane, N.J.A. (2008). Erroneous duplicate of A000170. In The on-line encyclopedia of integer sequences [20], A140393.
Sloane, N.J.A. (2005). Number of ways of arranging 2n+1 nonattacking queens on a 2n+1×2n+1 toroidal board. In The on-line encyclopedia of integer sequences, A007705.
Sloane, N.J.A. (2009). Number of ways of placing n nonattacking queens on n × n board. In The on-line encyclopedia of integer sequences, A000170.
Zhang, T., Shu, W., & Wu, M.Y. (2011). Optimization of n-queens solvers on graphics processors. In Advanced parallel processing technologies (pp. 142–156): Springer.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Preußer, T.B., Engelhardt, M.R. Putting Queens in Carry Chains, No̱27. J Sign Process Syst 88, 185–201 (2017). https://doi.org/10.1007/s11265-016-1176-8
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11265-016-1176-8