Description Usage Arguments Examples
View source: R/StatComp21032.R
best choice of bag
1 | knapsack_problem(n, c, w, v)
|
n |
the sum of stuff |
c |
max weight of the bag |
w |
the weight of each stuff |
v |
the value of each stuff |
1 2 3 4 5 6 7 8 | ## Not run:
n = 6
c = 10
w = c(2, 1, 1, 5, 4, 3)
v = c(2, 2, 3, 1, 5, 2)
knapsack_problem(n,c,w,v)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.