SlideShare a Scribd company logo
The Mathematics of
Professor Alan's Puzzle Square
part 2 – solving it
https://magisoft.co.uk/alan/misc/game/game.html
How to do it?
We are going to look at
how to solve the
puzzle square.
It is not the fastest
way, but is systematic
and is based on a
mathematical concept
from Group Theory
called a commutator
Don’t panic!
Group Theory is something that is studied at
universities, so this sounds scary but:
1. You don’t need to understand it to follow the
solution method.
2. Actually it is not as scary as all that, and we’ll
see later how a little bit of maths can help
solve this and similar puzzles.
First steps
Try pressing the
arrows in the order
here.
1. Second column up
2. Top row right
3. Second column down
4. Top row left
1
2
3
4
A little cycle
See what has
happened.
Almost everything is
in the same place,
but we took three
tiles for a little anti-
clockwise spin.
1
2
3
4
A long word for it
In maths speak we have
just used a commutator.
This means:
1. Do something
2. Do something else
3. Do the opposite of step 1
4. Do the opposite of step 2
1
2
3
4
Spin the other way
If we want the three
tiles to spin round
clockwise,
we can simply press
the opposite of each
arrows in the
opposite order …
Reset the square and
try it.
1
2
3
4
reset
Two useful moves
We now have two
sets of moves that
cycle the tiles focused
on the 2 square.
As the bottom two
rows aren’t affected,
we’ll focus on the top
two rows for now
1
2
3
4
1
2
3
4
Half way there!
Using these moves, in
fact just one of them,
we can almost solve
the puzzle.
We’ll just aim to get
the right tiles in the
right rows. Like this
square.
Let’s do it
Here’s a pretty
scrambled square.
We don’t need our
fancy commutator
moves to get the top
row right. First rotate a
few columns up or
down to get it roughly
there. Just 2 to go.
Row 1
Just tile 2 to go.
Shift it to the clear column.
Then move it up to the top row.
… and now for the second row
Row 2
5 and 8 are OK, so
just 6 and 7 to go.
6 is almost there, we just do
an anti-clockwise spin.
Note this is focused on the tile on
the last column and second row,
so you need to adapt the move.
Different focus tile
Try this out on an
unscrambled square
to see how to do it.
It is just the same,
you just choose the
arrows on the row
and column you want
to spin around.
1
2
3
4
Row 2 continued
Just tile 7 to go.
We could do this by moving
it across one followed
by two spins.
Jumping rows
However, we can save time
by moving several rows at
once.
Do a spin move,
but press the up/down
arrows twice.
Here it is on a reset square.
1
2
36
4
5
Nearly there
For the last two rows,
just follow the same
pattern, of shift and rotate.
Here we just need to swop
tiles 11 and 14 and they are
already in the right position
for a clockwise spin.
Half way done … or maybe better
All the tiles are in the right rows,
so we just need to sort out the
row order.
For the coloured puzzle square
the news is even better.
All the tiles in the same row are
identical anyway, so you are
done 
1
3
1
1
1
0
1
2
1
5
1
6
1
4
4
78
21
9
6
3
5
A right hand cycle
We saw how to create
both clockwise and
anticlockwise spins,
but both have triangles
pointing left.
By simply doing left
first for the column we
can create a right
pointing triangle.
2
3
4
1
Shuffle a row
Now we can combine the left
and right pointing triangles.
The moves the 6 to the top row
and the moves it back down.
In the end only the top row tiles
are moved.
+ =
Last steps
We can now work on a single row
at a time, rotating the whole row,
or just three tiles with our new
move.
The shuffled top row is now easy
to fix, as is the last row.
Last steps
The middle rows are a bit more
difficult.
The top row we can shuffle the
whole row two steps left.
The last row we can rotate the last
three tiles.
Stuck?
In both of these rows, it is just the
last two tiles that are the wrong
way round.
If this were a 5x5 or a 3x3 square,
then we might be stuck (we’ll see
why in a later part), but as
rotates all four and rotates
three, we can combine them.
A simple swop
In both of these rows, it is just the
last two tiles that are the wrong
way round.
If this were a 5x5 or a 3x3 square,
then we might be stuck (we’ll see
why in a later part), but as
rotates all four right and
rotates three left, we can combine
them.
Solved 
So, we can just do this to
the two middle rows …
… and we are done 
✔
… and as well as solving it …
Yes, more maths 
1. We’ve had our first taste of commutators
2. We’ve focused on moves rather then the tiles … this
is a form of abstraction critical in both maths and
computing
3. We’ve packaged up bigger moves built out
of simpler moves … this is crucial for algebra in
maths and it is also at the heart of programming

More Related Content

PPTX
rank of matrix
PDF
Kathryn Heitkemper - PeopleKeys
PDF
Romberg’s method
PPTX
Sorting ppt
PPTX
Selection sort 1
DOC
11.第十一章用Matlab计算多元函数的积分
PPTX
Differential calculus maxima minima
PPT
3.8 quick sort
rank of matrix
Kathryn Heitkemper - PeopleKeys
Romberg’s method
Sorting ppt
Selection sort 1
11.第十一章用Matlab计算多元函数的积分
Differential calculus maxima minima
3.8 quick sort

Similar to Solving It - Part 2 of The Mathematics of Professor Alan's Puzzle Square (20)

PPTX
Odd Permutations - Part 5 of The Mathematics of Professor Alan's Puzzle Square
PPTX
Slider Puzzle - Part 6 of The Mathematics of Professor Alan's Puzzle Square
PPTX
Rubiks Cube - Part 7 of The Mathematics of Professor Alan's Puzzle Square
PDF
maths-7-rubiks-cube-200518201412.pdf
PPTX
Group Theory - Part 3 of The Mathematics of Professor Alan's Puzzle Square
PPTX
Magic Square for odd n.pptx
PPTX
Other Sizes - Part 4 of The Mathematics of Professor Alan's Puzzle Square
PPTX
How Many - Part 1 of The Mathematics of Professor Alan's Puzzle Square
PPTX
Magic square made easy
PDF
permutation_puzzles_and_group_theory
PDF
Activity for permutation-puzzles-book.pdf
PPT
Blank out the squares
PPTX
Magic-squares.pptx
PDF
How to Solve a Rubik's Cube
PDF
rubik (1).pdf
DOC
The Power of Sudoku
PPT
3.5 merge sort
PDF
Write a C++ program which generates and displays a random walk acros.pdf
DOCX
Turing machine(automata )
DOCX
game.c Written by Peter Sutton. Game board da.docx
Odd Permutations - Part 5 of The Mathematics of Professor Alan's Puzzle Square
Slider Puzzle - Part 6 of The Mathematics of Professor Alan's Puzzle Square
Rubiks Cube - Part 7 of The Mathematics of Professor Alan's Puzzle Square
maths-7-rubiks-cube-200518201412.pdf
Group Theory - Part 3 of The Mathematics of Professor Alan's Puzzle Square
Magic Square for odd n.pptx
Other Sizes - Part 4 of The Mathematics of Professor Alan's Puzzle Square
How Many - Part 1 of The Mathematics of Professor Alan's Puzzle Square
Magic square made easy
permutation_puzzles_and_group_theory
Activity for permutation-puzzles-book.pdf
Blank out the squares
Magic-squares.pptx
How to Solve a Rubik's Cube
rubik (1).pdf
The Power of Sudoku
3.5 merge sort
Write a C++ program which generates and displays a random walk acros.pdf
Turing machine(automata )
game.c Written by Peter Sutton. Game board da.docx
Ad

More from Alan Dix (20)

PPTX
Artificial Intelligence for Agriculture: Being smart and Being small
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
PPTX
Whose choice? Making decisions with and about Artificial Intelligence, Keele ...
PPTX
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
PPTX
Citations and Sub-Area Bias in the UK Research Assessment Process
PPTX
Technical Creativity – 901 Time Managing Creativity Introduction
PPTX
Technical Creativity – 906 Doing Nothing
PPTX
Technical Creativity – 905 Impasse: getting unstuck
PPTX
Technical Creativity – 904 To Do and Done
PPTX
Technical Creativity – 902 Plans: staying open to creative moments
PPTX
Technical Creativity – 903 Busy Work: being productive in the gaps
PPTX
Technical Creativity – 907 The Creativity Plan
PPTX
Technical Creativity – 801 Nurture Introduction
PPTX
Technical Creativity – 802 Habits that foster creativity
PPTX
Technical Creativity – 803 Create and Capture
PPTX
Technical Creativity – 701 Personality Prostheses: working with you
PPTX
Technical Creativity – 702 One Morning: a short creativity story
PPTX
Technical Creativity – 603 Fixation and Insight
PPTX
Technical Creativity – 605 What is the Problem
PPTX
Technical Creativity – 601 Theory Introduction
Artificial Intelligence for Agriculture: Being smart and Being small
Enabling the Digital Artisan – keynote at ICOCI 2025
Whose choice? Making decisions with and about Artificial Intelligence, Keele ...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Citations and Sub-Area Bias in the UK Research Assessment Process
Technical Creativity – 901 Time Managing Creativity Introduction
Technical Creativity – 906 Doing Nothing
Technical Creativity – 905 Impasse: getting unstuck
Technical Creativity – 904 To Do and Done
Technical Creativity – 902 Plans: staying open to creative moments
Technical Creativity – 903 Busy Work: being productive in the gaps
Technical Creativity – 907 The Creativity Plan
Technical Creativity – 801 Nurture Introduction
Technical Creativity – 802 Habits that foster creativity
Technical Creativity – 803 Create and Capture
Technical Creativity – 701 Personality Prostheses: working with you
Technical Creativity – 702 One Morning: a short creativity story
Technical Creativity – 603 Fixation and Insight
Technical Creativity – 605 What is the Problem
Technical Creativity – 601 Theory Introduction
Ad

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PPTX
master seminar digital applications in india
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Computing-Curriculum for Schools in Ghana
PDF
01-Introduction-to-Information-Management.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Cell Types and Its function , kingdom of life
PPTX
Institutional Correction lecture only . . .
GDM (1) (1).pptx small presentation for students
master seminar digital applications in india
102 student loan defaulters named and shamed – Is someone you know on the list?
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Computing-Curriculum for Schools in Ghana
01-Introduction-to-Information-Management.pdf
Anesthesia in Laparoscopic Surgery in India
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
VCE English Exam - Section C Student Revision Booklet
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
2.FourierTransform-ShortQuestionswithAnswers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Cell Types and Its function , kingdom of life
Institutional Correction lecture only . . .

Solving It - Part 2 of The Mathematics of Professor Alan's Puzzle Square

  • 1. The Mathematics of Professor Alan's Puzzle Square part 2 – solving it https://magisoft.co.uk/alan/misc/game/game.html
  • 2. How to do it? We are going to look at how to solve the puzzle square. It is not the fastest way, but is systematic and is based on a mathematical concept from Group Theory called a commutator
  • 3. Don’t panic! Group Theory is something that is studied at universities, so this sounds scary but: 1. You don’t need to understand it to follow the solution method. 2. Actually it is not as scary as all that, and we’ll see later how a little bit of maths can help solve this and similar puzzles.
  • 4. First steps Try pressing the arrows in the order here. 1. Second column up 2. Top row right 3. Second column down 4. Top row left 1 2 3 4
  • 5. A little cycle See what has happened. Almost everything is in the same place, but we took three tiles for a little anti- clockwise spin. 1 2 3 4
  • 6. A long word for it In maths speak we have just used a commutator. This means: 1. Do something 2. Do something else 3. Do the opposite of step 1 4. Do the opposite of step 2 1 2 3 4
  • 7. Spin the other way If we want the three tiles to spin round clockwise, we can simply press the opposite of each arrows in the opposite order … Reset the square and try it. 1 2 3 4 reset
  • 8. Two useful moves We now have two sets of moves that cycle the tiles focused on the 2 square. As the bottom two rows aren’t affected, we’ll focus on the top two rows for now 1 2 3 4 1 2 3 4
  • 9. Half way there! Using these moves, in fact just one of them, we can almost solve the puzzle. We’ll just aim to get the right tiles in the right rows. Like this square.
  • 10. Let’s do it Here’s a pretty scrambled square. We don’t need our fancy commutator moves to get the top row right. First rotate a few columns up or down to get it roughly there. Just 2 to go.
  • 11. Row 1 Just tile 2 to go. Shift it to the clear column. Then move it up to the top row. … and now for the second row
  • 12. Row 2 5 and 8 are OK, so just 6 and 7 to go. 6 is almost there, we just do an anti-clockwise spin. Note this is focused on the tile on the last column and second row, so you need to adapt the move.
  • 13. Different focus tile Try this out on an unscrambled square to see how to do it. It is just the same, you just choose the arrows on the row and column you want to spin around. 1 2 3 4
  • 14. Row 2 continued Just tile 7 to go. We could do this by moving it across one followed by two spins.
  • 15. Jumping rows However, we can save time by moving several rows at once. Do a spin move, but press the up/down arrows twice. Here it is on a reset square. 1 2 36 4 5
  • 16. Nearly there For the last two rows, just follow the same pattern, of shift and rotate. Here we just need to swop tiles 11 and 14 and they are already in the right position for a clockwise spin.
  • 17. Half way done … or maybe better All the tiles are in the right rows, so we just need to sort out the row order. For the coloured puzzle square the news is even better. All the tiles in the same row are identical anyway, so you are done  1 3 1 1 1 0 1 2 1 5 1 6 1 4 4 78 21 9 6 3 5
  • 18. A right hand cycle We saw how to create both clockwise and anticlockwise spins, but both have triangles pointing left. By simply doing left first for the column we can create a right pointing triangle. 2 3 4 1
  • 19. Shuffle a row Now we can combine the left and right pointing triangles. The moves the 6 to the top row and the moves it back down. In the end only the top row tiles are moved. + =
  • 20. Last steps We can now work on a single row at a time, rotating the whole row, or just three tiles with our new move. The shuffled top row is now easy to fix, as is the last row.
  • 21. Last steps The middle rows are a bit more difficult. The top row we can shuffle the whole row two steps left. The last row we can rotate the last three tiles.
  • 22. Stuck? In both of these rows, it is just the last two tiles that are the wrong way round. If this were a 5x5 or a 3x3 square, then we might be stuck (we’ll see why in a later part), but as rotates all four and rotates three, we can combine them.
  • 23. A simple swop In both of these rows, it is just the last two tiles that are the wrong way round. If this were a 5x5 or a 3x3 square, then we might be stuck (we’ll see why in a later part), but as rotates all four right and rotates three left, we can combine them.
  • 24. Solved  So, we can just do this to the two middle rows … … and we are done  ✔
  • 25. … and as well as solving it … Yes, more maths  1. We’ve had our first taste of commutators 2. We’ve focused on moves rather then the tiles … this is a form of abstraction critical in both maths and computing 3. We’ve packaged up bigger moves built out of simpler moves … this is crucial for algebra in maths and it is also at the heart of programming