knapsack_dynamic: Knapsack Dynamic

Description Usage Arguments Value References

View source: R/knapsack_dynamic.R

Description

Returns the maximum value given the capacity of knapsack by using dynamic programming.

Usage

1

Arguments

x

A data.frame consisting of two variables. w represents the object's weight and v is the value.

W

the maximum capacity of the knapsack.

Value

A list containing the maximum value and the elements.

References

en.wikipedia.org/wiki/Knapsack_problem


Jorisvdoorn/lab6group8 documentation built on Oct. 30, 2019, 8:02 p.m.