动态规划
技术--小白
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
USACO Section1.3 Calf Flac
Calf Flac It is said that if you give an infinite number of cows an infinitenumber of heavy-duty laptops (with very large keys), that they willultimately produce all the world's great palindromes原创 2014-01-05 22:32:47 · 320 阅读 · 0 评论 -
USACO Section1.1 Broken Necklace
Broken Necklace You have a necklace of N red, white, or blue beads (3 1 2 1 2 r b b r b r r b r原创 2014-01-03 18:36:30 · 239 阅读 · 0 评论 -
USACO Section1.5 Number Triangles
Number Triangles Consider the number triangle shown below. Write a program thatcalculates the highest sum of numbers that can be passed on a route thatstarts at the top and ends somewhere on the原创 2014-01-10 15:42:44 · 212 阅读 · 0 评论 -
USACO Section2.2 Subset Sums
Subset Sums JRM For many sets of consecutive integers from 1 through N (1 For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical: {原创 2014-01-16 13:20:51 · 223 阅读 · 0 评论 -
动态规划 (Dynamic Programming) 之 最长公共子序列(Longest Common Subsequence)
这个问题也是算法导论上提过的问题。注意这个问题是Subsequence不是Substring。substring的话就是子串,子串的要求的连续相等的字符序列,而subsequence不要求连续。比如说ABCD和ABD。他们的longest common subsequence就是ABD。而Longest common substring就是AB。 这个问题和Edit Distance是同样的转载 2014-01-16 13:28:26 · 257 阅读 · 0 评论 -
动态规划 (Dynamic Programming) 之 矩阵链乘法(Matrix Chain Multiplication)
这个问题是动态规划的基础的问题,也是算法导论中讨论过的问题。在这里先简单描述一下。假定有一组矩阵需要做乘法操作。但是我们知道首先矩阵乘法满足了结合律。所以可以按照不同的顺序做乘法。而且不同顺序做乘法最后的乘法次数是不同的。比如〈A1, A2, A3〉分别是10 × 100, 100 × 5, 和 5 × 50。如果按照((A1 A2)A3)的顺序来计算,就是7500次,但是如果(A1 (A2转载 2014-01-16 13:27:18 · 262 阅读 · 0 评论 -
动态规划 (Dynamic Programming) 之 最长递增子序列(Longest Increase Subsequence)
转载自:http://blog.youkuaiyun.com/hhygcy/article/details/3950158 既然已经说到了最长公共子序列,就把这个递增子序列也说了。同样的,这里subsequence表明了这样的子序列不要求是连续的。比如说有子序列{1, 9, 3, 8, 11, 4, 5, 6, 4, 19, 7, 1, 7 }这样一个字符串的的最长递增子序列就是{1,3,4,5,6,7转载 2014-01-16 13:29:26 · 227 阅读 · 0 评论 -
动态规划资料整理
http://people.cs.clemson.edu/~bcdean/dp_practice/ http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=dynProg http://hawstein.com/posts/dp-novice-to-advanced.html http://hawstein.com原创 2014-04-13 12:04:48 · 286 阅读 · 0 评论 -
动态规划 (Dynamic Programming) 之 背包问题合辑 (Knapsack, Subset Sum, Partition and change making problem )
转载自:http://blog.youkuaiyun.com/hhygcy/article/details/3955683 背包问题一直是动态规划中的经典问题。这个问题又分成01背包,完全背包,多重背包,分组背包等等。。我在这里只记录下01背包(0-1knapsack)和完全背包(unbounded knapsack)。背包问题的简单描述就是有一个背包和一堆物品。每个物品有自己的大小和价值。我们希望在一转载 2014-01-16 13:25:35 · 257 阅读 · 0 评论
分享