dynamic programming approximation - last chunk