knapsack_random


knapsack_random, a Fortran90 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.

Licensing:

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

Languages:

knapsack_random is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

knapsack_random_test

f90_combinatorics, a Fortran90 code which considers a variety of problems in combinatorics involving counting, combinations, permutations, and so on.

Source Code:


Last revised on 29 November 2024.