Interval DP (O(N^3))
- Stage
- 6
- Module
- M6.6
- Lessons
- 1
In this module
- Define a subproblem as a contiguous interval in a sequence.
- Compute solutions bottom-up by increasing interval length.
- Optimize interval DP with convex hull or monotonicity pruning when O(n³) is too slow.
- Recognize problems solvable by splitting an interval at each possible position.
Before this module
Lessons
Practice
Try this on the judge. The link opens the problem on DMOJ.
- 2016 S4Combining Riceballs (opens on DMOJ in a new tab) DMOJ
Fill a table over subarrays, from shorter intervals to longer ones, to combine adjacent groups.
Why DMOJ: An older interval-DP problem that still makes good practice for this module.