Robin Hankin <[EMAIL PROTECTED]> writes: > Hi > > How do I generate all ways of ordering sets of indistinguishable items? > > suppose I have two A's, two B's and a C. > > Then I want > > AABBC > AABCB > AACBC > ABABC > . . .snip... > BBAAC > . . .snip... > CBBAA > > [there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC] > > How do I do this?
See Knuth, The Art of Computer Programming Vol 4, Fascicle 3 and 4. Jens ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
