brute_force_knapsack: Brute Force Knapsack Algorithm

Description Usage Arguments Value References

View source: R/brute_force_knapsack.R

Description

Solution to the knapsack problem using brute-force search.
The algorithm goes through all possible alternatives and returns the maximum value found.
Correct answer guaranteed in all situations.

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.