knapsack_random


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.

Licensing:

The information on this web page is distributed under the MIT license.

Related Data and Programs:

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.

Source Code:


Last revised on 29 November 2024.