# Strategy for solving "Hypatian Enigma" puzzle (all lines add to 38)

The "Hypatian Enigma" puzzle consists of 19 hexagonal blocks numbered 1 through 19.

The blocks are arranged in 5 rows. The first and last rows have 3 blocks, the second and fourth row has 4 blocks and the third row has 5 blocks.

The goal is to place the blocks such that each horizontal row (5), and each 'left' diagonal row (5), and each 'right' diagonal row (5) adds to 38. So the puzzle consists of 15 sums. The goal is that all 15 sums add to 38.

My initial strategy was to place blocks so that the outer ring (6 sets of 3) added to 38. This was easy accomplished, but when I filled in the rest, the totals were way off, as expected. So my strategy was to find a row that had the highest total and swap a block in that row with a row that had a total below 38. While this strategy was helpful at getting the largest sum and the smallest sum in a narrow range, the strategy seems not to converge on a solution.

Question: What would be a defined strategy to solve the puzzle (even if it meant way too many iterations to be done by hand)?

After having looked at the references to the Magic Hexagon (which I didn't know about on my original post), I see this is a really hard puzzle, and it's very unlikely that a casual puzzle solver would come to a solution without at least some knowledge of the unique solution.

But just for fun, and not limiting by any of the theory that's written-up in the references in the comments, brute force style, I asked my computer to generate all possible ways to take three numbers from 1 through 19 that add up to 38 and came up with 180 ways to do that, where order mattered. Then I asked my computer how many ways can those be chained together to make the outer 6 triples of the puzzle and it said 5084 ways to do that. The next step might be to go through all of those 5084 perimeter solutions and drop in the remaining blocks randomly and check for a solution each time. I could start with the correct one of the 5084 and see how many random iterations it usually takes to luck into the puzzle solution.

• SPOILER: Reference links reveal unique solution. - Wikipedia article Magic hexagon refers to A Unique Magic Hexagon by Charles W. Trigg, 1964. Commented Jun 24 at 1:46
• Welcome to PSE (Puzzling Stack Exchange)! Commented Jun 24 at 6:04
• See also the earlier related questions here and here. Commented Jun 24 at 13:15
• Here is a Numberphile video where a method is outlined for solving much of the problem, though there is still a lot of case work that is skipped over. I found the video linked on one of those previous questions. Commented Jun 24 at 13:40
• I would start with the largest numbers in the corners as they contribute to two sides that have only three numbers to add to 38 and putting 1 in the center as it contributes only to rows of five. Commented Jun 25 at 0:52

Update: Unfortunately the strategy given below does not work.

Consider the following 3x3 magic square where the rows, columns and diagonals all add up to 15:

8 1 6
3 5 7
4 9 2

Notice that 5 is the middle number in two senses. It is in the middle row, middle column AND it halfway between 1 and 9.

In your hexagon puzzle the number halfway between 1 and 19 is 10 so I suggest it should be in the middle of the hexagon. Oh wait, it already is in the middle of your diagram. So keep it there.

Going back to the 3x3 magic square, notice for each pair that adds up to 10 (1+9, 2+8, 3+7, 4+6) the numbers are arranged in opposite positions relative to the central 5.

Perhaps you could do something similar for the pairs that add up to 20 (1+19, 2+18, 3+17, ...).

Good luck!

• Unfortunately in the solution the 10 does not go in the centre. Commented Jun 24 at 13:16
• @JaapScherphuis Drats! Commented Jun 24 at 17:45