It is often necessary to generate the sequence of combinations of s things chosen from among n things, or to generate a random member of this sequence. Various algorithms have been given for these tasks. Algorithm 94 [1] is a good combination generator, and methods for generating a random combination are discussed in [2, pp. 121-125].
The Latest from CACM
Shape the Future of Computing
ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.
Get InvolvedCommunications of the ACM (CACM) is now a fully Open Access publication.
By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.
Learn More
Join the Discussion (0)
Become a Member or Sign In to Post a Comment