Putting Queens in Carry Chains, N o̱27
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.
KeywordsFPGA N-Queens Massively-parallel Hardware acceleration
- 1.BOINC - Open-source software for volunteer computing. Website: http://boinc.ssl.berkeley.edu/.
- 2.MC#. Website: http://www.mcsharp.net/.
- 3.nQueens: n = 25. Website: http://www-sop.inria.fr/oasis/ProActive2/apps/nqueens25.html.
- 4.NQueens@Home (finished). Website: http://www.rechenkraft.net/wiki/NQueens@Home_%28beendet%29.
- 5.Queens@TUD. Website: http://queens.inf.tu-dresden.de/.
- 6.DNK7_F5_PCIe Hardware Manual (2014). Website: http://www.dinigroup.com/product/data/DNK7_F5PCIe/files/Hardware_Manual_DNK7_F5_PCIe_REV4.pdf.
- 8.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.
- 9.Engelhardt, M. (2010). Der Stammbaum der Lösungen des Damenproblems, (pp. 68–71): Spektrum der Wissenschaft. http://www.spektrum.de/artikel/1037434&%5Fz=798888.
- 11.Jacobs, K., & Jungnickel, D. (1983). Einfürung in die Kombinatorik. Berlin: de Gruyter. In German.Google Scholar
- 13.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.Google Scholar
- 14.Knodel, O., & Spallek, R.G. (2015). RC3E: provision and management of reconfigurable hardware accelerators in a cloud environment. Tech. Rep. FSP/2015/0, CoRR.Google Scholar
- 15.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).Google Scholar
- 16.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).Google Scholar
- 18.Sloane, N.J.A. (2008). Erroneous duplicate of A000170. In The on-line encyclopedia of integer sequences , A140393.Google Scholar
- 19.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.Google Scholar
- 20.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.Google Scholar
- 21.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.Google Scholar