The Mathematics of Professor Alan's Puzzle Square

Nearly twenty years ago, on the pages for Professor Alan's Puzzle Square, I wrote "coming soon the mathematics of the square ... and how to solve it". Never make rash promises!

However, twenty years on, at long last, I am eventually making good on my promise.

This is partly in response to Covid-19 and the realisation that these could be useful resources for those studying at home. I've passed these raw materials to the Further Maths Support Programme Wales, part of S4 Science, the pan-Wales STEM in schools initiative led from Swansea, so there may be some more professionally produced resources coming from this in due course.

I've written this as a series of slide presentations, but with lots of text and intended to be read step-by-step like a book, not just as a presentation. You can also download zipped PDFs of all the slide sets (6up, 5.2Mb) or downlaod the individual parts from slideshare. Do experiment with the puzzle square as you read the slides; try out the various moves as they are described. I hope you'll have fun and also see how a little maths can help solve real puzzles.

  1. Part 1 - Counting square
  2. Part 2 - Solve it!
  3. Part 3 - Group Theory
  4. Part 4 - Other Sizes
  5. Part 5 - Odd Permutations
  6. Part 6 - Slider Puzzle
  7. Part 7 - Rubikā€²s Cube


Part 1 - Counting squares

This first part of the Mathematics of Professor Alan's Puzzle Square uses combinatorics to work out how many possible combinations there are.

You'll get different answers for coloured and numbered versions of the puzzle.

Part 2 - Solve it!

The second part of this series shows how Professor Alan's Puzzle Square can be solved with the help of commutators, a construction from Group Theory.

You'll need to try out the moves as you go along. the number square is most useful for this.

Part 3 - Group Theory

Group Theory is thought of as 'advanced mathematics', something studied at university, but in fact it is found in many day-to-day things, including solving puzzles and playing with triangles.

Do follow through the example moves.

Part 4 - Other Sizes

The basic version of the puzzle square consists of 16 tiles in a 4x4 grid. However, you can have any size. In this third part of The Mathematics of Professor Alan's Puzzle Square, we see how some of the things we learnt about the standard square generalise to different sizes ... and also one crucial thing that doesn't.

Here's a 5x5 puzzle square to really challenge you:

Part 5 - Odd Permutations

In the previous part of The Mathematics of Professor Alan's Puzzle Square, we saw that the patterns of tiles in 3x3 squares fall into exactly two families, we called them odd and even. Any square in the same family can be transformed into any other with the basic moves. In this part we use Group Theory to see why this is the case ... and to prove it is so!

Here's a 3x3 puzzle to play with!

Part 6 - Slider Puzzle

Now, with the power of Group Theory at our fingertips, we are able to start looking at other puzzles. The tools we have discovered while looking at Professor Alan's Puzzle Square help us to understand the simple 15 tile slider puzzle that you often find in toy shops or Christmas crackers.

Here's a slider puzzle to experiment with built using jqPuzzle.

Part 7 - Rubik′s Cube

Now we are well practiced at using Group Theory to study simpler puzzles, we turn finally to Rubik′s Cube. We find that commutators can again help us to create combinations of moves that create building blocks to allow step-by-step solutions of complex problems.

There is an online Rubik's cube simulator at

Rubik's Cube