Dynamic Programming21 sections · 916 units
Open in Course

Why QI Implies Monotonicity

The proof

I'll prove: if cost satisfies QI, then opt[i]opt[i+1]opt[i] \leq opt[i+1]. This means optopt is monotonic (non-decreasing): as the state index grows, the optimal split never moves backward.

Assume for contradiction that opt[i+1]=j<k=opt[i]opt[i+1] = j < k = opt[i]. Since kk is optimal for ii: dp[k]+cost(k,i)dp[j]+cost(j,i)dp[k] + cost(k,i) \leq dp[j] + cost(j,i). Since jj is optimal for i+1i+1: dp[j]+cost(j,i+1)dp[k]+cost(k,i+1)dp[j] + cost(j,i+1) \leq dp[k] + cost(k,i+1). Add these inequalities.

After canceling dp[j]dp[j] and dp[k]dp[k]: cost(k,i)+cost(j,i+1)cost(j,i)+cost(k,i+1)cost(k,i) + cost(j,i+1) \leq cost(j,i) + cost(k,i+1). But QI with a=j<b=k<c=i<d=i+1a=j < b=k < c=i < d=i+1 says the opposite! Contradiction. So opt[i]opt[i+1]opt[i] \leq opt[i+1].