Description Functions Author(s) References
The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.
brute_force_knapsack(x, W)
returns the solution for knapsack problem using brute force algorithm.
greedy_knapsack(x, W)
returns the solution for knapsack problem using Greedy approximation algorithm.
knapsack_dynamic(x, W)
returns the solution for knapsack problem using Dynamic programming algorithm.
Ali Etminan, Mohsen Pirmoradiyan
http://en.wikipedia.org/wiki/Knapsack_problem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.