Consider . For each of states, you check previous states. That's . For interval DP like , you have states and choices per state. That's .
With or even , these are too slow. But what if you didn't need to check every or every ?
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
The problem
Consider . For each of states, you check previous states. That's . For interval DP like , you have states and choices per state. That's .
With or even , these are too slow. But what if you didn't need to check every or every ?