views:

745

answers:

4

I am looking for a manageably understandable example for someone who wants to learn Dynamic Programming. There are nice answers here about what is dynamic programming. The fibonacci sequence is a great example, but it is too small to scratch the surface. It looks a great subject to learn about although I haven't taken the algorithms class yet, hopefully it is on my list for the spring.

Thanks,

+1  A: 

Calculating Levenshtein distances was one of the first problems I solved with dynamic programming; I think it is a decent next step from the Fibonacci sequence in terms of complexity.

http://en.wikipedia.org/wiki/Levenshtein%5Fdistance

David Winslow
+3  A: 

Check out this site: Dynamic Programming Practice Problems

Nick D
+1  A: 

The idea behind dynamic programming is that you're caching (memoizing) solutions to subproblems, though I think there's more to it than that.

There are many Google Code Jam problems such that solutions require dynamic programming to be efficient. Examples:

Welcome to Code Jam (moderate)

Cheating a Boolean Tree (moderate)

PermRLE (hard)

Note that each of the Code Jam practice contests has a "Contest Analysis" section for if you're stumped trying to solve the problem.

Joey Adams
Thanks for the resources. I solve one or two questions from project euler from time to time, and it seems that I am really stuck at some problems which need knowledge about DP.
AraK
+4  A: 

TopCoder tutorial for DP is one of the best.

Olexiy