Pickover came through with a slightly more involved brute force challenge. As usual I’ll spare you the flowery setup (though I did find it curious that it involved a character named Ben trying to reach one named Jennifer) and distill the essential details. Given this graph of values:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
find a path from any square in column 1 to any square in column 5, moving up, down, left, or right, such that the sum of all squares traversed tallies 90.
I liked writing this program because it is the most algorithmically interesting thing I have done in a long time, even though I originally solved the wrong problem. The way I originally read the problem, the task was to move from node 1 -> node 5, traversing up, down, left, or right, and find a path where the values sum to 90.
