Stirling numbers of the second kind
From Wikipedia, the free encyclopedia
In mathematics, Stirling numbers of the second kind, together with Stirling numbers of the first kind, are one of the two types of Stirling numbers. They commonly occur in the study of combinatorics, where they count the number of permutations. The Stirling numbers of the first and second kind can be understood to be inverses of one-another, when taken as triangular matrices. This article is devoted to specifics of Stirling numbers of the second kind; further identities linking the two kinds, and general information, is given in the article on Stirling numbers.
Contents |
[edit] Definition
The Stirling numbers of the second kind S(n,k) (with a capital "S") count the number of ways to partition a set of n elements into k nonempty subsets. The sum
is the nth Bell number. If we let
(in particular, (x)0 = 1 because it is an empty product) be the falling factorial, we can characterize the Stirling numbers of the second kind by
(Confusingly, the notation that combinatorialists use for falling factorials coincides with the notation used in special functions for rising factorials; see Pochhammer symbol.)
[edit] Table of values
Below is a table of values for the Stirling numbers of the second kind:
n \ k | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
0 | 1 | |||||||||
1 | 0 | 1 | ||||||||
2 | 0 | 1 | 1 | |||||||
3 | 0 | 1 | 3 | 1 | ||||||
4 | 0 | 1 | 7 | 6 | 1 | |||||
5 | 0 | 1 | 15 | 25 | 10 | 1 | ||||
6 | 0 | 1 | 31 | 90 | 65 | 15 | 1 | |||
7 | 0 | 1 | 63 | 301 | 350 | 140 | 21 | 1 | ||
8 | 0 | 1 | 127 | 966 | 1701 | 1050 | 266 | 28 | 1 | |
9 | 0 | 1 | 255 | 3025 | 7770 | 6951 | 2646 | 462 | 36 | 1 |
[edit] Recurrence relation
Stirling numbers of the second kind obey the recurrence relation
with
For instance, the number 25 in column k=3 and row n=5 is given by 25=7+(3×6), where 7 is the number above and to the left of 25, 6 is the number above 25 and 3 is the column containing the 6.
[edit] Parity
Using a Sierpiński triangle, it's easy to show that the parity of a Stirling number of the second kind is equal to the parity of a related binomial coefficient:
Or directly, let two sets contain positions of 1's in binary representations of results of respective expressions:
then mimic a bitwise AND operation by intersecting these two sets:
to obtain the parity of a Stirling number of the second kind in O(1) time.
[edit] Simple identities
Some simple identities include
This is because dividing n elements into n − 1 sets necessarily means dividing it into one set of size 2 and n − 2 sets of size 1. Therefore we need only pick those two elements;
and
To see this, first note that there are 2 n ordered pairs of complementary subsets A and B. In one case, A is empty, and in another B is empty, so 2 n − 2 ordered pairs of subsets remain. Finally, since we want unordered pairs rather than ordered pairs we divide this last number by 2, giving the result above.
Another explicit expanding of the recurrence-relation gives identities in the spirit of the above example.
[edit] Explicit formula
The Stirling numbers of the second kind are given by the explicit formula:
This formula is a special case of the k 'th forward difference of the monomial xn evaluated at x = 0:
Because the Bernoulli polynomials may be written in terms of these forward differences, one immediately obtains a relation in the Bernoulli numbers:
[edit] Generating function
A generating function for the Stirling numbers of the second kind is given by
[edit] Moments of the Poisson distribution
If X is a random variable with a Poisson distribution with expected value λ, then its nth moment is
In particular, the nth moment of the Poisson distribution with expected value 1 is precisely the number of partitions of a set of size n, i.e., it is the nth Bell number (this fact is Dobinski's formula).
[edit] Moments of fixed points of random permutations
Let the random variable X be the number of fixed points of a uniformly distributed random permutation of a finite set of size m. Then the nth moment of X is
Note: The upper bound of summation is m, not n.
In other words, the nth moment of this probability distribution is the number of partitions of a set of size n into no more than m parts. This is proved on the page on random permutation statistics, although the notation is a bit different.
[edit] Rhyming Schemes
The Stirling numbers of the second kind can represent the total number of rhyme schemes for a poem of n lines. S(n,k) gives the number of possible rhyming schemes for n lines using k unique rhyming syllables. As an example, for a poem of 3 lines, there is 1 rhyme scheme using just 1 rhyme (aaa), 3 rhyme schemes using two rhymes (aab, aba, abb), and one rhyme scheme using 3 rhymes (abc).
[edit] Cereal Box Problem
The Stirling numbers of the second kind can represent the total number of ways a person can collect all prizes after opening a given number of cereal boxes. For example, if there are 3 prizes, and one opens three boxes, there is S(3,3), or 1 way to win, {1,2,3}. If 4 boxes are opened, there are 6 ways to win S(4,3); {1,1,2,3}, {1,2,1,3}, {1,2,3,1}, {1,2,2,3}, {1,2,3,2}, {1,2,3,3}.
[edit] See also
- Bell number - the number of partitions of a set with n members
[edit] References
- Stirling numbers of the second kind, S(n,k) on PlanetMath.
- A008277 Triangle of Stirling numbers of 2nd kind, S2(n,k), n >= 1, 1<=k<=n. [1]