Skip to content
Vamshi Jandhyala

Books · Number Puzzles

Chapter 35

Eight Queens

Place eight queens on a chessboard so that no two attack each other: no two in the same row, the same column, or the same diagonal.

Solution

Take the rows in turn, from the bottom, and put the queen in columns 1, 5, 8, 6, 3, 7, 2, 4.1, \ 5, \ 8, \ 6, \ 3, \ 7, \ 2, \ 4. No column is repeated, so no two queens share a file. For the diagonals, note that two queens lie on a common diagonal exactly when their row-plus-column totals agree, or their row-minus-column differences agree; running through the eight placements, all eight sums are different and all eight differences are different, so no diagonal holds two queens. Drawing the board with row 88 at the top: QQQQQQQQ\begin{array}{|c|c|c|c|c|c|c|c|} \hline \cdot & \cdot & \cdot & Q & \cdot & \cdot & \cdot & \cdot\\\hline \cdot & Q & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot\\\hline \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & Q & \cdot\\\hline \cdot & \cdot & Q & \cdot & \cdot & \cdot & \cdot & \cdot\\\hline \cdot & \cdot & \cdot & \cdot & \cdot & Q & \cdot & \cdot\\\hline \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & Q\\\hline \cdot & \cdot & \cdot & \cdot & Q & \cdot & \cdot & \cdot\\\hline Q & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot\\\hline \end{array} There are 9292 ways in all to place the eight, which reduce to just 1212 essentially different arrangements once rotations and mirror images of the board are counted as one.