SUBSET
Combinatorial Routines


subset, an Octave code which enumerates, generates, randomizes, ranks and unranks combinatorial objects including combinations, compositions, Gray codes, index sets, partitions, permutations, polynomials, subsets, and Young tables. Backtracking routines are included to solve some combinatorial problems. Other routines handle continued fractions, Diophantine equations, and Pythagorean triples.

Combinatorial operations include the enumeration, generation, random selection, ranking and unranking of

Other objects considered include

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

subset 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:

BACKTRACK_BINARY_RC, an Octave code which carries out a backtrack search for a set of binary decisions, using reverse communication.

CHANGE_MAKING, an Octave code which considers the change making problem, in which a given sum is to be formed using coins of various denominations.

COMBINATION_LOCK, an Octave code which simulates the process of determining the secret combination of a lock.

COMBO, an Octave code which contains many combinatorial routines.

GRAY_CODE_DISPLAY, an Octave code which computes the Hamming distance tables for both the binary and Gray codes, and displays 3D plots that illustrate how the Gray code does a better job of providing nearby representations for nearby numbers.

MONOMIAL, an Octave code which enumerates, lists, ranks, unranks and randomizes multivariate monomials in a space of M dimensions, with total degree less than N, equal to N, or lying within a given range.

PARTITION_PROBLEM, an Octave code which seeks solutions of the partition problem, splitting a set of integers into two subsets with equal sum.

POLYNOMIAL, an Octave code which adds, multiplies, differentiates, evaluates and prints multivariate polynomials in a space of M dimensions.

SET_THEORY, an Octave code which demonstrates MATLAB commands that implement various set theoretic operations.

subset_test

SUBSET_SUM, an Octave code which seeks solutions of the subset sum problem.

TOMS515, an Octave code which can select subsets of size K from a set of size N. This is a version of ACM TOMS Algorithm 515, by Bill Buckles, Matthew Lybanon.

UNICYCLE, an Octave code which considers permutations containing a single cycle, sometimes called cyclic permutations.

Source Code:


Last revised on 17 October 2020.