Dobinski's formula

In combinatorial mathematics, Dobinski's formula states that the number of partitions of a set of n members is


 * $${1 \over e}\sum_{k=0}^\infty {k^n \over k!}.$$

This has come to be called the nth Bell number Bn, after Eric Temple Bell. See "Dobinski" in the References below.

Probabilistic content
Those familiar with probability theory will recognize the expression given by Dobinski's formula as the nth moment of the Poisson distribution with expected value 1. Today, Dobinski's formula is sometimes stated by saying the number of partitions of a set of size n equals the nth moment of that distribution.

A proof
The proof given here is an adaptation to probabilisitic language, of the proof found in Rota (1964).

Combinatorialists use the Pochhammer symbol (x)n to denote the falling factorial


 * $$(x)_n = x(x-1)(x-2)\cdots(x-n+1)\,$$

(whereas, in the theory of special functions, the same notation denotes the rising factorial). If x and n are nonnegative integers, 0 ≤ n ≤ x, then (x)n is the number of one-to-one functions that map a size-n set into a size-x set.

Let f be any function from a size-n set A into a size-x set B. For any u ∈ B, let f&minus;1(u) = {v ∈ A : f(v) = u}. Then {f&minus;1(u) : u ∈ B} is a partition of A, coming from the equivalence relation of "being in the same fiber". This equivalence relation is called the "kernel" of the function f. Any function from A into B factors into The first of these two factors is completely determined by the partition π that is the kernel. The number of one-to-one functions from π into B is (x)undefined, where |π| is the number of parts in the partition π. Thus the total number of functions from a size-n set A into a size-x set B is
 * one function that maps a member of A to that part of the kernel to which it belongs, and
 * another function, which is necessarily one-to-one, that maps the kernel into B.


 * $$\sum_\pi (x)_{|\pi|},\,$$

the index π running through the set of all partitions of A. On the other hand, the number of functions from A into B is clearly xn. Therefore we have


 * $$x^n = \sum_\pi (x)_{|\pi|}.\,$$

If X is a Poisson-distributed random variable with expected value 1, then we get that the nth moment of this probability distribution is


 * $$E(X^n) = \sum_\pi E((X)_{|\pi|}).\,$$

But all of the factorial moments E((X)k) of this probability distribution are equal to 1. Therefore


 * $$E(X^n) = \sum_\pi 1,\,$$

and this is just the number of partitions of the set A. Q.E.D.