Maths Puzzles are FUN !!

How hard can it be!
Can you solve the Snake Puzzle?

Maths Puzzles may not be everyones cup of tea, but I love puzzles and I love maths (and cups of tea). You can already see where this is going, right. Anyway I came across this simple enough puzzle and inevitably I started thinking about how to solve it. I say it’s simple because it only involves the numbers 1 to 9 with addition, subtraction, multiplication, and division. So, how hard can it be? Well…

Rules of the Puzzle

  1. You must use the numbers 1 to 9 inclusive
  2. Each number can only be used once
  3. Note that : symbolises division

This type of puzzle is one of my less favoured types of puzzle because it’s solved mostly through trial and error, with just a sprinkling of inspiration. I prefer puzzles that are solved through some (optionally mind-bending) inspirational insight. Eureka moments, I like them, they’re a natural high. But what can make this simple type of puzzle more interesting is to take it to another level. How? First, you can calculate how many permutations there are, i.e. how many different ways can 9 numbers be uniquely ordered. The answer is there are 362,880 permutations for 9 numbers (where there is no repetition, and order is important). Suddenly this simple puzzle doesn’t seem so simple. Another interesting twist is to calculate how many possible solutions there are, you didn’t assume there was just one possible answer did you? Oh dear, never assume! Hint: There is more than one solution, a lot more. I found 128 solutions.

You’re probably wondering how I found that many solutions and how long it took me to find them. It took less than 200 milliseconds to find all 128 solutions. That’s the power of writing software to do the donkey work for you 🙂 Writing the code took an hour or so and that was a much more enjoyable puzzle to solve, than manually solving the puzzle.

Get the Sourcecode

You can view and use the sourcecode which I have provided on GitHub under the GPLv2. Comments welcome, especially if you can see and errors or improvements. Enjoy!

View the Solutions

Below are a list of all 128 valid solutions. First number goes in the top-leftmost square and insert the numbers in order. Easy peasy.

I have also created a Google Sheet with the answers and formula on so you can check your answers. You can view and download the Answer sheet too.


Winner: 1 2 6 4 7 8 3 5 9 : 66.0 : 1
Winner: 1 2 6 4 7 8 5 3 9 : 66.0 : 2
Winner: 1 3 2 4 5 8 7 9 6 : 66.0 : 3
Winner: 1 3 2 4 5 8 9 7 6 : 66.0 : 4
Winner: 1 3 2 9 5 6 4 7 8 : 66.0 : 5
Winner: 1 3 2 9 5 6 7 4 8 : 66.0 : 6
Winner: 1 3 4 7 6 5 2 9 8 : 66.0 : 7
Winner: 1 3 4 7 6 5 9 2 8 : 66.0 : 8
Winner: 1 3 6 2 7 9 4 5 8 : 66.0 : 9
Winner: 1 3 6 2 7 9 5 4 8 : 66.0 : 10
Winner: 1 3 9 4 7 8 2 5 6 : 66.0 : 11
Winner: 1 3 9 4 7 8 5 2 6 : 66.0 : 12
Winner: 1 4 8 2 7 9 3 5 6 : 66.0 : 13
Winner: 1 4 8 2 7 9 5 3 6 : 66.0 : 14
Winner: 1 5 2 3 4 8 7 9 6 : 66.0 : 15
Winner: 1 5 2 3 4 8 9 7 6 : 66.0 : 16
Winner: 1 5 2 8 4 7 3 9 6 : 66.0 : 17
Winner: 1 5 2 8 4 7 9 3 6 : 66.0 : 18
Winner: 1 5 3 9 4 2 7 8 6 : 66.0 : 19
Winner: 1 5 3 9 4 2 8 7 6 : 66.0 : 20
Winner: 1 9 6 4 5 8 3 7 2 : 66.0 : 21
Winner: 1 9 6 4 5 8 7 3 2 : 66.0 : 22
Winner: 1 9 6 7 5 2 3 4 8 : 66.0 : 23
Winner: 1 9 6 7 5 2 4 3 8 : 66.0 : 24
Winner: 2 1 4 3 7 9 5 6 8 : 66.0 : 25
Winner: 2 1 4 3 7 9 6 5 8 : 66.0 : 26
Winner: 2 3 6 1 7 9 4 5 8 : 66.0 : 27
Winner: 2 3 6 1 7 9 5 4 8 : 66.0 : 28
Winner: 2 4 8 1 7 9 3 5 6 : 66.0 : 29
Winner: 2 4 8 1 7 9 5 3 6 : 66.0 : 30
Winner: 2 8 6 9 4 1 5 7 3 : 66.0 : 31
Winner: 2 8 6 9 4 1 7 5 3 : 66.0 : 32
Winner: 2 9 6 3 5 1 4 7 8 : 66.0 : 33
Winner: 2 9 6 3 5 1 7 4 8 : 66.0 : 34
Winner: 3 1 4 2 7 9 5 6 8 : 66.0 : 35
Winner: 3 1 4 2 7 9 6 5 8 : 66.0 : 36
Winner: 3 2 1 5 4 7 8 9 6 : 66.0 : 37
Winner: 3 2 1 5 4 7 9 8 6 : 66.0 : 38
Winner: 3 2 4 8 5 1 7 9 6 : 66.0 : 39
Winner: 3 2 4 8 5 1 9 7 6 : 66.0 : 40
Winner: 3 2 8 6 5 1 7 9 4 : 66.0 : 41
Winner: 3 2 8 6 5 1 9 7 4 : 66.0 : 42
Winner: 3 5 2 1 4 8 7 9 6 : 66.0 : 43
Winner: 3 5 2 1 4 8 9 7 6 : 66.0 : 44
Winner: 3 6 4 9 5 8 1 7 2 : 66.0 : 45
Winner: 3 6 4 9 5 8 7 1 2 : 66.0 : 46
Winner: 3 9 2 8 1 5 6 7 4 : 66.0 : 47
Winner: 3 9 2 8 1 5 7 6 4 : 66.0 : 48
Winner: 3 9 6 2 5 1 4 7 8 : 66.0 : 49
Winner: 3 9 6 2 5 1 7 4 8 : 66.0 : 50
Winner: 4 2 6 1 7 8 3 5 9 : 66.0 : 51
Winner: 4 2 6 1 7 8 5 3 9 : 66.0 : 52
Winner: 4 3 2 1 5 8 7 9 6 : 66.0 : 53
Winner: 4 3 2 1 5 8 9 7 6 : 66.0 : 54
Winner: 4 3 9 1 7 8 2 5 6 : 66.0 : 55
Winner: 4 3 9 1 7 8 5 2 6 : 66.0 : 56
Winner: 4 9 6 1 5 8 3 7 2 : 66.0 : 57
Winner: 4 9 6 1 5 8 7 3 2 : 66.0 : 58
Winner: 5 1 2 9 6 7 3 4 8 : 66.0 : 59
Winner: 5 1 2 9 6 7 4 3 8 : 66.0 : 60
Winner: 5 2 1 3 4 7 8 9 6 : 66.0 : 61
Winner: 5 2 1 3 4 7 9 8 6 : 66.0 : 62
Winner: 5 3 1 7 2 6 8 9 4 : 66.0 : 63
Winner: 5 3 1 7 2 6 9 8 4 : 66.0 : 64
Winner: 5 4 1 9 2 7 3 8 6 : 66.0 : 65
Winner: 5 4 1 9 2 7 8 3 6 : 66.0 : 66
Winner: 5 4 8 9 6 7 1 3 2 : 66.0 : 67
Winner: 5 4 8 9 6 7 3 1 2 : 66.0 : 68
Winner: 5 7 2 8 3 9 1 6 4 : 66.0 : 69
Winner: 5 7 2 8 3 9 6 1 4 : 66.0 : 70
Winner: 5 9 3 6 2 1 7 8 4 : 66.0 : 71
Winner: 5 9 3 6 2 1 8 7 4 : 66.0 : 72
Winner: 6 2 8 3 5 1 7 9 4 : 66.0 : 73
Winner: 6 2 8 3 5 1 9 7 4 : 66.0 : 74
Winner: 6 3 1 9 2 5 7 8 4 : 66.0 : 75
Winner: 6 3 1 9 2 5 8 7 4 : 66.0 : 76
Winner: 6 9 3 5 2 1 7 8 4 : 66.0 : 77
Winner: 6 9 3 5 2 1 8 7 4 : 66.0 : 78
Winner: 7 1 4 9 6 5 2 3 8 : 66.0 : 79
Winner: 7 1 4 9 6 5 3 2 8 : 66.0 : 80
Winner: 7 2 8 9 6 5 1 3 4 : 66.0 : 81
Winner: 7 2 8 9 6 5 3 1 4 : 66.0 : 82
Winner: 7 3 1 5 2 6 8 9 4 : 66.0 : 83
Winner: 7 3 1 5 2 6 9 8 4 : 66.0 : 84
Winner: 7 3 2 8 5 9 1 6 4 : 66.0 : 85
Winner: 7 3 2 8 5 9 6 1 4 : 66.0 : 86
Winner: 7 3 4 1 6 5 2 9 8 : 66.0 : 87
Winner: 7 3 4 1 6 5 9 2 8 : 66.0 : 88
Winner: 7 5 2 8 4 9 1 3 6 : 66.0 : 89
Winner: 7 5 2 8 4 9 3 1 6 : 66.0 : 90
Winner: 7 6 4 8 5 9 1 3 2 : 66.0 : 91
Winner: 7 6 4 8 5 9 3 1 2 : 66.0 : 92
Winner: 7 9 6 1 5 2 3 4 8 : 66.0 : 93
Winner: 7 9 6 1 5 2 4 3 8 : 66.0 : 94
Winner: 8 2 4 3 5 1 7 9 6 : 66.0 : 95
Winner: 8 2 4 3 5 1 9 7 6 : 66.0 : 96
Winner: 8 3 2 7 5 9 1 6 4 : 66.0 : 97
Winner: 8 3 2 7 5 9 6 1 4 : 66.0 : 98
Winner: 8 5 2 1 4 7 3 9 6 : 66.0 : 99
Winner: 8 5 2 1 4 7 9 3 6 : 66.0 : 100
Winner: 8 5 2 7 4 9 1 3 6 : 66.0 : 101
Winner: 8 5 2 7 4 9 3 1 6 : 66.0 : 102
Winner: 8 6 4 7 5 9 1 3 2 : 66.0 : 103
Winner: 8 6 4 7 5 9 3 1 2 : 66.0 : 104
Winner: 8 7 2 5 3 9 1 6 4 : 66.0 : 105
Winner: 8 7 2 5 3 9 6 1 4 : 66.0 : 106
Winner: 8 9 2 3 1 5 6 7 4 : 66.0 : 107
Winner: 8 9 2 3 1 5 7 6 4 : 66.0 : 108
Winner: 9 1 2 5 6 7 3 4 8 : 66.0 : 109
Winner: 9 1 2 5 6 7 4 3 8 : 66.0 : 110
Winner: 9 1 4 7 6 5 2 3 8 : 66.0 : 111
Winner: 9 1 4 7 6 5 3 2 8 : 66.0 : 112
Winner: 9 2 8 7 6 5 1 3 4 : 66.0 : 113
Winner: 9 2 8 7 6 5 3 1 4 : 66.0 : 114
Winner: 9 3 1 6 2 5 7 8 4 : 66.0 : 115
Winner: 9 3 1 6 2 5 8 7 4 : 66.0 : 116
Winner: 9 3 2 1 5 6 4 7 8 : 66.0 : 117
Winner: 9 3 2 1 5 6 7 4 8 : 66.0 : 118
Winner: 9 4 1 5 2 7 3 8 6 : 66.0 : 119
Winner: 9 4 1 5 2 7 8 3 6 : 66.0 : 120
Winner: 9 4 8 5 6 7 1 3 2 : 66.0 : 121
Winner: 9 4 8 5 6 7 3 1 2 : 66.0 : 122
Winner: 9 5 3 1 4 2 7 8 6 : 66.0 : 123
Winner: 9 5 3 1 4 2 8 7 6 : 66.0 : 124
Winner: 9 6 4 3 5 8 1 7 2 : 66.0 : 125
Winner: 9 6 4 3 5 8 7 1 2 : 66.0 : 126
Winner: 9 8 6 2 4 1 5 7 3 : 66.0 : 127
Winner: 9 8 6 2 4 1 7 5 3 : 66.0 : 128

Calculations took 219 milliseconds
Permutations checked 362880
Winning matches 128

Leave a comment

Your email address will not be published.

*