Dynamic Programming21 sections · 916 units
Open in Course

The Double Bound

Why it works

Knuth's improvement uses: opt[i][j1]opt[i][j]opt[i+1][j]opt[i][j-1] \leq opt[i][j] \leq opt[i+1][j]. The left bound says: if kk was optimal for [i,j1][i, j-1], then for [i,j][i, j] you won't do better with any k<kk' < k.

Expanding the interval rightward makes later splits more attractive, not earlier ones. The right bound says: if kk was optimal for [i+1,j][i+1, j], then for [i,j][i, j] you won't do better with any k>kk' > k. Adding an element on the left makes earlier splits more attractive. Both follow from QI by the same logic as the monotonicity proof. The bounds shrink your search range dramatically.