How many different permutations?

101 Views Asked by At

Suppose I've n boxes and m different colored balls of different quantities.How many unique permutations can be obtained ?

Example : n=2,m=2, with quantities ( A - 1 ball, B - 2 balls) Thus the number of permutations is 3 ( {A,B} , {B,A} , {B,B} )

Similarly, for n=2,m=2 but with quantities ( A-1 ball, B-3 balls) , the answer should be 3 only,since the balls are identical. Please help. Thank You.

1

There are 1 best solutions below

6
On BEST ANSWER

Use a generating fraction with every term resembling $e^x$ and then try to find the coefficient of required power and it will surely depend on the values of $m,n$ and quantities too.

Suppose there are $m$ types of letters each has $q_i$ quantity, and then for $n$ bins: $${\rm W}=\text{Coefficient of $x^n$ in }n!\prod_{i=1}^m\left(\sum_{k=0}^{q_i}\frac{x^k}{k!}\right) $$