1

Example: Uniquely distribute 2 Red Balls and 4 Blue Balls into 3 boxes:

[B][BB][RRB]
[B][BBB][RR]
[B][R][RBBB]
[B][RB][RBB]
[BB][R][RBB]
[BBB][R][RB]

Answer:

6 combinations

[B][B][RRBB] is not valid. Each box should be unique from other boxes. [RRB][BB][B] is not valid. This is same as the first one.

So, how to arrive at (an algorithm is also good) unique ways to distribute N (= k1 + k2 + k3 .. km) balls into n boxes so that no two boxes has same combination. where, ki balls are indistiguishable from each other, but distiguitable from other N-ki balls. (i = 1..m)

Went through below links with not much help:

http://scollyer-tuition.blogspot.in/2011/03/permutations-and-combinations-using.html

https://en.wikipedia.org/wiki/Hypergeometric_distribution#Multivariate_hypergeometric_distribution

Unique ways to keep N balls into K Boxes?

0 Answers0