That formula (6! / 3(2!)) only applies if you have 6 items and put exactly two in each container.
You're right. That's why I asked if my assumption was correct that the containers have limited capacity. If it were, distributing 5 elements on 3 containers with a capacity of 2 each is the same as distributing 6, where the sixth is the empty/missing element.
I don't think it expresses something about the maximal capacity, it's about a fixed capacity that you must put in each container.
If you have a maximal capacity, and add virtual filling items, the problem becomes very similar to a fixed capacity - except that you have to divide by the factorial of the number of filling items, which I forgot in my previous post.
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] |