14 Apr
2013
14 Apr
'13
7:24 p.m.
The problem can be generalized to arbitrary graphs instead of the 2D grid graphs (with or without starting point specified). It was claimed the 6x6 grid is not feasible to solve. I claim it is feasible to solve. Use "dynamic programming," tabulating the max on every (king-connected?) subgraph of the original graph which includes the startpoint. For a 6x6 grid graph this would require a table with 2^35 = 32 billion entries, but if you have enough memory for that, then it should be feasible to solve it pretty quickly, I would guess in <=10 minutes. (Also you can trade off space for time in some hopefully obvious ways if this is a bit too much memory.)