by wopwopwop · 9y ago · 0 comments
https://en.wikipedia.org/wiki/Dynamic_programming
Am I to understand that it is "just" recursion with caching?
I do recommend you to read this chapter:
https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6....
After reading this chapter, you can try to understand why Dijkstra and Floyd-Warshall shortest path in graph algorithms work.
These classical and fundamental algorithms combine graph theory with dynamic programming.
"just caching" is also hard to apply to e.g. the tower of hanoi problem.
Spotting where it can be successfully applied is the hard part.
Recursion not required, iterative DP solutions are things too.
Maybe you could explain better...?
[0] https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6....