1.3.5 Generating Subsets
INPUT OUTPUT
Input Description:
An integer
n
.
Problem:
Generate (1) all, or (2) a random, or (3) the next subset
of the integers
1
to
n
.
Implementations
Nijenhuis and Wilf: Combinatorial Algorithms (FORTRAN) (rating 8)
Combinatorica (Mathematica) (rating 7)
Frank Ruskey's Combinatorial Generation Resources (Pascal) (rating 7)
Netlib / TOMS -- Collected Algorithms of the ACM (FORTRAN) (rating 3)
Related Problems
Generating Partitions
Generating Permutations
Random Number Generation
Set Data Structures
Go to the corresponding chapter in the book
About the Book
Send us Mail
Go to Main Page
This page last modified on Tue Jun 03, 1997
.