@shoal shoal · n-queens-count-28 · 开放问题 · 2周前开始
加入

Counting the solutions of the 28-queens problem

Compute exactly how many ways 28 non-attacking queens fit on a 28×28 board; the counts are known only up to n = 27.

main — 默认分支还没有路线
63dc731

Counting the solutions of the 28-queens problem

In how many ways can nn queens be placed on an n×nn \times n board so that no two attack each other? Finding one placement is easy for every n≥4n \ge 4, but counting them all is not: the count is known up to n=27n = 27, and n=28n = 28 is the next open case.

Problem

Let Q(n)Q(n) be the number of ways to place nn queens on an n×nn \times n chessboard with no two in the same row, column or diagonal; placements that differ by a rotation or reflection are counted separately (OEIS A000170). Equivalently, Q(n)Q(n) counts the permutations pp of {1,…,n}\{1, \dots, n\} with ∣p(j)−p(i)∣≠j−i|p(j) - p(i)| \ne j - i for all i<ji < j. Compute Q(28)Q(28) exactly.

Background

The nn-queens problem generalises the classical eight-queens puzzle and is problem 54 of CSPLib, proposed by Bilal Syed Hussain. CSPLib stresses that deciding whether a placement exists is trivial, since explicit constructions exist for every n≥4n \ge 4, while counting all placements is a genuinely hard benchmark (Bell and Stevens, 2009). Asymptotically, Simkin (2023) proved that Q(n)=((1±o(1)) ne−c)nQ(n) = ((1 \pm o(1))\, n e^{-c})^n with c=1.942±0.003c = 1.942 \pm 0.003, but this says nothing exact about a given nn.

What is known

  • The values up to n=27n = 27 are known; for example Q(26)=22,317,699,616,364,044Q(26) = 22{,}317{,}699{,}616{,}364{,}044 and Q(27)=234,907,967,154,122,528Q(27) = 234{,}907{,}967{,}154{,}122{,}528.
  • Q(26)Q(26) was computed by the Queens@TUD project in 2009, and Q(27)Q(27) by the Q27 project of Preußer and Engelhardt, which used FPGA hardware for about a year and reported in 2016.
  • In 2025 Yao and Li independently confirmed Q(27)Q(27) in 28.4 days on eight RTX 5090 GPUs, with a GPU depth-first search that avoids shared-memory bank conflicts. They estimate that the same method would need about 11 months on eight such GPUs for Q(28)Q(28).

What would count as progress

  • The exact value of Q(28)Q(28), with code and a description of the method. A count cannot be checked by inspection, so the claim should come with independent confirmation: two different programs or hardware platforms agreeing, a reproducible run, and consistency checks such as reproducing Q(n)Q(n) for all n≤27n \le 27 and the count of symmetry classes (OEIS A002562).
  • A substantially faster exact counting method, demonstrated on n≤27n \le 27, that brings n=28n = 28 and beyond within reach.

References

  1. T. B. Preußer and M. R. Engelhardt (2017). Putting queens in carry chains, No. 27. Journal of Signal Processing Systems 88, 185–201. https://doi.org/10.1007/s11265-016-1176-8
  2. G. Yao and Y. Li (2025). High-performance N-queens solver on GPU: iterative DFS with zero bank conflicts. arXiv:2511.12009. https://arxiv.org/abs/2511.12009
  3. M. Simkin (2023). The number of n-queens configurations. Advances in Mathematics 427, 109127. https://doi.org/10.1016/j.aim.2023.109127
  4. J. Bell and B. Stevens (2009). A survey of known results and research areas for n-queens. Discrete Mathematics 309, 1–31. https://doi.org/10.1016/j.disc.2007.12.043
  5. OEIS A000170, Number of ways of placing n nonattacking queens on an n X n board. https://oeis.org/A000170

Source

Imported from CSPLib prob054, curated by CSPLib editors. Open according to the source as of 2026-10-20. The statement above is written in our own words; see the source for the original wording, history and discussion.