On 1/17/07, Schroeppel, Richard <rschroe@sandia.gov> wrote:
... The objects being partitioned are important in case B, while only the sizes of the pieces matter in case A.
The other day, I realized that these two concepts could be joined together, with partitions of bags (multisets, sets with repeated elements). ...
The same principle may be applied to permutations and combinations: the permutation is represented by a vector of n distinct integers modulp n, the combination by a vector comprising m 1's and n-m 0's, and the same algorithm may then be employed to generate either object. Plainly other bags of symbols lead to generation of intermediate "permbinations", enumerated by multinomial coefficients. A pleasant problem is to attempt to design such a generator algorithm utilising just one (adjacent?) transposition to construct each permbination from the previous one. Fred Lunnon