|
EXAMPLE
|
Non-isomorphic representatives of the a(1) = 1 through a(5) = 18 set multipartitions:
{{1}} {{1,2}} {{1,2,3}} {{1,2,3,4}} {{1,2,3,4,5}}
{{1},{2}} {{1},{2,3}} {{1,2},{1,2}} {{1},{2,3,4,5}}
{{2},{1,2}} {{1},{2,3,4}} {{1,2},{3,4,5}}
{{1},{2},{3}} {{1,2},{3,4}} {{1,4},{2,3,4}}
{{1,3},{2,3}} {{2,3},{1,2,3}}
{{3},{1,2,3}} {{4},{1,2,3,4}}
{{1},{2},{3,4}} {{1},{2,3},{2,3}}
{{1},{3},{2,3}} {{1},{2},{3,4,5}}
{{1},{2},{3},{4}} {{1},{2,3},{4,5}}
{{1},{2,4},{3,4}}
{{1},{4},{2,3,4}}
{{2},{1,3},{2,3}}
{{2},{3},{1,2,3}}
{{3},{1,3},{2,3}}
{{4},{1,2},{3,4}}
{{1},{2},{3},{4,5}}
{{1},{2},{4},{3,4}}
{{1},{2},{3},{4},{5}}
|
|
MATHEMATICA
|
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]& /@ sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
mpm[n_]:=Join@@Table[Union[Sort[Sort /@ (#/.x_Integer:>s[[x]])]&/@sps[Range[n]]], {s, Flatten[MapIndexed[Table[#2, {#1}]&, #]]& /@ IntegerPartitions[n]}];
brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{i, p[[i]]}, {i, Length[p]}])], {p, Permutations[Union@@m]}]]];
Table[Length[Union[brute /@ Select[mpm[n], And@@UnsameQ@@@#&&Select[Tuples[#], UnsameQ@@#&]!={}&]]], {n, 0, 6}]
|