dynamic_knapsack: Dynamic Knapsack Algorithm

Description Usage Arguments Value References

View source: R/dynamic_knapsack.R

Description

Solution to the knapsack problem using Dynamic Programming.
The algorithm solves the knapsack problem exact by iterating over all possible values of weight.

Usage

1

Arguments

x

Dataframe with variables v and w.

W

Integer. Size of the knapsack.

Value

Returns a list with the total final value and the items added to the knapsack.

References

Wikipedia


abhi-vellala/732A94lab6 documentation built on Oct. 31, 2019, 1:54 a.m.