rectified dynamic programming with array as table columns