Graph layering is a common technique to deal with the shortest path with some restrictions. Here is a description about this technique: https://youtu.be/OQ5jsbhAv_M?t=47m7s. So, just wondering, whether this technique will be the same as doing DP, but just with a different memorization structure?
Asked
Active
Viewed 311 times
0
1 Answers
0
The shortest path algorithms are dynamic programming algorithms already. They calculate the shortest path to a node based on the shortest paths to its predecessors (optimal substructure), and memoize the results for each node, because each one can be a predecessor of several different successor nodes (overlapping subproblems).
The "layering technique" lets you extend the dynamic programming solution to handle restrictions and other kinds of complications.

Matt Timmermans
- 53,709
- 3
- 46
- 87