Does $\sum_{i = 1}^n S(k, i)i! = n^k$?

105 Views Asked by At

Consider the number of ways of ditributing $k$ distinct objects into $n$ distinct boxes, where $k \ge n$.

On one hand, we can assign a box to each object. There are $n^k$ ways to do this.

On the other hand, we can also distribute all the objets into only $1$ box, or only $2$ boxes, $\dots$, or only $n - 1$ boxes, or into all $n$ boxes. The number of ways to do this is

$$\sum_{i = 1}^n S(k, i)i!$$

where $S(k,n)$ are Stirling numbers of the second kind.

Since both ways of counting are equal,

$$\sum_{i = 1}^n S(k, i)i! = n^k$$

However, this is generally not true. When $n = 3$ and $k = 8$, LHS = $6051$ while $RHS = 6561$. I am unable to figure out where I've under counted or over counted.

1

There are 1 best solutions below

0
On BEST ANSWER

You are not accounting for some permutations. The right formula is: $$ n^k = \sum_{i=1}^{k}{k \brace i}\,i!\binom{n}{i}.$$