= Solution
An allocation is a <tuple> $(x_1,\ldots,x_k)$ of nonnegative <integers> with $\sum_jx_j=n$, where $x_j$ is the number in labelled box $j$. Empty boxes are allowed. Encode the allocation by $n$ stars and $k-1$ bars: put $x_1$ stars before the first bar, $x_2$ between the first two bars, and so on. Adjacent bars represent an empty intermediate box; a bar at an end represents an empty end box.
Reading the group sizes recovers exactly one allocation from every such string, so this is a <bijection>. There are $n+k-1$ positions and we choose the $k-1$ bar positions. Hence <stars and bars> gives
$$
\boxed{\binom{n+k-1}{k-1}.}
$$
No extra factor for ordering the objects is present, because the objects are indistinguishable. For $k=1$ the string has no bars and gives the single allocation of all objects to that box; for $n=0$ all boxes are empty, also a single allocation.
Back to article page