The first solution (row order)
- Input
- 8x8, ordem lexicográfica
- Expected output
- a8 e7 h6 f5 c4 g3 b2 d1
It is the one classic backtracking finds first: the first queen on the a file and the others pushed to the right.
Eight Queens Puzzle (and N Queens)
8 queens all 92 solutions
There are exactly 92 ways to put eight queens on an 8x8 chessboard so that none attacks another. The tool lists them all, and shows they group into 12 families of solutions that are equivalent by rotation and reflection.
It is the one classic backtracking finds first: the first queen on the a file and the others pushed to the right.
It is the left-right mirror of the first one. It counts as two: the counter explores only half of the first row and doubles.
Turned by 180 degrees it becomes itself again, so its family has only 4 distinct boards.
There are 92 solutions on the 8x8 board. If rotations and reflections count as the same, 12 fundamental solutions remain (OEIS A002562). Eleven of them generate 8 solutions each and one, symmetric under a 180 degree turn, generates only 4: 11 x 8 + 4 = 92.
There are 92 in total and 12 fundamental ones, that is, different up to rotation and reflection.
Yes. Eight queens in eight rows with no repeated row or column form a permutation of the columns; what the puzzle adds is that no pair may share a diagonal.
Yes. In the Solutions tab pick N = 8 and browse the 92, one by one or in a thumbnail gallery, with the option to see just one per family.
Solution 1 of 92. Family 1 of 12, with 8 symmetric images.
Rotations and reflections of the chosen solution. Click to open.
Everything runs in your browser: your moves and calculations are not sent to any server.