The information-based complexity of dynamic programming