Tuesday, November 30, 2010

Enumerating and generating combinations of symbols

1. Order doesn't matter, repetition not allowed

Enumerating: Subsets, Sampling: ???

2. Order doesn't matter, repetition allowed
Enumerating: IntegerPartition followed by Permutations followed by mapping counts into symbols , Sampling: ???

3. Order matters, repetition not allowed:
Enumerating: Permutations@Subsets, Sampling: RandomSample

4. Order matters, repetition allowed:
Enumerating: Tuples, Sampling: RandomChoice

No comments:

Post a Comment