Is there a good book specialized in exercises on finding recurrence cause i want to train on (dynamic programming) cause i find myself a lot knowing that a problem can be solved dynamically but i can't find the recurrence function .
views:
230answers:
4The only book I've read that deals with dynamic programming is "Algorithm Design" by Kleinberg and Tardos.
However, it only spends one chapter on dynamic programming so it probably isn't worth buying the whole book just for that. However, if you're interested in algorithm design in general, this book is very good, and the chapter on dynamic programming was well explained.
Maybe I didn't understand your request, but reccurence function is a generic approach, opposite to iterational algorithm which goes through the list.
So if you'd like to go deeper into that topic read some basic Lisp, scheme books. Many algorithms base on recurenction there.
Simple approach of recurence would incude:
- entry point
- check is the iteration the last one
- if no, invoke the same function again
if yes, return value
foo(list, cnt) { if (cnt<=0) return 1 else return foo(&list[1], cnt-1) }
foo( {1, 2, 3, 4} , 3)
Brian Dean's Dynamic Programming Practice Problems isn't a book, but it seems to fit the bill.
For the math behind dynamic programming, Eric Denardo's book is great. It's approachable and rigorous at the same time.
For learning algorithmic techniques in general, the single best investment you can make is the good old CLRS.
For actually learning how to apply dynamic programming, you'll want to hit the algorithmic challenge sites: TopCoder, SPOJ, USACO, the Uva Online Judge, etc.