Eight Queens + Knight's Tour = Chess Math
- Chess Friends Books
- Jun 12
- 4 min read
Howdy! It’s the Chess Friends!
Today we are going to share two of the coolest math problems in chess, The Eight Queens Puzzle and The Knight's Tour. We all love math, almost as much as we love chess, so these are particularly special.
The Eight Queens Puzzle
The goal of this puzzle is to place eight queens on the 8 x 8 chessboard so that none of them threaten one another, meaning that they are each on a different row, different column, and different diagonal.
This puzzle was created by German chess composer Max Freidrich William Bezzel in 1848, and there are now variations that extend this puzzle to smaller and larger board sizes, like place 7 queens on the 7 x 7 chess board, or 9 queens for 9 x 9 board. Believe it or not, there are 92 solutions to this 8 x 8 problem, and only one that is symmetrical. Can you find any? How about the symmetrical one?
We would like to show you some examples here, to set you on the right track. Here is a solution we came up with to the five queens puzzle on a 5 x 5 board.

Here is a solution we created on a 9 x 9 board with 9 queens!

Do you notice anything interesting about the queens? Many of them are a knights jump away from one another! Why do you think so? We think that if they’re a knights jump away from each other, they’re not touching and they’re on different ranks, files, and diagonals, which is the goal!
The Knight’s Tour
The Knight’s Tour is a puzzle. The goal is for a knight is to go to every square on a chessboard without repeating a square.
This problem was created around 800AD by Indian poet Rudrata. We have a painting of the Knight’s Tour in our living room, by local artist Jayashree Krishnan! In particular, there are two poems from the Paduka Sahasram, which is a collection of 1008 poems written in the 12th century by Vedanta Desikan. Note that the Sanskrit characters to start each move of the tour are painted on each square.

This problem becomes even more difficult if we want to do a closed Knight’s Tour meaning the Knight must return to its home square so if you want an even greater challenge, give it a go! Believe it or not, if you include transformations like reflections and rotations, there are 26,534,728,821,064 closed Knight’s Tours!
Extending this problem to boards of different sizes is a famous problem not only in math, but in computer science as well. We would love for you to play with it and try to solve the 8 x 8 case, that is move the knight to all 64 squares without repeating a square but we’ll give you a few tips here.
One neat trick to solving this problem is Warnsdorf’s rule, which says the knight should always move to the square with the least number of possible moves after that you haven't yet visited. Here’s an example:

Suppose the knight is on b4 as you can see above. There are six squares it can go to: a6, a2, c6, c2, d5, and d3. If it goes to c6, d5, or d3, it has 7 squares it could then go to without returning to b4. We can do better! If we go to c2, there are only five squares the knight can go without returning to b4. Better but not the best. How about a6? From a6 we can go to b8, c7 or c5, so only 3 options. Pretty good! What about a2? I think we have a winner! The only squares the knight can go from there are c3 and c1, so since there are only 2 options, we choose that as our next move. Note that this is an algorithm, or a method we can follow to get us to a solution. Sometimes the fun is in playing and experimenting yourself, but we wanted to share this in case you wanted a process to follow.
Here is a full solution to the Knight’s Tour on a 5 x 5 board:

The Magic Square Knight’s Tour
There is a special case of the Knight’s Tour where the numbered sequence of moves forms a Magic Square. A Magic Square is a square with distinct positive whole numbers on each square such that each row and each column has the same sum.
Here’s an example of one of ours from elementary school! Fun fact: The Man’s Halloween costume in 2nd grade was a knight on a Magic Square Tour!! Like most math problems, Magic Squares have extensions too, and one of those is where the diagonals also add up to the same number!

We’ll leave these here for now friends. We hope you learned a little bit and have some tools to experiment with these awesome chess math puzzles. Good luck! Feel free to share your solutions and thoughts in the comments! Do math! Play chess!
Three Cheers, Fellow Future Master Chess Friends!
The Man Benji, The Myth Sarang, and The Legend Vivi
This was a fun one to make!