Eight queens puzzle
Example solution
The eight queens puzzle is the problem of putting eight chess queenss on an 8×8 chessboard such that none of them is able to capture any other using the standard chess queen's moves. (Piece colour is ignored, and any piece is assumed to be able to attack any other.) That is to say, no two queens should share the same row, column, or diagonal.
| Table of contents |
|
2 Solutions 3 Related problems 4 The eight queens puzzle as an example problem for algorithm design 5 Example program in Python 6 See also 7 External links |
History
Over the years, many mathematicians, including Gauss have worked on this puzzle, which is a special case of the generalized problem of placing n "non-dominating" queens on an n by n chessboard, posed as early as 1850 by Franz Nauck. In 1874, S. Gunther proposed a method of finding solutions by using determinants, and J.W.L. Glaisher refined this approach.
This puzzle was used in the popular early 1990s computer game, The 7th Guest.
The eight queens problem has 92 distinct solutions, or 12 distinct solutions if symmetry operationss such as rotations and reflections of the board are taken into consideration (via Burnside's lemma.)Solutions