正在加载图片...
Dynamic Programming Instance:n items i=1,2,...,n; weights w1,,wn∈Z+;values v1,,yn∈Zt; knapsack capacity BEZ; 。Define: mim∑esif3S1…is.tv=y A(i,v)= :了ΣjeSy=v j∈S otherwise Answer to the knapsack problem: max{v|A(n,v)≤B• Define: • Answer to the knapsack problem: max {v ∣ A(n, v) ≤ B} Dynamic Programming Instance: items ; weights ; values ; knapsack capacity ; n i = 1,2,…, n w1,…,wn ∈ ℤ+ v1,…, vn ∈ ℤ+ B ∈ ℤ+ A(i, v) = min S ⊆ {1,…, i} ∑j∈S vj = v ∑j∈S wj if ∃S ⊆ {1,…, i} s.t. v = ∑ j∈S vj ∞ otherwise
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有