Description Usage Arguments Source Examples
Title Dynamic Program Knapsack
1 | knapsack_dynamic(x, W)
|
x |
The input to function containing the number of items |
W |
The weights of the items |
http://www.es.ele.tue.nl/education/5MC10/Solutions/knapsack.pdf
1 2 3 4 | set.seed(42)
n <- 2000
knapsack_objects <- data.frame(w=sample(1:4000, size = n, replace = TRUE), v=runif(n = n, 0, 10000))
knapsack_dynamic(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.