感觉动态规划中最难的部分是在寻找 从状态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

Posted on 2012-05-17 09:54 micheal's tech 阅读(409) 评论(0)  编辑 收藏 引用 所属分类: Algorithm

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理