Hello everyone,
A little while ago I was asked to solve this "safe cracker" puzzle, a sweet example of a coffee table puzzle. The basic gist of this puzzle is that it contains 4 concentric circles with 16 radial sections each containing a number. However, the 3 inner concentric circles have movable components which cover every second number with another. The puzzle is solved when the 4 numbers in each and every radial section sum to 40. I have attached pictures which will hopefully make this clearer.
I wrote some code in Mathematica (shown below) which dramatically reduced the number of possible solutions and from this I was able to "crack" the puzzle, however the first rather inelegant step was to manually type in every number that occurs in each concentric circle, on both the stationary and movable parts.
circle1 = {2, 15, 23, 19, 3, 2, 3, 27, 20, 11, 27, 10, 19, 10, 13, 10}
circle2 = {17, 9, 2, 10, 2, 1, 10, 2, 15, 9, 6, 3, 9, 24, 16, 9, 22, 5, 5, 24, 10, 7, 12, 10}
circle3 = {10, 14, 2, 5, 22, 8, 2, 8, 17, 6, 15, 22, 14, 1, 5, 11, 27,5, 7, 24, 3, 15, 6, 1}
circle4 = {3, 10, 6, 6, 6, 13, 2, 3, 10, 3, 1, 6, 5, 10, 8, 10, 1, 10,10, 6, 4, 5, 4, 6}
i = 1; j = 1; k = 1; l = 1
combs = Table[{circle1[[i]], circle2[[j]], circle3[[k]], circle4[[l]]}, {i, 1, 16}, {j, 1, 24}, {k, 1, 24}, {l, 1, 24}]
list = Table[Total[Flatten[combs[[1]], 2][[i]]], {i, 1, Length[Flatten[combs[[1]], 2]]}]
Drop[Extract[Flatten[combs[[1]], 2], Position[list, 40]], {1, -1, 2}]
I would like to be able to simply take pictures of the safe cracker and use text recognition to read the numbers straight into my code, however the orientation of the numbers on the puzzle makes it not possible to do in a simple way. It seems to me that the image would have to be manipulated in order that the numbers on each of the concentric circles could be read as a straight line. I was wondering if anyone had any ideas of how this could be done?
[I have attached a couple of photos which between them show every number on the safe cracker - i.e., in the second picture the movable parts have been adjusted to show the previously hidden numbers.]
Attachments: