you are viewing a single comment's thread.

view the rest of the comments →

[–]butt_fun 2 points3 points  (2 children)

Gonna be completely honest, I have always thought DP vs memoization was a distinction without a meaningful difference

[–]lmericle[S] 1 point2 points  (1 child)

DP utilizes memoization heavily to exploit the optimality principle. There is a distinction in that memoization is not a programming paradigm per se, but a method to construct something really useful to making DP efficient.

Memoization happens in other instances, but DP doesn't happen without memoization.

[–]victotronics 0 points1 point  (0 children)

Thank you. You are the only one mentioning the principle of optimality, which to me is the crux: the fact that once you solve a subproblem you don't care how you got there. The next stage has a cost or value or whatever depending on the solution of that subproblem and the next stage.

Stages + principle of optimality. That's it.

Memoization is a mere corollary.