which is much more readily interpretable. The last column, for example, shows partition $\left\lbrace2,4\right\rbrace\left\lbrace3,5\right\rbrace\left\lbrace1\right\rbrace$. Note the absence of $\left\lbrace4,2\right\rbrace\left\lbrace3,5\right\rbrace\left\lbrace1\right\rbrace$ and $\left\lbrace3,5\right\rbrace\left\lbrace2,4\right\rbrace\left\lbrace1\right\rbrace$: the two boxes of size 2 are indistinguishable. It would be good to implement this in the package, although we must take care not to break setparts(5). Compare multinomial():
Here we see $\left\lbrace1,2\right\rbrace\left\lbrace3,4\right\rbrace\left\lbrace5\right\rbrace$ and $\left\lbrace3,4\right\rbrace\left\lbrace1,2\right\rbrace\left\lbrace5\right\rbrace$: multinomial() considers the two boxes of size 2 to be distinguishable.
Suppose I want to list all partitions of a set of 5 elements into sets of size 2,2,1:
But this is not very clear. We can use
listParts()
But above we see a list, which is not particularly easy to use. But how about this:
which is much more readily interpretable. The last column, for example, shows partition $\left\lbrace2,4\right\rbrace\left\lbrace3,5\right\rbrace\left\lbrace1\right\rbrace$. Note the absence of $\left\lbrace4,2\right\rbrace\left\lbrace3,5\right\rbrace\left\lbrace1\right\rbrace$ and $\left\lbrace3,5\right\rbrace\left\lbrace2,4\right\rbrace\left\lbrace1\right\rbrace$: the two boxes of size 2 are indistinguishable. It would be good to implement this in the package, although we must take care not to break
setparts(5)
. Comparemultinomial()
:Here we see $\left\lbrace1,2\right\rbrace\left\lbrace3,4\right\rbrace\left\lbrace5\right\rbrace$ and $\left\lbrace3,4\right\rbrace\left\lbrace1,2\right\rbrace\left\lbrace5\right\rbrace$:
multinomial()
considers the two boxes of size 2 to be distinguishable.