// output of ./demo/comb/mset-perm-lex-rec-demo.cc: // Description: //% All multiset permutations in lexicographic order, recursive generation. //% Same as: all strings with fixed content. args: multiplicities of elements multiplicities: ( 2, 2, 1 ) k=3 n=5 1: [ . . 1 1 2 ] 2: [ . . 1 2 1 ] 3: [ . . 2 1 1 ] 4: [ . 1 . 1 2 ] 5: [ . 1 . 2 1 ] 6: [ . 1 1 . 2 ] 7: [ . 1 1 2 . ] 8: [ . 1 2 . 1 ] 9: [ . 1 2 1 . ] 10: [ . 2 . 1 1 ] 11: [ . 2 1 . 1 ] 12: [ . 2 1 1 . ] 13: [ 1 . . 1 2 ] 14: [ 1 . . 2 1 ] 15: [ 1 . 1 . 2 ] 16: [ 1 . 1 2 . ] 17: [ 1 . 2 . 1 ] 18: [ 1 . 2 1 . ] 19: [ 1 1 . . 2 ] 20: [ 1 1 . 2 . ] 21: [ 1 1 2 . . ] 22: [ 1 2 . . 1 ] 23: [ 1 2 . 1 . ] 24: [ 1 2 1 . . ] 25: [ 2 . . 1 1 ] 26: [ 2 . 1 . 1 ] 27: [ 2 . 1 1 . ] 28: [ 2 1 . . 1 ] 29: [ 2 1 . 1 . ] 30: [ 2 1 1 . . ] ct=30 rct=89 rec/object=2.96667