[math-fun] A grid with MAX
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.)
I'm not so sure about this: Could you be more specific about the comparison predicate you're using to define "max"? It's unclear that simply scoring the largest value in any cell is the right thing. Rich ------------- Quoting Warren D Smith <warren.wds@gmail.com>:
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.)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (2)
-
rcs@xmission.com -
Warren D Smith