knapsack_random_test, a C code which calls knapsack_random(), which randomly chooses a subset of N items, each with given value and weight. It then evaluates whether this is a feasible solution to a problem in which a thief's knapsack can carry no more than Wmax pounds, and it is desired to maximum the total value of the selected items.
The information on this web page is distributed under the MIT license.
knapsack_random, a C code which randomly chooses a subset of N items, each with given value and weight. It then evaluates whether this is a feasible solution to a problem in which a thief's knapsack can carry no more than Wmax pounds, and it is desired to maximum the total value of the selected items.