Advertisement

Journal of Signal Processing Systems

, Volume 88, Issue 2, pp 185–201 | Cite as

Putting Queens in Carry Chains, N o̱27

  • Thomas B. Preußer
  • Matthias R. Engelhardt
Article

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.

Keywords

FPGA N-Queens Massively-parallel Hardware acceleration 

References

  1. 1.
    BOINC - Open-source software for volunteer computing. Website: http://boinc.ssl.berkeley.edu/.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
    Queens@TUD. Website: http://queens.inf.tu-dresden.de/.
  6. 6.
  7. 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.MathSciNetCrossRefzbMATHGoogle Scholar
  8. 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. 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. 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.MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Jacobs, K., & Jungnickel, D. (1983). Einfürung in die Kombinatorik. Berlin: de Gruyter. In German.Google Scholar
  12. 12.
    Kerber, A. (1999). Applied finite group actions. Berlin: Springer.CrossRefzbMATHGoogle Scholar
  13. 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. 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. 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. 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
  17. 17.
    Rivin, I., Vardi, I., & Zimmerman, P. (1994). The n-queens problem. The American Mathematical Monthly, 101(7), 629–639. doi: 10.2307/2974691.MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Sloane, N.J.A. (2008). Erroneous duplicate of A000170. In The on-line encyclopedia of integer sequences [20], A140393.Google Scholar
  19. 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. 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. 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

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.Department of Computer ScienceTU DresdenDresdenGermany
  2. 2.Lino GmbHNürnbergGermany

Personalised recommendations