Description Usage Arguments Details Author(s) References See Also Examples
Brute force algorithm for the knapsack problem
1 | brute_force_knapsack(X, W)
|
W |
is the total size of the knapsack |
x |
is a data.frame containing variables 'w' and 'v', weights and values |
This algorithm gives 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 | brute_force_knapsack(x = knapsack_objects[1:12,], W = 3500)
brute_force_knapsack(x = knapsack_objects[1:8,], W = 2000)
brute_force_knapsack(x = knapsack_objects[1:12,], W = 2000)
brute_force_knapsack(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.