Wolfram Schubert's N-Queens page

Here are a few results of the n-queens puzzle (esp variations of the "original" n-queens puzzle) split into subtasks.

The subtask results are published here to enable a probabilistic aproach of verifying the total solution numbers, i.e. without (re)performing the whole computations.


Number of (180deg) symmetric solutions to nonattacking queens problem on NxN board.
See OEIS sequence A032522. OEIS b-file.
N total solutions subtask results
1 1  
... ...  
32 181254386312  
33 533869114600 split into subtasks by 1 preset column
34 2419751731604 split into subtasks by 2 preset columns
35 6905549827664 split into subtasks by 2 preset columns
36 33686204023352 split into subtasks by 2 preset columns
37 97762487422768 split into subtasks by 4 preset columns
38 496654774712700 split into subtasks by 4 preset columns
39 1472761266426976 split into subtasks by 4 preset columns
Notes: The values of columns preset0, preset1, ... are zero based.
"Preset0" is the first column from the middle of the board, "preset1" is the next column from the middle of the board.
Number of ways of placing n nonattacking semi-queens on an NxN board.
See OEIS sequence A099152.
A semi-queen (a fairy chess piece) moves (and attacks or captures) on one of the diagonals only.
The name "semi-queen" was taken from OEIS sequence A006717 (there on a different board topology).
N total solutions subtask results
1 1  
... ...  
18 5006620130753  
19 62395131973755 split into subtasks by 4 preset columns
20 818456924866815 split into subtasks by 4 preset columns
Note: The values of columns preset0, preset1, ... are zero based.

Number of ways of placing n nonattacking superqueens (amazons) on an NxN board.
See OEIS sequences A051223 and A051224.
An amazon/superqueen (a fairy chess piece) moves (and attacks or captures) like a regular queen and a knight
N total solutions
A051223
subtask results symmetric solutions (180°)
(no known OEIS sequence)
symmetric solutions (90°)
(no known OEIS sequence)
symmetric solutions count only once
A051224
= (A051223 + 180degSymmSol + 2 * 90degSymmSol)/8 (for N>1)
1 1   1 1 1
... ...   ... ... ...
23 306819842212 split into subtasks by 3 preset columns 417684 0 38352532487
24 2883202816808 split into subtasks by 4 preset columns 1220024 920 360400504834
25 28144109776812 split into subtasks by 5 preset columns 3904588 908 3518014210402
26 286022102245804 split into subtasks by 5 preset columns 12040500 0 35752764285788
Note: The values of columns preset0, preset1, ... are zero based.

Number of ways of placing n nonattacking chancellors/empresses/marshals on an NxN board.
See OEIS sequences A137774.
A chancellor or empress or marshal (a fairy chess piece) moves (and attacks or captures) like a rook and a knight.
N total solutions subtask results
1 1  
... ...  
17 9248221393974  
18 161670971937362 split into subtasks by 3 preset columns
19 2996936692836754 split into subtasks by 4 preset columns
Note: The values of columns preset0, preset1, ... are zero based.

Number of ways of placing n nonattacking queens of the night on an NxN board.
See OEIS sequences A102388.
A queen of the night (a fairy chess piece) moves (and attacks or captures) like a queen and a nightrider.
A nightrider is a rider along straight lines of knight moves (a fairy chess piece too).
N total solutions subtask results
1 1  
... ...  
28 3698242  
29 14120996 split into subtasks by 3 preset columns
30 59531852 split into subtasks by 3 preset columns
31 252272512 split into subtasks by 4 preset columns
32 1163430462 split into subtasks by 4 preset columns
Note: The values of columns preset0, preset1, ... are zero based.

Lexicographically first/smallest solutions of the N-queens problem.
See OEIS sequence A141843. OEIS b-file.
N first/smallest solution
1 1
... ...
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 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 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 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 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 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 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 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 1 3 5 2 4 9 11 13 15 6 8 19 7 22 24 26 28 36 38 40 37 44 47 45 48 39 41 43 46 42 10 16 20 25 12 31 27 14 17 23 21 34 18 30 33 35 32 29
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 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 36 38 40 45 43 48 46 39 37 50 41 44 42 47 49 20 18 24 26 30 12 16 21 17 14 31 35 23 29 33 28 34 32
51 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 31 39 41 43 40 47 50 48 51 42 44 46 49 45 16 26 23 12 30 18 14 17 20 24 21 28 34 36 38 33 35 37 32
52 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 38 40 42 46 39 50 48 51 45 43 41 52 44 49 47 21 26 28 30 18 14 12 17 23 16 32 24 20 31 37 34 36 33 35
53 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 31 33 41 43 45 42 49 52 50 53 44 46 48 51 47 12 14 24 17 21 28 30 34 16 18 20 26 23 38 40 35 32 36 39 37
54 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 31 40 42 44 41 49 51 53 43 52 48 45 54 46 50 47 14 18 30 21 26 32 17 20 28 12 16 23 37 34 38 24 39 36 33 35
55 1 3 5 2 4 9 11 13 15 6 8 19 7 22 10 25 27 29 31 12 41 43 46 50 47 45 54 42 53 55 44 48 51 49 52 23 14 28 17 33 20 16 34 24 18 21 32 30 37 26 40 36 39 35 38
Note: The values of these queen positions in their columns (or rows) are 1-based (as in the OEIS b-file).

Please send questions, notes, hints, error corrections, flames a.s.o. to email account "wschubnq" at the mail domain "gmx.de".

Last change: 12/10/2011