Solution to Problem 2: "Number Maze"
![]() |
We're going to find the path by tracing backwards. For instance, if we had a path from the start to the finish, where could the next-to-last entry be? Obviously, its value would be the number of steps it was away from G. The only two cells that satisfy that quality are the second 2 in the bottom row and the second 4 in the right column. We'll indicate these with arrows pointing in the correct direction, and circle the G to indicate that we've found all of its possible predecesors. |
![]() |
Now, we can repeat the process with the arrowed uncircled squares instead
of the G. We quickly find that there are no cells that would get you to the 4, but
the 2 could be reached from the 4 above it. So we circle both of the currently
arrowed numbers to show that we've analyzed them, and work on the 4 above the 2. We continue like this for some time, until we either run out of new arrows or put an arrow in the start square. Fortunately, it is the second case that happens here. (We could keep going if we like, probably finding an path for every square in the diagram, but it's not important to us.) |
![]() |
From here, all we have to do is follow the path in the directions the arrow points, and we find the path to the goal. The numbers we hit on the way are 5 4 4 3 3 2 2 3 4 1 3 4 2. |
Comments: The biggest puzzle for me here was getting the whole grid to show up on my browser, since on the monitor and on the printer only the first three columns were normally visible. I'm glad that I happen upon a way to do it during the contest, because it was a relaxing way to spend my last five minutes on the contest before turning in my final solution. Still, it's a little nervewracking to have to enter a thirteen digit solution where there were so many ways come up with the correct answer to the puzzle and make a mistake getting it into the form.