brute_force_knapsack: Brute force algorithm for the knapsack problem

Description Usage Arguments Details Author(s) References See Also Examples

Description

Brute force algorithm for the knapsack problem

Usage

1

Arguments

W

is the total size of the knapsack

x

is a data.frame containing variables 'w' and 'v', weights and values

Details

This algorithm gives all possbile values with good accuracy , and also gives the maximum value for the knapsack

Author(s)

Aqeel Ahmed, Marhawi Tewolde

References

https://en.wikipedia.org/wiki/Knapsack_problem

See Also

Brute Force Knapsack

Examples

1
2
3
4
brute_force_knapsack(x = knapsack_objects[1:12,], W = 3500)
brute_force_knapsack(x = knapsack_objects[1:8,], W = 2000)
brute_force_knapsack(x = knapsack_objects[1:12,], W = 2000)
brute_force_knapsack(x = knapsack_objects[1:12,], W = 2000)

akilahmd/Knapsackpackage documentation built on May 12, 2019, 4:42 a.m.