Description Usage Arguments Value Examples
Solve knapsack problem by brute-force search. This approach is of complexity O(2^n).
1 | brute_force_knapsack(x, W)
|
x |
data.frame, first column x:weight of object, second column v:value of object |
W |
numeric, weight limit of knapsack |
list, value: total value of objects, elements: the rows of objects
1 2 | data(knapsack_objects)
knapsack_brute_force(x = knapsack_objects[1:8,], W = 3500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.