6

When have you ever directly applied the concepts of dynamic programming to solve a problem in the field? It's sometimes not evident how it can be applied when using it to solve a made-up instance of the knapsack problem.

4

1 回答 1

3

It's probably a lot more common to use memoization to solve problems in the field, since it's applicable to a wider set of problems. DP is really only called for when you have a lot of overlapping sub-problems, like in calculating fibonacci numbers (the hard way), or prime numbers (the efficient way).

Incidentally, the page you linked to has a list of algorithms that use DP.

于 2008-10-26T17:53:13.637 回答