knapsack_01_brute, a Fortran77 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.
COMBINATION_LOCK, a Fortran77 program which simulates the process of determining the secret combination of a lock.
COMBO, a Fortran77 library which includes many combinatorial routines.
partition_brute, a Fortran77 library which uses brute force to seek solutions of the partition problem, splitting a set of integers into two subsets with equal sum.
SATISFY, a Fortran77 program which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem.
SUBSET, a Fortran77 library which enumerates, generates, ranks and unranks combinatorial objects including combinations, partitions, subsets, index sets, and trees.
SUBSET_SUM, a Fortran77 library which seeks solutions of the subset sum problem, in which it is desired to find a subset of a set of integers which has a given sum.
TSP_BRUTE, a Fortran77 program which reads a file of city-to-city distances and solves the traveling salesperson problem, using brute force.