|
EXAMPLE
|
The a(4) = 19 multiset partitions:
{{1,1,1,1}}, {{1,1},{1,1}}, {{1},{1},{1},{1}},
{{1,1,1,2}}, {{1,1},{1,2}}, {{1},{1},{1},{2}},
{{1,1,2,2}}, {{1,1},{2,2}}, {{1,2},{1,2}}, {{1},{1},{2},{2}},
{{1,1,2,3}}, {{1,1},{2,3}}, {{1,2},{1,3}}, {{1},{1},{2},{3}},
{{1,2,3,4}}, {{1,2},{3,4}}, {{1,3},{2,4}}, {{1,4},{2,3}}, {{1},{2},{3},{4}}.
|
|
MATHEMATICA
|
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
strnorm[n_]:=Flatten[MapIndexed[Table[#2, {#1}]&, #]]&/@IntegerPartitions[n];
Table[Length[Select[Join@@mps/@strnorm[n], SameQ@@Length/@#&]], {n, 6}]
|