Stirling numbers of the second kind
   HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, particularly in
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and as an end to obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ...
, a Stirling number of the second kind (or Stirling partition number) is the number of ways to partition a set of ''n'' objects into ''k'' non-empty subsets and is denoted by S(n,k) or \textstyle \left\. Stirling numbers of the second kind occur in the field of
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
called
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and as an end to obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ...
and the study of partitions. They are named after James Stirling. The Stirling numbers of the first and second kind can be understood as inverses of one another when viewed as triangular matrices. This article is devoted to specifics of Stirling numbers of the second kind. Identities linking the two kinds appear in the article on Stirling numbers.


Definition

The Stirling numbers of the second kind, written S(n,k) or \lbrace\textstyle\rbrace or with other notations, count the number of ways to partition a
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
of n labelled objects into k nonempty unlabelled subsets. Equivalently, they count the number of different
equivalence relation In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric, and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. A simpler example is equ ...
s with precisely k equivalence classes that can be defined on an n element set. In fact, there is a
bijection In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equival ...
between the set of partitions and the set of equivalence relations on a given set. Obviously, :\left\ = 1 for ''n'' ≥ 0, and \left\ = 1 for ''n'' ≥ 1, as the only way to partition an ''n''-element set into ''n'' 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. Unlike Stirling numbers of the first kind, they can be calculated using a one-sum formula: :\left\ = \frac\sum_^k (-1)^ \binom i^n = \sum_^k \frac. (see also Stirling numbers of the second kind for a proof of the latter formula) The Stirling numbers of the first kind may be characterized as the numbers that arise when one expresses powers of an indeterminate ''x'' in terms of the
falling factorial In mathematics, the falling factorial (sometimes called the descending factorial, falling sequential product, or lower factorial) is defined as the polynomial \begin (x)_n = x^\underline &= \overbrace^ \\ &= \prod_^n(x-k+1) = \prod_^(x-k) . \end ...
s :(x)_n=x(x-1)(x-2)\cdots(x-n+1) . (In particular, (''x'')0 = 1 because it is an
empty product In mathematics, an empty product, or nullary product or vacuous product, is the result of multiplication, multiplying no factors. It is by convention equal to the multiplicative identity (assuming there is an identity for the multiplication operat ...
.) Stirling numbers of the second kind satisfy the relation :\sum_^n \left\(x)_k=x^n.


Notation

Various notations have been used for Stirling numbers of the second kind. The brace notation \textstyle \lbrace\rbrace was used by Imanuel Marx and Antonio Salmeri in 1962 for variants of these numbers. This led Knuth to use it, as shown here, in the first volume of ''
The Art of Computer Programming ''The Art of Computer Programming'' (''TAOCP'') is a comprehensive multi-volume monograph written by the computer scientist Donald Knuth presenting programming algorithms and their analysis. it consists of published volumes 1, 2, 3, 4A, and 4 ...
'' (1968). According to the third edition of ''The Art of Computer Programming'', this notation was also used earlier by Jovan Karamata in 1935. The notation ''S''(''n'', ''k'') was used by Richard Stanley in his book ''
Enumerative Combinatorics Enumerative combinatorics is an area of combinatorics that deals with the number of ways that certain patterns can be formed. Two examples of this type of problem are counting combinations and counting permutations. More generally, given an inf ...
'' and also, much earlier, by many other writers. The notations used on this page for Stirling numbers are not universal, and may conflict with notations in other sources.


Relation to Bell numbers

Since the Stirling number \left\ counts set partitions of an ''n''-element set into ''k'' parts, the sum :B_n=\sum_^n \left\ over all values of ''k'' is the total number of partitions of a set with ''n'' members. This number is known as the ''n''th Bell number. Analogously, the ordered Bell numbers can be computed from the Stirling numbers of the second kind via :a_n = \sum_^n k! \left\.


Table of values

Below is a
triangular array In mathematics and computing, a triangular array of numbers, polynomials, or the like, is a doubly indexed sequence in which each row is only as long as the row's own index. That is, the ''i''th row contains only ''i'' elements. Examples Notable ...
of values for the Stirling numbers of the second kind : As with the
binomial coefficients In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the te ...
, this table could be extended to , but the entries would all be 0.


Properties


Recurrence relation

Stirling numbers of the second kind obey the recurrence relation (first discovered by Masanobu Saka in his 1782 ''Sanpō-Gakkai''): :\left\ = k \left\ + \left\ \quad \mbox \; 0 with initial conditions :\left\ = 1 \quad \mbox \; n \geq 0 \quad \text \quad \left\ = \left\ = 0 \quad \text n>0 \text 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. To prove this recurrence, observe that a partition of the objects into ''k'' 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 :\left\ since we must partition the remaining 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 :k \left\ since we partition all objects other than the -th into ''k'' subsets, and then we are left with ''k'' choices for inserting object . Summing these two values gives the desired result. Another recurrence relation is given by \left\lbrace\begin n \\ k \end\right\rbrace = \frac-\sum_^ \frac. which follows from evaluating \sum_^n \left\(x)_r=x^n at x=k. It is also conjectured that for a fixed n we have : \begin \left\ & = \frac \sum_^ (j-2)! \binom \left\, \\ \left\ & = 1. \end Here we start with recursively computing of \left\, then compute \left\ and so on up to \left\. Another conjecture is that for a fixed k we have : \begin \left\ & = \frac \sum_^ \binom \left\ (-1)^j, \\ \left\ & = 1. \end If you swap (j-2)! from the first sum and (-1)^j from the second, you will get similar conjectures, but for Stirling numbers of the first kind.


Simple identities

Some simple identities include :\left\ = \binom. This is because dividing ''n'' elements into sets necessarily means dividing it into one set of size 2 and sets of size 1. Therefore we need only pick those two elements; and :\left\ = 2^-1. To see this, first note that there are 2 ''ordered'' pairs of complementary subsets ''A'' and ''B''. In one case, ''A'' is empty, and in another ''B'' is empty, so 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 expansion of the recurrence-relation gives identities in the spirit of the above example.


Identities

The table in section 6.1 of ''Concrete Mathematics'' provides a plethora of generalized forms of finite sums involving the Stirling numbers. Several particular finite sums relevant to this article include : \begin \left\ &= \sum_^n \left\\\ \left\ &= \sum_^n (k+1)^ \left\\\ \left\ &= \sum_^k j \left\ \\ \left\ \binom &= \sum_k \left\ \left\ \binom \end


Explicit formula

The Stirling numbers of the second kind are given by the explicit formula: :\left\ =\frac\sum_^(-1)^ j^n =\sum_^k \frac . This can be derived by using inclusion-exclusion to count the surjections from ''n'' to ''k'' and using the fact that the number of such surjections is k! \left\ . Additionally, this formula is a special case of the ''k''th forward difference of the
monomial In mathematics, a monomial is, roughly speaking, a polynomial which has only one term. Two definitions of a monomial may be encountered: # A monomial, also called a power product or primitive monomial, is a product of powers of variables with n ...
x^n evaluated at ''x'' = 0: : \Delta^k x^n = \sum_^(-1)^ (x+j)^n. Because the Bernoulli polynomials may be written in terms of these forward differences, one immediately obtains a relation in the
Bernoulli number In mathematics, the Bernoulli numbers are a sequence of rational numbers which occur frequently in analysis. The Bernoulli numbers appear in (and can be defined by) the Taylor series expansions of the tangent and hyperbolic tangent function ...
s: :B_m(0)=\sum_^m \frac \left\. The evaluation of incomplete exponential Bell polynomial ''B''''n'',''k''(''x''1,''x''2,...) on the sequence of ones equals a Stirling number of the second kind: :\left\ = B_(1,1,\dots,1). Another explicit formula given in the ''NIST Handbook of Mathematical Functions'' is : \left\ = \sum_ 1^ 2^ \cdots k^


Parity

The parity of a Stirling number of the second kind is same as the parity of a related
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
: :\left\\equiv \binom\ \pmod, where z = n - \left\lceil\displaystyle\frac\right\rceil,\ w = \left\lfloor\displaystyle\frac\right\rfloor. This relation is specified by mapping ''n'' and ''k'' coordinates onto the Sierpiński triangle. More directly, let two sets contain positions of 1's in binary representations of results of respective expressions: : \begin \mathbb:\ \sum_ 2^i &= n-k,\\ \mathbb:\ \sum_ 2^j &= \left\lfloor\dfrac\right\rfloor.\\ \end One can mimic a
bitwise AND In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic operat ...
operation by intersecting these two sets: : \beginn\\k\end\,\bmod\,2 = \begin 0, & \mathbb\cap\mathbb\ne\empty;\\ 1, & \mathbb\cap\mathbb=\empty; \end to obtain the parity of a Stirling number of the second kind in ''O''(1) time. In
pseudocode In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages (like assignment operator, conditional operator, loop) with informal, usually self-explanatory, notation of actio ...
: : \beginn\\k\end\,\bmod\,2 := \left left( \left(n-k\right)\ \And\ \left( \left(k-1\right)\,\mathrm\,2 \right)\right) = 0\right where \left \right is the
Iverson bracket In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
. The parity of a central Stirling number of the second kind \textstyle \left\ is odd if and only if n is a fibbinary number, a number whose binary representation has no two consecutive 1s.


Generating functions

For a fixed integer ''n'', the ordinary generating function for Stirling numbers of the second kind \left\, \left\, \ldots is given by : \sum_^n \left\ x^k = T_n(x), where T_n(x) are
Touchard polynomials The Touchard polynomials, studied by , also called the exponential polynomials or Bell polynomials, comprise a polynomial sequence of binomial type defined by :T_n(x)=\sum_^n S(n,k)x^k=\sum_^n \left\x^k, where S(n,k)=\left\ is a Stirling ...
. If one sums the Stirling numbers against the falling factorial instead, one can show the following identities, among others: : \sum_^n \left\ (x)_k = x^n and : \sum_^ \left\ (x-1)_ = x^n, which has special case : \sum_^n \left\ (n)_k = n^n. For a fixed integer ''k'', the Stirling numbers of the second kind have rational ordinary generating function :\sum_^\infty \left\ x^ = \prod_^k \frac = \frac and have an exponential generating function given by : \sum_^\infty \left\ \frac = \frac. A mixed bivariate generating function for the Stirling numbers of the second kind is : \sum_^ \sum_^ \left\ \frac y^k = e^.


Lower and upper bounds

If n \geq 2 and 1 \leq k \leq n-1, then :\frac(k^2+k+2)k^-1 \leq \left\ \leq \frac k^


Asymptotic approximation

For fixed value of k, the asymptotic value of the Stirling numbers of the second kind as n\rightarrow \infty is given by : \left\ \underset \frac. If k = o(\sqrt) (where ''o'' denotes the little o notation) then : \left\ \underset \frac. A uniformly valid approximation also exists: for all such that , one has : \left\ \sim \sqrt \left(\frac\right)^ \frac e^ \left(\right), where v=n/k , and G\in (0,1) is the unique solution to G = v e^ . Relative error is bounded by about 0.066/n .


Unimodality

For fixed n, \left\ is unimodal, that is, the sequence increases and then decreases. The maximum is attained for at most two consecutive values of ''k''. That is, there is an integer k_n such that :\left\ < \left\ < \cdots < \left\ \geq \left\ > \cdots > \left\. Looking at the table of values above, the first few values for k_n are 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, \ldots When n is large :k_n \underset \frac, and the maximum value of the Stirling number can be approximated with :\log \left\ = n\log n - n \log\log n - n + O(n \log\log n / \log n).


Applications


Moments of the Poisson distribution

If ''X'' is a
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
with a
Poisson distribution In probability theory and statistics, the Poisson distribution () is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time if these events occur with a known const ...
with
expected value In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
λ, then its ''n-''th moment is :E(X^n)=\sum_^n \left\\lambda^k. In particular, the ''n''th 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 ''n''th Bell number (this fact is Dobiński's formula).


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 ''n''th moment of ''X'' is :E(X^n) = \sum_^m \left\. Note: The upper bound of summation is ''m'', not ''n''. In other words, the ''n''th moment of this
probability distribution In probability theory and statistics, a probability distribution is a Function (mathematics), function that gives the probabilities of occurrence of possible events for an Experiment (probability theory), experiment. It is a mathematical descri ...
is the number of partitions of a set of size ''n'' into no more than ''m'' parts. This is proved in the article on random permutation statistics, although the notation is a bit different.


Rhyming schemes

The Stirling numbers of the second kind can represent the total number of
rhyme scheme A rhyme scheme is the pattern of rhymes at the end of each line of a poem or song. It is usually referred to by using letters to indicate which lines rhyme; lines designated with the same letter all rhyme with each other. An example of the ABAB rh ...
s 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 one rhyme (aaa), 3 rhyme schemes using two rhymes (aab, aba, abb), and 1 rhyme scheme using three rhymes (abc).


Variants


''r''-Stirling numbers of the second kind

The ''r''-Stirling number of the second kind \left\_r counts the number of partitions of a set of ''n'' objects into ''k'' non-empty disjoint subsets, such that the first ''r'' elements are in distinct subsets. These numbers satisfy the recurrence relation :\left\_r = k\left\_r + \left\_r Some combinatorial identities and a connection between these numbers and context-free grammars can be found in


Associated Stirling numbers of the second kind

An ''r''-associated Stirling number of the second kind is the number of ways to partition a set of ''n'' objects into ''k'' subsets, with each subset containing at least ''r'' elements. It is denoted by S_r(n,k) and obeys the recurrence relation :S_r(n+1, k)=k\ S_r(n, k)+\binomS_r(n-r+1, k-1) The 2-associated numbers appear elsewhere as "Ward numbers" and as the magnitudes of the coefficients of Mahler polynomials.


Reduced Stirling numbers of the second kind

Denote the ''n'' objects to partition by the integers 1, 2, ..., ''n''. Define the reduced Stirling numbers of the second kind, denoted S^d(n, k), to be the number of ways to partition the integers 1, 2, ..., ''n'' into ''k'' nonempty subsets such that all elements in each subset have pairwise distance at least ''d''. That is, for any integers ''i'' and ''j'' in a given subset, it is required that , i-j, \geq d. It has been shown that these numbers satisfy :S^d(n, k) = S(n-d+1, k-d+1), n \geq k \geq d (hence the name "reduced").A. Mohr and T.D. Porter,
Applications of Chromatic Polynomials Involving Stirling Numbers
', Journal of Combinatorial Mathematics and Combinatorial Computing 70 (2009), 57–64.
Observe (both by definition and by the reduction formula), that S^1(n, k) = S(n, k), the familiar Stirling numbers of the second kind.


See also

*
Stirling number In mathematics, Stirling numbers arise in a variety of Analysis (mathematics), analytic and combinatorics, combinatorial problems. They are named after James Stirling (mathematician), James Stirling, who introduced them in a purely algebraic setti ...
* Stirling numbers of the first kind * Bell number – the number of partitions of a set with ''n'' members * Stirling polynomials * Twelvefold way *


References

* . * . *
Calculator for Stirling Numbers of the Second Kind

Set Partitions: Stirling Numbers
* {{Classes of natural numbers Permutations Factorial and binomial topics Triangles of numbers Operations on numbers pl:Liczby Stirlinga#Liczby Stirlinga II rodzaju