3 ms·
By DP state, I mean the arguments to the recursive function (for U, the state is the tuple (i, j)). For example, if you wanted to use DP to compute all-pairs-s
by tylerhou 5y ago
By DP state, I mean the arguments to the recursive function (for U, the state is the tuple (i, j)).
For example, if you wanted to use DP to compute all-pairs-shortest-paths (Floyd-Warshall), you add a third parameter to the DP state ((f(u, v, k)).
- marcodiego 5y agoSure! Dynamic programming, right?