The15 partitions of a 4-element set ordered in aHasse diagramThere areS(4,1), ...,S(4, 4) = 1, 7, 6, 1 partitions containing 1, 2, 3, 4 sets.
Inmathematics, particularly incombinatorics, aStirling number of the second kind (orStirling partition number) is the number of ways topartition a set ofn objects intok non-empty subsets and is denoted by or.[1] Stirling numbers of the second kind occur in the field ofmathematics calledcombinatorics and the study ofpartitions. They are named afterJames Stirling.
The Stirling numbers of thefirst and second kind can be understood as inverses of one another when viewed astriangular matrices. This article is devoted to specifics of Stirling numbers of the second kind. Identities linking the two kinds appear in the article onStirling numbers.
The Stirling numbers of the second kind, written or or with other notations, count the number of ways topartition aset of labelled objects into nonempty unlabelled subsets. Equivalently, they count the number of differentequivalence relations with precisely equivalence classes that can be defined on an element set. In fact, there is abijection between the set of partitions and the set of equivalence relations on a given set. Obviously,
forn ≥ 0, and forn ≥ 1,
as the only way to partition ann-element set inton parts is to put each element of the set into its own part, and the only way to partition a nonempty set into one part is to put all of the elements in the same part. UnlikeStirling numbers of the first kind, they can be calculated using a one-sum formula:[2]
The Stirling numbers of the first kind may be characterized as the numbers that arise when one expresses powers of an indeterminatex in terms of thefalling factorials[3]
(In particular, (x)0 = 1 because it is anempty product.)
Stirling numbers of the second kind satisfy the relation
Various notations have been used for Stirling numbers of the second kind. The brace notation was used by Imanuel Marx and Antonio Salmeri in 1962 for variants of these numbers.[4][5] This ledKnuth to use it, as shown here, in the first volume ofThe Art of Computer Programming (1968).[6][7] According to the third edition ofThe Art of Computer Programming, this notation was also used earlier byJovan Karamata in 1935.[8][9] The notationS(n,k) was used byRichard Stanley in his bookEnumerative Combinatorics and also, much earlier, by many other writers.[6]
The notations used on this page for Stirling numbers are not universal, and may conflict with notations in other sources.
Stirling numbers of the second kind obey the recurrence relation (first discovered by Masanobu Saka in his 1782Sanpō-Gakkai):[11]
with initial conditions
For instance, the number 25 in columnk = 3 and rown = 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.
To prove this recurrence, observe that a partition of the objects intok nonempty subsets either contains the-th object as a singleton or it does not. The number of ways that the singleton is one of the subsets is given by
since we must partition the remainingn objects into the available subsets. In the other case the-th object belongs to a subset containing other objects. The number of ways is given by
since we partition all objects other than the-th intok subsets, and then we are left withk choices for inserting object. Summing these two values gives the desired result.
Another recurrence relation is given by
which follows from evaluating at.
It is also conjectured that for a fixed we have
Here we start with recursively computing of, then compute and so on up to.
This is because dividingn elements inton − 1 sets necessarily means dividing it into one set of size 2 andn − 2 sets of size 1. Therefore we need only pick those two elements;
and
To see this, first note that there are 2nordered pairs of complementary subsetsA andB. In one case,A is empty, and in anotherB is empty, so2n − 2 ordered pairs of subsets remain. Finally, since we wantunordered pairs rather thanordered pairs we divide this last number by 2, giving the result above.
Another explicit expansion of the recurrence-relation gives identities in the spirit of the above example.
The table in section 6.1 ofConcrete Mathematics provides a plethora of generalized forms of finite sums involving the Stirling numbers. Several particular finite sums relevant to this article include
The parity of a central Stirling number of the second kind is odd if and only if is afibbinary number, a number whosebinary representation has no two consecutive 1s.[12]
where areTouchard polynomials. If one sums the Stirling numbers against the falling factorial instead, one can show the following identities, among others:
and
which has special case
For a fixed integerk, the Stirling numbers of the second kind have rational ordinary generating function
For fixed, is unimodal, that is, the sequence increases and then decreases. The maximum is attained for at most two consecutive values ofk. That is, there is an integer such that
Looking at the table of values above, the first few values for are
When is large
and the maximum value of the Stirling number can be approximated with
In particular, thenth moment of the Poisson distribution with expected value 1 is precisely the number ofpartitions of a set of sizen, i.e., it is thenthBell number (this fact isDobiński's formula).
In other words, thenth moment of thisprobability distribution is the number of partitions of a set of sizen into no more thanm parts.This is proved in the article onrandom permutation statistics, although the notation is a bit different.
The Stirling numbers of the second kind can represent the total number ofrhyme schemes for a poem ofn lines. gives the number of possible rhyming schemes forn lines usingk unique rhyming syllables. As an example, for a poem of 3 lines, there is 1 rhyme scheme using just one rhyme (aaa), 3 rhyme schemes using two rhymes (aab, aba, abb), and 1 rhyme scheme using three rhymes (abc).
Ther-Stirling number of the second kind counts the number of partitions of a set ofn objects intok non-empty disjoint subsets, such that the firstr elements are in distinct subsets.[16] These numbers satisfy therecurrence relation
Some combinatorial identities and a connection between these numbers and context-free grammars can be found in[17]
Anr-associated Stirling number of the second kind is the number of ways to partition a set ofn objects intok subsets, with each subset containing at leastr elements.[18] It is denoted by and obeys the recurrence relation
The 2-associated numbers (sequenceA008299 in theOEIS) appear elsewhere as "Ward numbers" and as the magnitudes of the coefficients ofMahler polynomials.
Denote then objects to partition by the integers 1, 2, ...,n. Define the reduced Stirling numbers of the second kind, denoted, to be the number of ways to partition the integers 1, 2, ...,n intok nonempty subsets such that all elements in each subset have pairwise distance at leastd. That is, for any integersi andj in a given subset, it is required that. It has been shown that these numbers satisfy
(hence the name "reduced").[19] Observe (both by definition and by the reduction formula), that, the familiar Stirling numbers of the second kind.
^Confusingly, the notation that combinatorialists use forfalling factorials coincides with the notation used inspecial functions forrising factorials; seePochhammer symbol.
^Transformation of Series by a Variant of Stirling's Numbers, Imanuel Marx,The American Mathematical Monthly69, #6 (June–July 1962), pp. 530–532,JSTOR2311194.
^Antonio Salmeri, Introduzione alla teoria dei coefficienti fattoriali,Giornale di Matematiche di Battaglini90 (1962), pp. 44–54.
^Wilson, R., & Watkins, J. J., ed. (2013).Combinatorics: Ancient & Modern. Oxford University Press. p. 26.ISBN978-0-19-965659-2.{{cite book}}: CS1 maint: multiple names: editors list (link)
^L. C. Hsu, Note on an Asymptotic Expansion of the nth Difference of Zero, AMS Vol.19 NO.2 1948, pp. 273--277
^N. M. Temme, Asymptotic Estimates of Stirling Numbers, STUDIES IN APPLIED MATHEMATICS 89:233-243 (1993), Elsevier Science Publishing.
^Broder, A. (1984). The r-Stirling numbers. Discrete Mathematics 49, 241-259
^Triana, J. (2022). r-Stirling numbers of the second kind through context-free grammars. Journal of automata, languages and combinatorics 27(4), 323-333
^L. Comtet,Advanced Combinatorics, Reidel, 1974, p. 222.