# distributing n identical objects to r groups with each group recieve different number of object

I have 20 identical objects to distribute to 6 different groups, but each group have to receive different number of object. How many way to do it?

I know the way to distribute n identical object to r different group is the same method as star and bar formula $n+r−1 \choose n$.

But I don't know how to do with restriction "each group have to receive different number of object". (Group can receive no object.)

• Can some group have no objects? Because $\sum_{i=1}^6i=21>20$ – Tony Hellmuth Jun 2 '18 at 5:29
• Yes, group can have no object, but not more than 1 group, since they have to recieve different number of object. – sawr Jun 2 '18 at 5:45

Start off with $0+1+2+3+4+5=15$. The ways to add the remaining $5$ objects to this while retaining order and distinctness correspond to the partitions of $5$ (e.g. $5=2+3$ corresponds to $0+1+2+3+(4+2)+(5+3)$), of which there are $7$. You can assign each of the resulting partitions to the $6$ groups in $6!=720$ different ways, so to total count is $7!=5040$.