If you fill in a path backwards, the score is the same. (This is easy to see for symmetrical paths like the max of the 4x4, but it's true generally.) If you break a path into two parts, and write down all the numbers the first part going forward and for the second part backward, you can then compute the score for the combined path by summing the products of across-the-border neighbors (without needing to remember where the paths go). For instance, here's the 4x4 winner split down the middle: 1 1 | 1 1 2 4 | 4 2 6 18 | 18 6 6 30 | 30 6 You might write the total as: (1 + 4) * 1 + (1 + 4 + 18) * 4 + (4 + 18 + 30) * 18 + (18 + 30) * 30 = 2473 and pre-calculate the parenthesized expressions for a given left-half-path. This by itself doesn't reduce the capital-O order of the search. But in the example above, (30 + 18)**2 = 2304, which accounts for about 98% of the total. Seems true usually. I think it hints at ways to rate half-paths independently and cut the search with branch-and-bound. (And then there's recursive subdivision.) Exploiting this looks wrinklier than I want to attempt. --Steve p.s. i guess generally a partial path is a matrix, the initial and final conditions are vectors (sometimes with only a single one), and the connections across a border form a matrix of ones and zeroes. i would love it if bras and kets were appropriate.
participants (1)
-
Steve Witham