CSP Queens - Analysis Of The N-Queens Puzzle
Table Of First-Solutions

This is just one of many pages from my analysis of the N-Queens puzzle, on which I've worked as a pastime since 1975.  More recently, in collaboration with my son Martin, this analysis has 'expanded' from these now mundane 2-dimensional boards, into much more challenging 3-dimensional Cube versions of the puzzle.
The table below shows the Queen-position coordinates for the 'first possible' solutions on 45 different board sizes for the "N-Queens on an N x N chessboard" puzzle. I'll add more solutions as they're solved by us, or as they're discovered by other N-Queens fans such as Matthias R. Engelhardt.
I define a "first solution" to this N-Queens puzzle as follows:
  1. Assuming we start with a blank chess board, and assuming we use the simple, step-by-step search algorithm which I describe here, we will step - laboriously, mechanically, sequentially and reliably - through every possible "no not yet" arrangement of Queens.
  2. The first possible solution is the first arrangement of Queens which allows all N Queens to sit uncontested on the board.
  3. From this first possible solution onwards, as our algorithm searches sequentially for the millions of other solutions per board size, we can guarantee that every new solution we find will comprise a different and 'later' pattern of Queens.

Queen-Position Coordinates For The 'First' Solutions To The "N Queens On An N x N Chessboard" Puzzle

Size of
Board
4 x 4 2 4 1 3
5 x 5 1 3 5 2 4
6 x 6 2 4 6 1 3 5
7 x 7 1 3 5 7 2 4 6
8 x 8 1 5 8 6 3 7 2 4
9 x 9 1 3 6 8 2 4 9 7 5
10 x 10 1 3 6 8 10 5 9 2 4 7
11 x 11 1 3 5 7 9 11 2 4 6 8 10
12 x 12 1 3 5 8 10 12 6 11 2 7 9 4
13 x 13 1 3 5 2 9 12 10 13 4 6 8 11 7
14 x 14 1 3 5 7 12 10 13 4 14 9 2 6 8 11
15 x 15 1 3 5 2 10 12 14 4 13 9 6 15 7 11 8
16 x 16 1 3 5 2 13 9 14 12 15 6 16 7 4 11 8 10
17 x 17 1 3 5 2 8 11 15 7 16 14 17 4 6 9 12 10 13
18 x 18 1 3 5 2 8 15 12 16 13 17 6 18 7 4 11 9 14 10
19 x 19 1 3 5 2 4 9 13 15 17 19 7 16 18 11 6 8 10 12 14
20 x 20 1 3 5 2 4 13 15 12 18 20 17 9 16 19 8 10 7 14 6 11
21 x 21 1 3 5 2 4 9 11 15 21 18 20 17 19 7 12 10 8 6 14 16 13
22 x 22 1 3 5 2 4 10 14 17 20 13 19 22 18 8 21 12 9 6 16 7 11 15
23 x 23 1 3 5 2 4 9 11 13 18 20 22 19 21 10 8 6 23 7 16 12 15 17 14
24 x 24 1 3 5 2 4 9 11 14 18 22 19 23 20 24 10 21 6 8 12 16 13 7 17 15
25 x 25 1 3 5 2 4 9 11 13 15 19 21 24 20 25 23 6 8 10 7 14 16 18 12 17 22
26 x 26 1 3 5 2 4 9 11 13 15 21 23 25 20 22 24 26 10 7 16 12 8 6 18 14 19 17
27 x 27 1 3 5 2 4 9 11 13 15 17 19 23 25 27 24 26 6 10 7 16 8 12 14 21 18 20 22
28 x 28 1 3 5 2 4 9 11 13 15 17 23 25 22 28 26 24 27 7 12 16 18 8 10 14 20 6 21 19
29 x 29 1 3 5 2 4 9 11 13 15 6 20 24 26 21 29 27 25 28 8 12 7 16 10 17 22 14 18 23 19
30 x 30 1 3 5 2 4 9 11 13 15 7 23 26 28 25 22 24 30 27 29 16 12 10 8 6 18 20 17 14 21 19
31 x 31 1 3 5 2 4 9 11 13 15 6 18 23 26 28 31 25 27 30 7 17 29 14 10 8 20 12 16 19 22 24 21
32 x 32 1 3 5 2 4 9 11 13 15 6 18 24 26 30 25 31 28 32 27 29 16 19 10 8 17 12 21 7 14 23 20 22
33 x 33 1 3 5 2 4 9 11 13 15 6 8 25 27 33 31 23 28 26 29 32 30 16 18 12 10 17 7 14 21 19 24 22 20
34 x 34 1 3 5 2 4 9 11 13 15 6 18 20 26 28 31 33 27 29 34 32 30 12 10 7 16 19 8 22 14 25 17 24 21 23
35 x 35 1 3 5 2 4 9 11 13 15 6 8 19 24 26 31 29 32 35 33 28 30 17 7 34 10 18 16 14 12 20 25 23 21 27 22
36 x 36 1 3 5 2 4 9 11 13 15 6 8 22 27 32 30 33 24 29 35 28 34 31 14 36 17 12 16 7 10 20 25 19 26 18 23 21
37 x 37 1 3 5 2 4 9 11 13 15 6 8 19 21 23 30 34 29 35 33 31 37 32 36 16 7 10 20 14 12 18 26 17 22 28 25 27 24
38 x 38 1 3 5 2 4 9 11 13 15 6 8 19 21 29 31 33 36 30 28 38 34 32 37 35 20 18 12 14 23 7 10 25 17 22 16 26 24 27
39 x 39 1 3 5 2 4 9 11 13 15 6 8 19 7 25 30 37 33 28 32 38 35 39 31 36 34 21 17 20 14 12 10 23 16 18 22 29 26 24 27
40 x 40 1 3 5 2 4 9 11 13 15 6 8 19 21 23 30 32 34 36 38 40 31 33 35 37 39 20 22 14 18 10 12 24 17 7 28 26 16 29 27 25
41 x 41 1 3 5 2 4 9 11 13 15 6 8 19 7 22 25 30 32 37 39 33 38 40 34 36 41 35 18 23 10 12 16 20 17 14 21 28 26 31 29 27 24
42 x 42 1 3 5 2 4 9 11 13 15 6 8 19 21 23 25 32 34 36 38 40 42 33 35 37 39 41 16 7 24 20 14 17 26 10 12 30 28 18 31 22 27 29
43 x 43 1 3 5 2 4 9 11 13 15 6 8 19 7 22 24 26 37 39 34 38 35 33 42 36 41 43 40 20 14 17 10 12 28 18 16 27 25 21 32 30 23 31 29
44 x 44 1 3 5 2 4 9 11 13 15 6 8 19 7 22 24 32 35 38 41 33 42 37 34 43 39 36 44 40 21 25 18 14 12 20 16 29 10 23 27 30 17 31 26 28
45 x 45 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 29 31 36 40 42 32 38 43 39 44 35 37 45 41 21 18 24 14 12 23 16 20 17 28 25 34 26 33 30 27
46 x 46 1 3 5 2 4 9 11 13 15 6 8 19 7 22 24 26 34 37 39 41 36 44 46 35 43 38 40 42 45 23 21 16 14 10 27 18 12 25 17 20 30 33 29 32 28 31
47 x 47 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 29 36 39 42 44 33 38 43 46 40 37 41 45 47 21 17 24 26 12 14 16 18 20 23 34 28 30 32 27 35 31
48 x 48 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 28 36 33
48
37
- - -
W O R K
I N
P R O G R E S S






49 x 49 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 37 40 45 41 44 38 48 39 49 43 46 42 47 16 12 24 20 28 17 14 30 21 18 35 31 26 23 33 36 34 32
50 x 50 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 32 43 45
39
- -
W O R K
I N
P R O G R E S S









Update On The First Solution For The 46 x 46 Board

Martin and I are pleased to congratulate Matthias R. Engelhardt for finding the First Solution for the 46 x 46 board on  30th April 2011, using his own algorithm and with a distinctly different search procedure from ours!  In fact, Matthias had tentatively proposed this exact solution to us on 25th March 2011, but - in his mathematically thorough style - he paused before formally declaring it while he made further tests himself to confirm its "first solution" status!

Matthias brings his significant mathematical prowess to his study of this N-Queens puzzle.  His solution-search is implemented in Java, and he describes his sophisticated and more efficient algorithm on his website here - My search algorithm for the n queens problem

Martin & I have enjoyed a friendly and co-operative dialogue with Matthias on this puzzle since October 2010, and although Matthias eventually declared his discovery of this 46 x 46 solution to us on the 30th April 2010, he then very graciously and patiently invited Martin and I to take as long as we needed to examine his result, and to agree with him - only when we were satisfied - that his solution was correct!

In order to help us do this, Matthias provided us with a copy of his Java based program, plus a description of all the relevant parameters with which to run it.  And so, on the 4th July 2011, Martin and I were able to confirm all of the following points:
  1. That Matthias's declared result was indeed the algorithmically First Solution for the 46 x 46 sized board
  2. That Matthias's own Java program, his algorithm and his methodology allowed us to work logically and correctly towards this same solution
  3. That his programmatic starting point was known and was clearly understood by us
  4. That this starting point was a valid one for this search
  5. That this result was repeatable
This particular N-Queens board size of 46 x 46 was an especially tough one to crack, and following a nudge from Matthias, and after some scrutiny by Martin of the progress made so far by my algorithm running on Martin's PC and on my own PCs, we now know that if we had continued with just my algorithm, we would probably not have discovered this board's first solution until around the year 2033!!

So, we warmly congratulate Matthias on his very clever and efficient search algorithm and methodology,
and on his impressive discovery of this 46 x 46 board's algorithmically first solution.
Well Done Matthias!


Click Click for more about this coordinate scheme for an explanation of how to translate these numbers into Queen positions on a board.

Click Click for a table of tentative Queen placements for a table showing the counts of tentative Queen placements for these board sizes, and for the dates of my discoveries so far of the various First Solutions.

Click Return to the opening page to return to this site's Home page.
Page Updated -  28th October 2011
Document made with KompoZer Content on this CSP Queens site by Colin S Pearson and Martin S Pearson is licensed under a
Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales License.
Permissions beyond the scope of this license may be available via the feedback page.
Creative Commons License