knapsack_01_brute, a C++ code which uses brute force to solve small versions of the 0/1 knapsack problem, in which a knapsack of limited weight capacity is to be packed as full as possible, selecting items from a set of varying weights;
This library uses a simple brute force or exhaustive search method, which is guaranteed to get the optimal solution, but which is not efficient for large values of N.
The information on this web page is distributed under the MIT license.
knapsack_01_brute 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.
combo, a C++ code which includes many combinatorial routines.
cpp_combinatorics, a C++ code which considers a variety of problems in combinatorics involving counting, combinations, permutations, and so on.
knapsack, a dataset directory which contains test data for the knapsack problem; we consider n items of given value and weight, and a knapsack with a weight limit. We wish to select items to store in the knapsack which maximize the total value.