感觉动态规划中最难的部分是在寻找 从状态j到状态i的递归式,就像证明归纳法一样,你得找出具体的式子来。
top bottom
bottom up
1. Longest Increasing Subsequence:
L[i] = max(1+L(j))(j<l && a[j]<a[i])
//if not exist any a[j]<a[i]
L[i] = 1;
getmaxvalueof array a[]
2. Maximum Sum Increasing Subsequence
almost same with above
3. Maximum continous sum
4. rod cutting