One queen in each row, and one in each column
A queen reaches along her row, her column and both diagonals. So once a queen is on a row, no second queen can stand on that row.
An eight by eight board holds eight queens and has eight rows. Eight queens in eight rows, with no row taking two, means every row takes exactly one. The same argument gives one in each column.
That turns the puzzle into a short question for each row: which column does this row use? Work down the board one row at a time. When a row has no safe square, go back and move the queen above it. That is the whole method.
The four by four board has two answers
Four queens on a four by four board can be done in two ways, and no more.
In the first, the top row uses the second column, then the fourth, then the first, then the third. In the second, the top row uses the third column, then the first, then the fourth, then the second.
Look again. The second board is the first board mirrored left to right. So the two answers are one shape seen two ways. On an eight by eight board the same thing happens on a larger scale: there are 92 answers, and turning and mirroring folds them into 12 different shapes.
A row with no safe square
Here are three queens on a five by five board, one in each of the top three rows.
Every square in the fourth row is reached by one of them, so the fourth row has nowhere to put a queen.
Try it
The fourth row has no safe square. What should you do next?
- Go back and move the queen in the third row
- Leave the fourth row empty and carry on
Show the answer
Go back and move the queen in the third row
Correct. Every row holds one queen, so a row with nowhere to go means a queen above it is in the wrong column. Go back one row and try the next column.
Enable JavaScript to answer interactively and save your place.
Practice Eight queens puzzle