Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Eight queens puzzle
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Counting solutions for other sizes ''n''== ===Exact enumeration=== There is no known formula for the exact number of solutions for placing ''n'' queens on an {{math|''n'' Γ ''n''}} board i.e. the number of [[independent set (graph theory)|independent set]]s of size ''n'' in an {{math|''n'' Γ ''n''}} [[queen's graph]]. The 27Γ27 board is the highest-order board that has been completely enumerated.<ref>{{Cite web|url=https://github.com/preusser/q27|title=The Q27 Project|via=GitHub}}</ref> The following tables give the number of solutions to the ''n'' queens problem, both fundamental {{OEIS|id=A002562}} and all {{OEIS|id=A000170}}, for all known cases. {| class="wikitable" style="text-align:right;" !style="padding: 0em .5em;"|''n'' |fundamental |all |- !style="padding: 0em .5em;"|1 |1 |1 |- !style="padding: 0em .5em;"|2 |0 |0 |- !style="padding: 0em .5em;"|3 |0 |0 |- !style="padding: 0em .5em;"|4 |1 |2 |- !style="padding: 0em .5em;"|5 |2 |10 |- !style="padding: 0em .5em;"|6 |1 |4 |- !style="padding: 0em .5em;"|7 |6 |40 |- !style="padding: 0em .5em;"|8 |12 |92 |- !style="padding: 0em .5em;"|9 |46 |352 |- !style="padding: 0em .5em;"|10 |92 |724 |- !style="padding: 0em .5em;"|11 |341 |2,680 |- !style="padding: 0em .5em;"|12 |1,787 |14,200 |- !style="padding: 0em .5em;"|13 |9,233 |73,712 |- !style="padding: 0em .5em;"|14 |45,752 |365,596 |- !style="padding: 0em .5em;"|15 |285,053 |2,279,184 |- !style="padding: 0em .5em;"|16 |1,846,955 |14,772,512 |- !style="padding: 0em .5em;"|17 |11,977,939 |95,815,104 |- !style="padding: 0em .5em;"|18 |83,263,591 |666,090,624 |- !style="padding: 0em .5em;"|19 |621,012,754 |4,968,057,848 |- !style="padding: 0em .5em;"|20 |4,878,666,808 |39,029,188,884 |- !style="padding: 0em .5em;"|21 |39,333,324,973 |314,666,222,712 |- !style="padding: 0em .5em;"|22 |336,376,244,042 |2,691,008,701,644 |- !style="padding: 0em .5em;"|23 |3,029,242,658,210 |24,233,937,684,440 |- !style="padding: 0em .5em;"|24 |28,439,272,956,934 |227,514,171,973,736 |- !style="padding: 0em .5em;"|25 |275,986,683,743,434 |2,207,893,435,808,352 |- !style="padding: 0em .5em;"|26 |2,789,712,466,510,289 |22,317,699,616,364,044 |- !style="padding: 0em .5em;"|27 |29,363,495,934,315,694 |234,907,967,154,122,528 |} The number of placements in which furthermore no three queens lie on any straight line is known for <math>n \leq 25</math> {{OEIS|id=A365437}}. === Asymptotic enumeration === In 2021, Michael Simkin proved that for large numbers ''n'', the number of solutions of the ''n'' queens problem is approximately <math>(0.143n)^n</math>.<ref>{{Cite web|last=Sloman|first=Leila|date=2021-09-21|title=Mathematician Answers Chess Problem About Attacking Queens|url=https://www.quantamagazine.org/mathematician-answers-chess-problem-about-attacking-queens-20210921/|access-date=2021-09-22|website=Quanta Magazine|language=en}}</ref> More precisely, the number <math>\mathcal{Q}(n)</math> of solutions has [[asymptotic growth]] <math display="block"> \mathcal{Q}(n) = ((1 \pm o(1))ne^{-\alpha})^n </math> where <math>\alpha</math> is a constant that lies between 1.939 and 1.945.<ref>{{Cite arXiv|last=Simkin|first=Michael|author-link=Michael Simkin|date=2021-07-28|title=The number of $n$-queens configurations|class=math.CO|eprint=2107.13460v2|language=en}}</ref> (Here ''o''(1) represents [[little o notation]].) If one instead considers a [[flat torus|toroidal]] chessboard (where diagonals "wrap around" from the top edge to the bottom and from the left edge to the right), it is only possible to place ''n'' queens on an <math>n \times n</math> board if <math>n \equiv 1,5 \mod 6.</math> In this case, the asymptotic number of solutions is<ref>{{Cite arXiv|last=Luria|first=Zur|date=2017-05-15|title=New bounds on the number of n-queens configurations|class=math.CO|eprint=1705.05225v2|language=en}}</ref><ref>{{Cite arXiv|last1=Bowtell|first1=Candida|last2=Keevash|first2=Peter|authorlink2 = Peter Keevash|date=2021-09-16|title=The $n$-queens problem|class=math.CO|eprint=2109.08083v1|language=en}}</ref> <math display="block">T(n) = ((1+o(1))ne^{-3})^n.</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)