Description Usage Arguments Details Author(s) References See Also Examples
Dynamic programming algorithm for the knapsack problem
1 | knapsack_dynamic(X, W)
|
W |
is the total size of the knapsack |
x |
is a data.frame containing variables 'w' and 'v', weights and values |
An algorithm that can solve the knapsack problem exact by iterating over all possible values of w all possbile values with good accuracy , and also gives the maximum value for the knapsack
Aqeel Ahmed, Marhawi Tewolde
https://en.wikipedia.org/wiki/Knapsack_problem
1 2 3 4 | knapsack_dynamic(x = knapsack_objects[1:12,], W = 3500)
knapsack_dynamic(x = knapsack_objects[1:8,], W = 2000)
knapsack_dynamic(x = knapsack_objects[1:12,], W = 2000)
knapsack_dynamic(x = knapsack_objects[1:12,], W = 2000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.