Aristotle's number puzzle is the challenge of populating each of 19 cells in a hexagonal grid with a unique integer between 1 and 19 such that the total along every axis is 38.
You can picture the game board looking like this:
And the puzzle, in essence, is the solution to the following set of fifteen equations:
((a + b + c) == 38 && (d + e + f + g) == 38 && (h + i + j + k + l) ==
38 && (m + n + o + p) == 38 && (q + r + s) == 38 && (a + d + h) ==
38 && (b + e + i + m) == 38 && (c + f + j + n + q) ==
38 && (g + k + o + r) == 38 && (l + p + s) == 38 && (c + g + l) ==
38 && (b + f + k + p) == 38 && (a + e + j + o + s) ==
38 && (d + i + n + r) == 38 && (h + m + q) == 38)
Where each variable is a unique number in the set {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}
.
There are multiple possible solutions, and are 19!
possible combinations of integers, so naive brute force will be impractical.
Rules:
- No hardcoding the answer or looking up the answer elsewhere; your code needs to find it on its own
- Speed doesn't matter, but you do have to show your results, so code that takes 1000 years to run won't help you
- Find all the answers
- Treat answers that are identical under rotation as identical
- Deduct 5% of your total byte count if you output the results in an attractive honeycomb
- Fewest bytes wins