SUBSET
Combinatorial Routines


SUBSET is a library of MATLAB routines for performing various combinatorial operations.

These include the enumeration, generation, random selection, ranking and unranking of

Other objects considered include

Related Data and Programs:

COMBO is a FORTRAN90 library of combinatorial routines.

GRAFPACK is a FORTRAN90 library of routines for abstract graphs.

SELECT is a FORTRAN90 library of routines for the generation of various combinatorial objects.

SUBSET is also available in a C++ version and a FORTRAN90 version.

Fortran77 source code for some of the algorithms is available in the Stony Brook Algorithm Archive.

Reference:

  1. Milton Abramowitz, Irene Stegun,
    Handbook of Mathematical Functions,
    National Bureau of Standards, 1964,
    ISBN: 0-486-61272-4,
    LC: QA47.A34.
  2. Walter Ball,
    Mathematical Recreations and Essays,
    Macmillan, 1962,
    ISBN: 1417921269.
  3. Bill Buckles, Matthew Lybanon,
    Algorithm 515: Generation of a Vector from the Lexicographical Index,
    ACM Transactions on Mathematical Software,
    Volume 3, Number 2, June 1977, pages 180-182.
  4. John Conway, Richard Guy,
    The Book of Numbers,
    Springer, 1998,
    ISBN: 038797993X.
  5. Laurent Habsieger, Maxim Kazarian, Sergei Lando,
    On the Second Number of Plutarch,
    American Mathematical Monthly,
    Volume 105, Number 5, May 1998, page 446.
  6. John Halton,
    On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals,
    Numerische Mathematik,
    Volume 2, Number 1, December 1960, pages 84-90.
  7. John Hart, Ward Cheney, Charles Lawson, Hans Maehly, Charles Mesztenyi, John Rice, Henry Thatcher, Christoph Witzgall,
    Computer Approximations,
    Wiley, 1968.
  8. Mark Herkommer,
    Number Theory, A Programmer's Guide,
    McGraw Hill, 1999,
    ISBN: 0-07-913074-7.
  9. Donald Knuth,
    The Art of Computer Programming,
    Volume 3, Sorting and Searching,
    Second Edition,
    Addison Wesley, 1998,
    ISBN: 0201896850.
  10. Hang Tong Lau,
    Algorithms on Graphs,
    Tab Books, 1989,
    ISBN: 0830634290
  11. Charles Mifsud,
    Algorithm 154, Combination in Lexicographic Order,
    Communications of the ACM,
    Volume 6, Number 3, March 1963, page 103.
  12. Albert Nijenhuis, Herbert Wilf,
    Combinatorial Algorithms for Computers and Calculators,
    Second Edition,
    Academic Press, 1978,
    ISBN: 0-12-519260-6,
    LC: QA164.N54.
  13. Norman Richert,
    Strang's Strange Figures,
    American Mathematical Monthly,
    Volume 99, Number 2, February 1992, pages 101-107.
  14. James Sandeson,
    Testing Ecological Patterns,
    American Scientist,
    Volume 88, July-August 2000, pages 332-339.
  15. Ian Saunders,
    Algorithm AS 205,
    Enumeration of R x C Tables with Repeated Row Totals,
    Applied Statistics,
    Volume 33, Number 3, 1984, pages 340-352.
  16. Robert Sedgewick,
    Algorithms in C,
    Addison-Wesley, 1990,
    ISBN: 0-201-51425-7,
    LC: QA76.73.C15S43.
  17. Raymond Seroul,
    Programming for Mathematicians,
    Springer, 2000,
    ISBN: 3-540-66422-X.
  18. Mok-Kong Shen,
    Algorithm 202: Generation of Permutations in Lexicographical Order,
    Communications of the ACM,
    Volume 6, Number 9, September 1963, page 517.
  19. Dennis Stanton, Dennis White,
    Constructive Combinatorics,
    Springer, 1986,
    ISBN: 0387963472.
  20. Jack vanLint, Richard Wilson,
    A Course in Combinatorics,
    Cambridge, 1992,
    ISBN: 0-521-42260-4.
  21. Eric Weisstein,
    CRC Concise Encyclopedia of Mathematics,
    CRC Press, 2002,
    Second edition,
    ISBN: 1584883472,
    LC: QA5.W45
  22. ML Wolfson, HV Wright,
    ACM Algorithm 160: Combinatorial of M Things Taken N at a Time,
    Communications of the ACM,
    Volume 6, Number 4, April 1963, page 161.

Tar File:

A GZIP'ed TAR file of the contents of this directory is available. This is only done as a convenience for users who want ALL the files, and don't want to download them individually. This is not a convenience for me, so don't be surprised if the tar file is somewhat out of date.

Source Code:

Examples and Tests:

You can go up one level to the MATLAB source codes.


Last revised on 11 December 2006.