0

Could we say that Dynamic programming is nothing but recursion + Memoization?
Although the formal definition of dynamic programming is that the problem should have an optimal substructure property, which in a way is nothing else but recursion.

nicku
  • 143
  • 4
  • https://cs.stackexchange.com/q/99513/755, https://cs.stackexchange.com/q/2644/755, https://cs.stackexchange.com/q/47216/755, https://cs.stackexchange.com/q/2057/755 – D.W. Sep 03 '22 at 17:31
  • Yes, "Dynamic programming=Recursion + Memoization". It sounds simple (and often is), but sometimes the problem is to come up with recursion so that DP is efficient. E.g., for Hamiltonian path, naive DP will give you $\tilde O(n!)$ time, while with a certain optimization it becomes $\tilde O(2^n)$. Do check the links above. – Dmitry Sep 04 '22 at 01:12

0 Answers0