Skip to main content
Log in

Putting Queens in Carry Chains, No̱27

  • Published:
Journal of Signal Processing Systems Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16

Similar content being viewed by others

Notes

  1. The original website at http://nqueens.ing.udec.cl/ has been abolished.

  2. For a proof, see Kerber [12] or Jacobs [11].

  3. https://github.com/preusser/q27.

  4. http://www.boost.org/.

  5. https://github.com/VLSI-EDA/PoC.

  6. https://github.com/preusser/q27.

References

  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.

  7. 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.

    Article  MathSciNet  MATH  Google Scholar 

  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.

  10. 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.

    Article  MathSciNet  MATH  Google Scholar 

  11. Jacobs, K., & Jungnickel, D. (1983). Einfürung in die Kombinatorik. Berlin: de Gruyter. In German.

    Google Scholar 

  12. Kerber, A. (1999). Applied finite group actions. Berlin: Springer.

    Book  MATH  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.

  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.

  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).

  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).

  17. Rivin, I., Vardi, I., & Zimmerman, P. (1994). The n-queens problem. The American Mathematical Monthly, 101(7), 629–639. doi:10.2307/2974691.

    Article  MathSciNet  MATH  Google Scholar 

  18. Sloane, N.J.A. (2008). Erroneous duplicate of A000170. In The on-line encyclopedia of integer sequences [20], A140393.

  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.

  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.

  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.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Thomas B. Preußer.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11265-016-1176-8

Keywords

Navigation