BAGIAN II Kombinasi Translate Did you mean: PART II COMBIN6 Stirling

BAGIAN II
Kombinasi

Translate

Did you mean: PART II COMBIN6 Stirling Numbers Author: Thomas A. Dowling, Department
of Mathematics, Ohio State University. Prerequisites: The prerequisites for this chapter are basic
counting techniques and equivalence relations. See Sections 5.3 and 8.5 of Discrete Mathematics
and Its Applications.ATORICS PART II COMBINATORICS 94 6 Stirling Numbers Author:
Thomas A. Dowling, Department of Mathematics, Ohio State University. Prerequisites: The
prerequisites for this chapter are basic counting techniques and equivalence relations. See
Sections 5.3 and 8.5 of Discrete Mathematics and Its Applications. Introduction A set of objects
can be classified according to many different criteria, depending on the nature of the objects. For
example, we might classify — accidents according to the day of the week on which they
occurred — people according to their profession, age, sex, or nationality — college students
according to their class or major — positions in a random sequence of digits according to the
digit appearing there — misprints according to the page on which they occur — printing jobs
according to the printer on which they were done. In each of these examples, we would have a
function from the set of objects to the set of possible levels of the criterion by which the objects
are classified. Suppose we want to know the number of different classifications that are possible,
95 96 Applications of Discrete Mathematics perhaps subject to additional restrictions. This

would be necessary, for example, in estimating probabilities that a classification satisfied certain
conditions. Determining the number of functions between finite sets, based on the sizes of the
sets and certain restrictions on the functions, is an enumeration problem considered in Section
7.6 of Discrete Mathematics and Its Applications. It may be the case, however, that the
classification need not distinguish the various levels of the criterion, if such a distinction is even
possible. There could be many levels, but the actual level on which an object falls is of no
concern. Of interest might be how the set of objects is partitioned into disjoint subsets, with two
objects being in the same subset whenever they fall at the same level of the criterion. A
classification then represents a partition of the set of objects, where two objects belong to the
same class of the partition whenever they fall at the same level. In this case, rather than counting
functions, partitions of the set of objects would be counted. It is then that the Stirling numbers*
become appropriate. Along with the binomial coefficients C(n, k), the Stirling numbers are of
fundamental importance in enumeration theory. While C(n, k) is the number of k-element subsets
of an n-element set N, the Stirling number S(n, k) represents the number of partitions of N into k
nonempty subsets. Partitions of N are associated with sets of functions defined on N, and they
correspond to equivalence relations on N. Because of their combinatorial interpretation, the
numbers S(n, k) will be met first, despite their name as the Stirling numbers of the second kind.
After we establish their role in a classification of functions defined on N, we consider their part
in relating two sequences of polynomials (as they were originally defined by Stirling). We will
then be led to the Stirling numbers s(n, k) of the first kind. We will see why they are referred to

as being of the first kind, despite the fact that some of these integers are negative, and thus

cannot represent the size of a set. Occupancy Problems Many enumeration problems can be
formulated as counting the number of distributions of balls into cells or urns. The balls here
correspond to the objects and the cells to the levels. These counting problems are generally
referred to as occupancy problems. Suppose n balls are to be placed in k cells, and assume that
any cell could hold all of the balls. The question “In how many ways can this be done?” asks for
the number of distributions of n balls to k cells. As posed, the question lacks sufficient
information to determine what is meant by a distribution. It therefore cannot be correctly
answered. The num- * They are named in honor of James Stirling (1692–1770), an eighteenth
century associate of Sir Isaac Newton in England. Chapter 6 Stirling Numbers 97 ber of
distributions depends on whether the n balls and/or the k cells are distinguishable or identical.
And if the n balls are distinguishable, whether the order in which the balls are placed in each cell
matters. Let us assume that the order of placement does not distinguish two distributions.
Suppose first that both the balls and the cells are distinguishable. Then the collection of balls can
be interpreted as an n-element set N and the collection of cells as a k-element set K. A
distribution then corresponds to a function f : N → K. The number of distributions is then kn. If,
however, the balls are identical, but the cells are distinguishable, then a distribution corresponds
to an n-combination with repetition from the set K of k cells (see Section 5.5 of Discrete
Mathematics and Its Applications). The number of balls placed in cell j represents the number of

occurrences of element j in the n-combination. The number of distributions in this case is C(k + n
− 1, n). Occupancy problems can have additional restrictions on the number of balls that can be
placed in each cell. Suppose, for example, that at most one ball can be placed in each cell. If both
the balls and the cells are distinguishable, we would then be seeking the number of one-to-one
functions f : N → K. Such a function corresponds to an n-permutation from a k-set, so the
number is P(k, n) = k(k − 1) · · · (k − n + 1). If instead there must be at least one ball in each cell,
we want the number of onto functions f : N → K. Using inclusion-exclusion, that number is
equal to k?−1 i=0 (−1)iC(k, i)(k − i)n. (See Section 7.6 of Discrete Mathematics and Its
Applications.) Partitions and Stirling Numbers of the Second Kind An ordered partition of N
with length k is a k-tuple (A1,A2, . . .,Ak) of disjoint subsets Ai of N with union N. By taking K
= {1, 2, · · · , k}, we can interpret any function f : N → K as an ordered partition of N with length
k. We let Ai be the subset of N whose elements have image i. Then, since f assigns exactly one
image in K to each element of N, the subsets Ai are disjoint and their union is N. Then Ai is
nonempty if and only if i is the image of at least one element of N. Thus the function f is onto if
and only if all k of the sets Ai are nonempty. Recall that a partition of a set N is a set P = {Ai|i ∈
I} of disjoint, nonempty subsets Ai of N that have union N. We shall call these subsets classes.
An ordered partition of N of a given length may have empty subsets Ai, but the empty set is not
allowed as a class in a partition. If it were, then even though the classes are disjoint, they would
not necessarily be different sets, since 98 Applications of Discrete Mathematics the empty set
might be repeated. Given an equivalence relation R on N, the distinct equivalence classes Ai are

disjoint with union N. The reflexive property then implies that they are nonempty, so the
equivalence classes form a partition of N. Conversely, given a partition P = {Ai|i ∈ I}, an
equivalence relation R is defined by aR b if and only if there is some class Ai of P containing a
and b. Thus, there is a one-to-one correspondence between the set of partitions of N and the set
of equivalence relations on N. A binary relation on N is defined as a subset of the set N×N. Since
N×N has n2 elements, the number of binary relations on N is 2n2. The number of these that are
equivalence relations, which is equal to the number of partitions of N, is called a Bell number*,
and denoted by Bn. For example, the number of ways that ten people can be separated into

nonempty groups is the Bell number B10. Two of the people satisfy the corresponding
equivalence relation R if and only if they belong to the same group. Suppose we want instead the
number of ways the ten people can be separated into exactly three nonempty groups. That is,
how many equivalence relations are there on a ten-element set that have exactly three
equivalence classes? More generally, of the Bn equivalence relations, we might ask how many
have exactly k equivalence classes? Since this is the number of partitions of N into k classes, we
are led to our definition of a Stirling number S(n, k) of the second kind. (Note that the Bell
number Bn is then the sum over k of these numbers, that is, Bn = ? n k=1 S(n, k).) Definition 1
The Stirling number of the second kind, S(n, k), is the number of partitions of an n-element set
into k classes. Example 1 Find S(4, 2) and S(4, 3). Solution: Suppose N = {a, b, c, d}. The 2class partitions of the 4-element set N are ({a, b, c}, {d}), ({a, b, d}, {c}), ({a, c, d}, {b}), ({b, c,
d}, {a}) ({a, b}, {c, d}), ({a, c}, {b, d}), ({a, d}, {b, c}). It follows that S(4, 2) = 7. The 3-class

partitions of N are ({a, b}, {c}, {d}), ({a, c}, {b}, {d}), ({a, d}, {b}, {c}) * We won’t pursue the
Bell numbers here, but see any of the references and also Section 8.5, Exercise 68, of Discrete
Mathematics and Its Applications for more about them. Chapter 6 Stirling Numbers 99 ({b, c},
{a}, {d}), ({b, d}, {a}, {c}), ({c, d}, {a}, {b}) We therefore have S(4, 3) = 6. In occupancy
problems, a partition corresponds to a distribution in which the balls are distinguishable, the cells
are identical, and there is at least one ball in each cell. The number of distributions of n balls into
k cells is therefore S(n, k). If we remove the restriction that there must be at least one ball in each
cell, then a distribution corresponds to a partition of the set N with at most k classes. By the sum
rule the number of such distributions equals S(n, 1) + S(n, 2) + · · · + S(n, k). Since the classes Ai
of a partition P = {Ai|i ∈ I} must be disjoint and nonempty, we have S(n, k) = 0 for k > n.
Further, since ({S}) itself is the only partition of N with one class, S(n, 1) = 1 for n ≥ 1. Given
these initial conditions, together with S(0, 0) = 1, S(n, 0) = 0 for n ≥ 1, the Stirling numbers S(n,
k) can be recursively computed using the following theorem. Theorem 1 Let n and k be positive
integers. Then S(n + 1, k) = S(n, k − 1) + k S(n, k). (1) Proof: We give a combinatorial proof. Let
S be an (n + 1)-element set. Fix a ∈ S, and let S? = S − {a} be the n-element set obtained by
removing a from S. The S(n + 1, k) partitions of S into k classes can each be uniquely obtained
from either (i) a partition P? of S? with k − 1 classes by adding a singleton class {a}, or (ii) a
partition P? of S? with k classes by first selecting one of the k classes of P? and then adding a to
that class. Since the cases are exclusive, we obtain S(n, k) by the sum rule by adding the number
S(n, k − 1) of partitions of (i) to the number k S(n, k) of partitions in (ii). Example 2 Let P be one

of the partitions of N = {a, b, c, d} in Example 1. Then P is obtained from the S(3, 1) = 1 oneclass partition ({a, b, c}) of N? = N−{d} = {a, b, c} by adding {d} as a second class, or from one
of the S(3, 2) = 3 two-class partitions ({a, b}, {c}), ({a, c}, {b}), ({b, c}, {a}) 100 Applications
of Discrete Mathematics of N? by choosing one of these partitions, then choosing one of its two
classes, and finally by adding d to the class chosen. Example 3 Use Theorem 1 to find S(5, 3).
Solution: WehaveS(4, 2) = 7 and S(4, 3) = 6 from Example 1. Then we find by Theorem 1 that
S(5, 3) = S(4, 2) + 3 S(4, 3) = 7 + 3 · 6 = 25. The Pascal recursion C(n+1, k) = C(n, k − 1) + C(n,
k) used to compute the binomial coefficients has a similar form, but the coefficient in the second
term of the sum is 1 for C(n, k) and k for S(n, k). Using the recurrence relation in Theorem 1, we
can obtain each of the Stirling numbers S(n, k) from the two Stirling numbers S(n−1, k−1),
S(n−1, k) previously found. These are given in Table 1 for 1 ≤ k ≤ n ≤ 6. n \ k 1 2 3 4 5 6 1 1 2 1
1 3 1 3 1 4 1 7 6 1 5 1 15 25 10 1 6 1 31 90 65 15 1 Table 1. Stirling numbers of the second kind,
S(n,k). Inverse Partitions of Functions Recall that a function f : N → K is onto if every element b
∈ K is an image of some element a ∈ N, so b = f(a). If we denote the set of images by f(N) =

{f(a)|a ∈ N}, then f is onto if and only if f(N) = K. Example 4 Suppose N = {a, b, c, d}, K = {1,
2, 3}, and the function f is defined by f(a) = f(b) = f(d) = 2, f(c) = 1. Then f(N) = {1, 2} ?= K, so
f is not onto. Every function f : N → K determines an equivalence relation on N under which two
elements of N are related if and only if they have the same image under f. Since the equivalence
classes form a partition of N, we make the following definition. Chapter 6 Stirling Numbers 101
Definition 2 The inverse partition defined by a function f : N → K is the partition P(f) of N into

equivalence classes with respect to the the equivalence relation Rf defined by aRf b if and only if
f(a) = f(b). Given the function f, every element b ∈ f(N) determines an equivalence class of Rf .
Suppose we denote by f−1(b) the set of elements in N that have b as their image*. Then f−1(b) is
an equivalence class, called the inverse image of b. It follows that a ∈ f −1(b) if and only if b =
f(a). Thus, the equivalence classes f−1(b) for b ∈ f(N) form the inverse partition P(f) of N, and
the number of equivalence classes is the size of the set f(N). Therefore f : N → K is onto if and
only if P(f) has k classes. Example 5 Find the inverse partition of N defined by the function f of
Example 4. Solution: For the function f in Example 4, the set of elements of N with image 1 is
f−1(1) = {a, b, d}, while the set of elements with image 2 is f−1(2) = {c}. Since no elements
have 3 as an image, the set f−1(3) is empty, so it is not an equivalence class. Thus the inverse
partition of N defined by f is the 2-class partition P(f) = ({a, b, d}, {c}). An Identity for Stirling
Numbers We can classify the kn distributions of n distinguishable balls into k distinguishable
cells by the number j of nonempty cells. Such a distribution is determined by a j-class partition P
of the set of balls together with an injective function ϕ from the j classes of P to the k cells. The
classification obtained in this way leads to an identity involving the Stirling numbers of the
second kind. Denote by F(N,K) the set of functions f : N → K. Recall that the size of F(N,K) is
kn. Let us classify the functions f ∈ F(N,K) according to the size of their image sets f(N), or
equivalently, according to the number of classes in their inverse partitions P(f). * What we have
denoted by f−1 is actually a function from K to the power set P(N) of N, and not the inverse
function of f. The function f : N → K has an inverse function from K to N if and only if it is a

one-to-one correspondence. 102 Applications of Discrete Mathematics Given a j-class partition P
= {A1, , A2, . . .,Aj} of N, consider the set of functions f ∈ F(N,K) for which P(f) = P. Two
elements in N can have the same image if and only if they belong to the same Ai. Hence a
function f has P(f) = P if and only if there is a one-to-one function ϕ : {A1,A2, . . . , Aj} → K
such that f(a) = ϕ(Ai) for all i and all a ∈ Ai. The number of one-to-one functions from a j-set to
a k-set is the falling factorial (k)j = P(k, j) = k(k − 1) · · · (k − j + 1). Hence, for any j-class
partition P, the number of functions f ∈ F(N,K) such that P(f) = P is (k)j . Since there are S(n, j)
j-class partitions of N, by the product rule there are S(n, j)(k)j functions f ∈ F(N,K) such that
f(N) has size j. Summing over j gives us kn = ?k j=1 S(n, j)(k)j . (2) The jth term in the sum is
the number of functions f for which |f(N)| = j. We noted earlier that the onto functions correspond
to distributions in the occupancy problem where the balls and the cells are distinguishable and
there must be at least one ball in each cell. If we remove the restriction that there must be at least
one ball in each cell, then a distribution corresponds to a function f : N → K. Classification of
the kn distributions according to the number of nonempty cells gives (2). If we consider the term
where j = k in (2), and note that (k)k = k!, we have the following theorem. Theorem 2 The
number of functions from a set with n elements onto a set with k elements is S(n, k)k!. The
inclusion-exclusion principle can be used to show that the number of onto functions from a set
with n elements to a set with k elements is ?k i=0 (−1)iC(k, i)(k − i)n. (3) By Theorem 2, we may
equate (3) to S(n, k)k!, and we obtain S(n, k) = 1 k! ?k i=0 (−1)iC(k, i)(k − i)n. (4) Example 6
Let n = 5, k = 3. Then if the 35 functions f : N → K are classified according to the number of


classes in their inverse partitions, we Chapter 6 Stirling Numbers 103 obtain 35 = ?3 j=1 S(5, j)
(3)j = 1· 3 + 15 · 6 + 25 · 6 = 243, which is of course easily verified. Theorem 2 shows that the
number of these functions that are onto is S(5, 3)3! = 25 · 6 = 150. Alternatively, by the
inclusion-exclusion expression (3), we have ?3 i=0 (−1)kC(3, i)(3 − i)5 = 35 − 3 · 25 + 3 · 15 =
243 − 96 + 3 = 150. Before turning to polynomials in a real variable x, we need to write the
summation in (2) in a different form. Since S(n, j) = 0 for j > n and (k)j = 0 for an integer j > k,
the termS(n, j)(k)j in (2) can be nonzero only when j ≤ n and j ≤ k. Thus we can replace the upper
limit k in (2) by n, which gives kn = ?n j=1 S(n, j)(k)j . (2?) Stirling Numbers and Polynomials
Recall that a polynomial of degree n in a real variable x is a function p(x) of the form p(x) =
anxn + an−1xn−1 + · · · + a0, where an, an−1, . . . , a0 are constants with an ?= 0. Suppose we
extend the definition of the falling factorial (k)n from the set N ×N to the set R×N by defining
the function (x)n for any real number x and any nonnegative integer n to be (x)n = 1 when n = 0
and (x)n = x(x − 1) · · · (x − n + 1) when n ≥ 1. Equivalently, define (x)n recursively by (x)0 = 1
and (x)n = (x−n+1)(x)n−1. As the product of n linear factors, (x)n is a polynomial of degree n.
We can then replace k by x in (2?) to obtain xn = ?n j=1 S(n, j)(x)j . (5) Subtracting the righthand side from each side gives xn − ?n j=1 S(n, j)(x)j = 0. (6) 104 Applications of Discrete
Mathematics But (x)j = x(x − 1) · · · (x − j + 1) is a polynomial of degree j, for 1 ≤ j ≤ n. Hence
the left-hand side of (6) is a polynomial p(x) of degree at most n. But since p(x) = 0 for every
positive integer x and since a polynomial of degree n has at most n real roots, p(x) must be
identically zero. Then we obtain for every real number x xn = ?n j=1 S(n, j)(x)j . (7) Equation (7)

represents (2?) extended from positive integers k to arbitrary real numbers x. Since k does not
appear in (7), we may replace the index variable j by k, rewriting (7) as xn = ?n k=1 S(n, k)(x)k.
(7?) Equation (7?) represents (7) in a form convenient for comparison with (10) in the next
section. Example 7 Let n = 3. Then (x)1 = x, (x)2 = x(x − 1) = x2 − x, and (x)3 = x(x −1)(x − 2)
= x3 − 3x2 +2x. Substituting these into the right-hand side of (5) gives S(3, 1)(x)1+S(3, 2)(x)2 +
S(3, 3)(x)3 = 1· x + 3 · (x2 − x) + 1 · (x3 − 3x2 + 2x) = x3. Stirling Numbers of the First Kind
There is an interpretation of (7) that will be understood more readily by readers who are familiar
with linear algebra. The set of polynomials p(x) with real coefficients (or with coefficients in any
field) forms a vector space*. A fundamental basis of this vector space is a sequence of
polynomials {pk(x)|k = 0, 1, . . .} such that pk(x) has degree k. Every polynomial can be
uniquely expressed as a linear combination of the polynomials in a fundamental basis. Two
important fundamental bases are the standard basis {xk|k = 0, 1, . . .} and the falling factorial
basis {(x)k|k = 0, 1, . . .}. The standard basis is in fact the one used in the definition of a
polynomial in x, since a polynomial is defined as a linear combination of the powers of x. Then
Equation (7) expresses the basis {xk} in terms of the basis {(x)k}. * This vector space has
infinite (but countable) dimension. Chapter 6 Stirling Numbers 105 In fact, (7) was Stirling’s
original definition of the numbers S(n, k) as the coefficients in changing from the falling factorial
basis {(x)k} to the standard basis {xk}. These numbers were said to be of the second kind since
they change a basis to the standard basis. More commonly, we would be changing from the
standard basis to another basis, and the coefficients would be of the first kind. When the other

basis is the sequence {(x)k} of falling factorial polynomials, we encounter the Stirling numbers
of the first kind. To illustrate these ideas, let us first suppose we want to express the basis {(x −
1)k} in terms of the standard basis {xk}. Using the Binomial Theorem, we can express the
polynomial (x − 1)n as (x − 1)n = ?n k=0 (−1)n−kC(n, k)xk. (8) The coefficients (−1)n−kC(n, k)
in (8), that change the standard basis to the other basis (and which are the coefficients when the
product (x − 1)n of n identical factors is expanded), by analogy would be called binomial

coefficients of the first kind. On the other hand, if we express x as (x − 1) + 1 and apply the
Binomial Theorem, we obtain xn = ((x − 1) + 1)n = ?n k=0 C(n, k)(x − 1)k. (9) Thus, the
binomial coefficients C(n, k) are used in (9) to change from the other basis to the standard basis,
and would therefore be referred to as the binomial coefficients of the second kind. The
coefficients needed to change the falling factorial basis {(x)k} to the standard basis {xk} can be
obtained by simply expanding the product (x)n = x(x − 1) . . . (x − n + 1). Example 8 Write (x)3
in terms of the standard basis {xk}. Solution: Letn = 3. Then expanding the product (x)3 and
reversing the order of the terms gives (x)3 = x(x − 1)(x − 2) = x3 − 3x2 + 2x = 2x − 3x2 + x3.
Let us now define the Stirling numbers of the first kind. 106 Applications of Discrete
Mathematics Definition 3 The Stirling numbers of the first kind s(n, k) are the numbers
satisfying (x)n = ?n k=0 s(n, k)xk. (10) That (10) uniquely determines the coefficients s(n, k)
follows either from the definition of multiplication of polynomials or from the fact that every
polynomial can be uniquely expressed as a linear combination of the polynomials in a basis.
Example 9 Find the Stirling numbers which express (x)3 in terms of the polynomials 1, x, x2.
Solution: Using the definition of s(n, k) and Example 8, we have (x)3 = s(3, 0) · 1 + s(3, 1)x +
s(3, 2)x2 + s(3, 3)x3 = 2x − 3x2 + x3. Hence, the Stirling numbers of the first kind which express
(x)3 in terms of the polynomials 1, x, x2 and x3 in the standard basis are s(3, 0) = 0, s(3, 1) = 2,
s(3, 2) = −3, s(3, 3) = 1. Note that in Example 9 some of the Stirling numbers s(n, k) of the first
kind can be negative. Hence, unlike the Stirling numbers of the second kind, those of the first
kind cannot represent the sizes of sets. (But their absolute values do. See Exercise 16.) Consider
for a fixed n the sequence of numbers s(n, k). These are zero when n > k. We can determine their
sum over 1 ≤ k ≤ n immediately from (10). The polynomial (x)n vanishes whenever x is a
positive integer and n > x. Thus, on setting x = 1 in (10), we get ?n k=1 s(n, k) = 0 for n ≥ 2. (11)
There is a recurrence relation for s(n, k) analogous to the recurrence relation in Theorem 1 for
S(n, k), but we will obtain this one by a method different from the combinatorial argument given
there. We start by finding the boundary values where k = 0. Using the convention that (x)0 = 1 if
x = 0 and 0 otherwise, we have s(0, 0) = 1. And since x is a factor of (x)n for n ≥ 1, the constant
term is 0, so s(n, 0) for n ≥ 1. The analogue of Theorem 1 is then given by the following theorem.
Chapter 6 Stirling Numbers 107 Theorem 3 Let n and k be positive integers. Then s(n + 1, k) =
s(n, k − 1) − ns(n, k). (12) Proof: We make use of the fact that (x)n+1 = x(x−1) · · · (x−n+1)(x−n)
= (x − n)(x)n. Then by (10), (x)n+1 = n?+1 k=0 s(n + 1, k)xk. (13) But (x)n+1 = (x − n)(x)n = ?n
j=0 s(n, j)xj+1 − n ?n j=0 s(n, j)xj . (14) When we equate the coefficients of xk in (13) and (14),
we find that s(n+1, k) = s(n, k − 1) − ns(n, k). Example 10 Use recurrence relation (12) to find
s(5, 3). Solution: We see from Example 9 that s(3, 1) = 2, s(3, 2) = −3, and s(3, 3) = 1. Thus, by
(12), we find s(4, 2) = 2−3·(−3) = 11 and s(4, 3) = −3−3·1 = −6. We then obtain s(5, 3) = 11 − 4 ·
(−6) = 35. The values of s(n, k) for 1 ≤ k ≤ n ≤ 6 shown in Table 2 were computed using (12). n \
k 1 2 3 4 5 6 1 1 2 -1 1 3 2 -3 1 4 -6 11 -6 1 5 24 -50 35 -10 1 6 -120 274 -225 85 -15 1 Table 2.
Stirling numbers of the first kind, s(n,k). Comments When we observe the tables of values of the
Stirling numbers for 1 ≤ k ≤ n ≤ 6, we notice that the numbers in certain columns or diagonals
come from well108 Applications of Discrete Mathematics known sequences. We will examine
some of these. Proofs will be left for the exercises. First consider the numbers S(n, 2) in the
second column of Table 1. For 2 ≤ n ≤ 6 these are 1, 3, 7, 15, 31. It appears that S(n, 2) has the
form 2n−1 −1 (Exercise 14). The numbers S(n, n−1) just below the main diagonal in Table 1 are
1, 3, 6, 10, 15 for 2 ≤ n ≤ 6, suggesting (Exercise 13) that S(n, n − 1) is the triangular number
C(n, 2) = 1 2n(n − 1). Next consider Table 2, which gives the values s(n, k) of the Stirling
numbers of the first kind. We can easily verify that the row sums are zero for 2 ≤ n ≤ 6, as given

for all n ≥ 2 by (9). Observe that the numbers s(n, 1) in the first column of Table 2 satisfy s(n, 1)
= (−1)n−1(n − 1)! for 1 ≤ n ≤ 6. This in fact holds for all n (Exercise 14). The numbers s(n, n−1)
just below the main diagonal in Table 2 are the negatives of the Stirling numbers S(n, n−1) of the
second kind, which are apparently the triangular numbers C(n, 2) (Exercise 13). Note also that
the numbers s(n, k) alternate in sign in both rows and columns. It is not difficult to prove
(Exercise 16) that the sign of s(n, k) is (−1)n−k, so that the absolute value of s(n, k) is t(n, k) =
(−1)n−ks(n, k). These integers t(n, k) are the signless Stirling numbers of the first kind. As
nonnegative integers, these numbers have a combinatorial interpretation (Exercise 18).
Suggested Readings A basic treatment of the Stirling numbers is in reference [2]. A great deal of
information about the generating functions of the Stirling numbers and further properties of these
numbers can be found in the more advanced books [1], [3], [4], and [5]. 1. M. Aigner,
Combinatorial Theory, Springer, New York, 1997. 2. K. Bogart, Introductory Combinatorics,
Brooks/Cole, Belmont, CA, 2000. 3. L. Comtet, Advanced Combinatorics: The Art of Finite and
Infinite Expansions, Springer, New York, 1974. 4. R. Stanley, Enumerative Combinatorics,
Volume 1, Cambridge University Press, New York, 2000. 5. H. Wilf, generatingfunctionology,
Third Edition, A K Peters, Wellesley, MA, 2005. Chapter 6 Stirling Numbers 109 Exercises 1.
For n = 7 and 1 ≤ k ≤ 7, find the Stirling numbers S(n, k) and s(n, k). 2. Express (x)4 as a
polynomial by expanding the product x(x−1)(x−2)(x−3). 3. Express the polynomial x4 as a linear
combination of the falling factorial polynomials (x)k. 4. Find the number of onto functions from
an eight-element set to a fiveelement set. 5. Let n = 3 and x = 3. Classify the xn = 27 functions f
from N = {1, 2, 3} to X = {a, b, c} according to the size of the image set f(N) to verify that there
are S(3, j)(3)j such functions f with |f(N)| = j, for 1 ≤ j ≤ 3. 6. In how many ways can seven
distinguishable balls be placed in four identical boxes so that a) there is at least one ball in each
box? b) some box(es) may be empty? 7. Suppose each of a group of six people is assigned one of
three tasks at random. Find the probability (to three decimal places) that a) task 3 is not assigned.
b) all three tasks are assigned. c) exactly two of the tasks are assigned. 8. In how many ways can
a set of 12 people be divided into three (nonempty) subsets. 9. Suppose a k-sided die is rolled
until each of the numbers 1, 2, . . . , k have appeared at least once, at which time the rolls are
stopped. Give an expression for the number of possible sequences of n rolls that satisfy the
condition. 10. A computer is programmed to produce a random sequence of n digits. a) How
many possible sequences are there? b) How many of these sequences have each of the 10 digits
appearing? 11. A pool table has four corner pockets and two center pockets. There is one white
ball (the cue ball) and 15 colored balls numbered 1, 2, . . . , 15. In a game each of the numbered
balls is sunk into a pocket (and remains there) after being struck by the cue ball, which the player
has propelled with a cue stick. Thus a game produces a distribution of the numbered balls in the
set of pockets. a) Assuming the pockets are distinguishable, how many distributions are there?
110 Applications of Discrete Mathematics b) Suppose we assume the corner pockets are identical
and the center pockets are identical, but that a corner pocket is distinguishable from a center
pocket. Give an expression for the number of distributions in which all of the numbered balls are
sunk in corner pockets or they are all sunk in center pockets. 12. Let n and k be positive
integers ? with n + 1 ≥ k. Prove that S(n + 1, k) = n j=0 C(n, j)S(n − j, k − 1). 13. Prove that a)
S(n, n − 1) = C(n, 2). b) s(n, n − 1) = −C(n, 2). 14. Prove that a) S(n, 2) = 2n−1 − 1. b) s(n, 1) =
(−1)n−1(n − 1)!. 15. Let m and n be nonnegative integers with n ≤ m. The Kronecker delta
function δ(m, n) is equal to 1 if m = n and 0 otherwise. Prove that ?m k=n S(m, k)s(k, n) = δ(m,
n). In Exercises 16–20, let n and k be positive integers with k ≤ n. 16. Prove that the sign of the
Stirling number of the first kind is (−1)n−k. (Thus the signless Stirling number of the first kind

t(n, k) = |s(n, k)| is equal to (−1)n−ks(n, k).) 17. Find a recurrence relation for the signless
Stirling numbers t(n, k) of the first kind similar to the recurrence relation (12) satisfied by the
Stirling numbers s(n, k) of the first kind. 18. A cyclic permutation (or cycle) of a set A is a
permutation that cyclically permutes the elements of A. For example, the permutation σ, with
σ(1) = 2, σ(2) = 4, σ(3) = 1, σ(4) = 5, σ(5) = 3, is cyclic, and denoted by (12453) or any of its
cyclic equivalents, such as (24531) or (31245). It can be shown that every permutation of a set N
can be expressed as a product of cycles that cyclically permute disjoint subsets of N, unique
except for the order of the cycles. Thus, for example, (153)(24) is the cyclic decomposition of the
permutation σ given by σ(1) = 5, σ(2) = 4, σ(3) = 1, σ(4) = 2, σ(5) = 3. Prove that t(n, k) is the
number of permutations of an n-element set that have exactly k cycles in their cyclic
decomposition. Hint: Use Exercise 17. 19. Suppose a computer is programmed to produce a
random permutation of n different characters. Chapter 6 Stirling Numbers 111 a) Give an
expression for the probability that the permutation will have exactly k cycles. b) Calculate the
probabilities with n = 8 that the permutation will have two cycles and that it will have three
cycles. Which is more likely? ?20. Let a(n, k) be the sum of the products 1c12c2 · · · kck , taken
over all k-tuples (c1, c2, . . . , ck) such that ci is a nonnegative integer for i = 1, 2, . . . , k and the
sum of the cis is n−k. Prove that a(n, k) satisfies the initial conditions and the recurrence relation
(1) for the Stirling numbers S(n, k) of the second kind. (This shows that S(n, k) = a(n, k).) 21.
(Requires calculus.) Let k be a fixed positive integer. It can be shown that the ratios S(n, k −
1)/S(n, k) and s(n, k − 1)/s(n, k) both approach 0 as a limit as n approaches ∞. Use these facts to
find a) lim n→∞ S(n + 1, k)/S(n, k). b) lim n→∞ s(n + 1, k)/s(n, k). ?22. (Requires calculus.)
The exponential generating function of a sequence (an) is defined to be the power series A ∗(x)
= ∞? n=0 an xn n! . Let k be a fixed positive integer and let an = S(n, k). Prove that A ∗(x) = (ex
− 1)k k! . ?23. Find the expansion of the polynomial Pk(x) = (1 − x)(1 − 2x) . . . (1 − kx).
Computer Projects 1. Write a computer program that uses the recurrence relation (1) to compute
Stirling numbers of the second kind. 2. Write a computer program that uses the recurrence
relation (12) to compute Stirling numbers of the first kind.
BAGIAN II
COMBIN6
Bilangan Stirling
Penulis: Thomas A. Dowling, Departemen Matematika, Ohio State University.
Prasyarat: Prasyarat untuk bab ini adalah teknik penghitungan dasar
dan hubungan kesetaraan. Lihat bagian 5.3 dan 8.5 Matematika Diskrit
dan Its Applications.ATORICSPART II
Kombinasi
94
6
Bilangan Stirling
Penulis: Thomas A. Dowling, Departemen Matematika, Ohio State University.
Prasyarat: Prasyarat untuk bab ini adalah teknik penghitungan dasar
dan hubungan kesetaraan. Lihat bagian 5.3 dan 8.5 Matematika Diskrit
dan Its Aplikasi.
pengantar
Satu set objek dapat diklasifikasikan menurut banyak kriteria yang berbeda, tergantung
pada sifat dari objek. Sebagai contoh, kita mungkin mengklasifikasikan
- Kecelakaan menurut hari dalam seminggu di mana mereka terjadi

- Orang menurut mereka profesi, usia, jenis kelamin, atau kebangsaan
- Mahasiswa sesuai dengan kelas mereka atau besar
- Posisi di urutan acak angka sesuai dengan digit
muncul ada
- Misprints menurut halaman di mana mereka terjadi
- Pekerjaan pencetakan sesuai dengan printer yang mereka lakukan.
Dalam setiap contoh ini, kita akan memiliki fungsi dari himpunan objek untuk
set kemungkinan tingkat kriteria dimana benda diklasifikasikan. Mengira
kita ingin mengetahui jumlah klasifikasi yang berbeda yang mungkin,
95
96 Aplikasi Matematika Diskrit
mungkin dikenakan pembatasan tambahan. Ini akan diperlukan, misalnya,
dalam memperkirakan probabilitas bahwa klasifikasi puas kondisi tertentu.
Menentukan jumlah fungsi antara set terbatas, berdasarkan ukuran
set dan pembatasan tertentu pada fungsi, adalah masalah pencacahan
dipertimbangkan dalam Bagian 7.6 dari Matematika dan Aplikasi Its.
Ini mungkin terjadi, bagaimanapun, bahwa klasifikasi tidak perlu membedakan
berbagai tingkat kriteria, jika perbedaan itu bahkan mungkin. Ada bisa
ada banyak tingkatan, tetapi tingkat aktual yang ada benda jatuh adalah tidak ada perhatian.
Bunga mungkin bagaimana set objek dipartisi menjadi subset menguraikan,
dengan dua objek berada di bagian yang sama setiap kali mereka jatuh pada tingkat yang sama
dari kriteria. Klasifikasi A kemudian merupakan partisi dari set objek,
di mana dua benda milik kelas yang sama dari partisi setiap kali mereka jatuh
pada tingkat yang sama. Dalam hal ini, daripada menghitung fungsi, partisi dari
set objek akan dihitung. Hal ini kemudian bahwa angka Stirling * menjadi
sesuai.
Seiring dengan koefisien binomial C (n, k), angka Stirling adalah dari
pentingnya dalam teori pencacahan. Sementara C (n, k) adalah nomor
subset k-unsur n-elemen set N, jumlah Stirling S (n, k) merupakan
jumlah partisi dari N ke subset k tidak kosong. Partisi
N berhubungan dengan set fungsi didefinisikan pada N, dan mereka sesuai dengan
hubungan kesetaraan pada N.
Karena interpretasi kombinasi mereka, nomor S (n, k) akan
bertemu pertama, meskipun nama mereka sebagai nomor Stirling dari jenis kedua. Setelah
kita membangun peran mereka dalam klasifikasi fungsi didefinisikan pada N, kita
mempertimbangkan
bagian mereka dalam berhubungan dua urutan polinomial (karena mereka awalnya
didefinisikan oleh Stirling). Kami kemudian akan menyebabkan Stirling nomor s (n, k) dari
jenis pertama. Kita akan melihat mengapa mereka disebut sebagai jenis pertama, meskipun
fakta bahwa beberapa bilangan bulat ini negatif, dan dengan demikian tidak dapat mewakili
ukuran set.
Masalah hunian
Banyak masalah pencacahan dapat dirumuskan sebagai menghitung jumlah distribusi
bola ke dalam sel atau guci. Bola di sini sesuai dengan objek
dan sel-sel ke tingkat. Masalah-masalah menghitung umumnya disebut sebagai
masalah hunian. Misalkan n bola yang ditempatkan di sel k, dan menganggap

bahwa setiap sel bisa menampung semua bola. Pertanyaan "Dalam berapa banyak cara bisa
akan ini dilakukan? "tanya untuk jumlah distribusi bola n k sel.
Sebagai diajukan, pertanyaan tidak memiliki informasi yang cukup untuk menentukan apa yang
dimaksud dengan distribusi. Oleh karena itu tidak bisa menjawab dengan benar. Num yang
* Mereka dinamai untuk menghormati James Stirling (1692-1770), seorang abad kedelapan belas
associate dari Sir Isaac Newton di Inggris.
Bab 6 Stirling Nomor 97
ber distribusi tergantung pada apakah bola n dan / atau sel-sel k adalah
dibedakan atau identik. Dan jika bola n dibedakan, apakah
urutan di mana bola ditempatkan di setiap hal sel. Mari kita berasumsi bahwa
urutan penempatan tidak membedakan dua distribusi.
Misalkan pertama yang baik bola dan sel dibedakan. Kemudian
koleksi bola dapat diartikan sebagai n-elemen set N dan koleksi
sel sebagai k-elemen set K. distribusi A maka sesuai dengan fungsi
f: N → K. Jumlah distribusi kemudian kn.
Namun, jika bola identik, tetapi sel-sel yang dibedakan, maka
distribusi sesuai dengan n-kombinasi dengan pengulangan dari set
K sel k (lihat Bagian 5.5 dari Matematika dan Aplikasi Its).
Jumlah bola yang ditempatkan di j sel merupakan jumlah kemunculan
j elemen dalam n-kombinasi. Jumlah distribusi dalam hal ini adalah
C (k + n - 1, n).
Masalah hunian dapat memiliki pembatasan tambahan pada jumlah bola
yang dapat ditempatkan di setiap sel. Anggaplah, misalnya, bahwa paling banyak satu bola
dapat ditempatkan di setiap sel. Jika kedua bola dan sel dibedakan,
kita kemudian akan mencari jumlah satu-ke-satu fungsi f: N → K.
Fungsi tersebut sesuai dengan n-permutasi dari k-set, sehingga jumlah
adalah P (k, n) = k (k - 1) · (k - n + 1). Jika bukan harus ada setidaknya satu
bola di setiap sel, kita ingin jumlah ke fungsi f: N → K. Menggunakan
inklusi-eksklusi, jumlah yang sama dengan
k? -1
i=0
(-1) IC (k, i) (k - i) n.
(Lihat Bagian 7.6 dari Matematika dan Aplikasi Its.)
Partisi dan Nomor Stirling dari Jenis Kedua
Partisi memerintahkan N dengan panjang k adalah k-tuple (A1, A2,..., Ak) dari
subset menguraikan Ai N dengan serikat N. Dengan mengambil K = {1, 2, ·, k}, kita bisa
menafsirkan fungsi f: N → K sebagai partisi memerintahkan N dengan panjang k.
Kita membiarkan Ai menjadi bagian dari N yang elemen memiliki gambar saya. Kemudian,
sejak ditunjuk f
tepat satu gambar di K untuk setiap elemen dari N, subset Ai adalah menguraikan dan
serikat mereka adalah N. Kemudian Ai tidak kosong jika dan hanya jika saya adalah gambar
minimal
salah satu unsur N. Jadi fungsi f adalah ke jika dan hanya jika semua k set Ai
yang tidak kosong.
Ingat bahwa partisi dari satu set N adalah himpunan P = {Ai | i ∈ I} dari menguraikan,
subset tak kosong Ai dari N yang memiliki serikat N. Kita akan memanggil subset ini

kelas. Partisi memerintahkan N dari panjang tertentu mungkin memiliki subset kosong Ai,
tapi himpunan kosong tidak diperbolehkan sebagai kelas dalam partisi. Jika itu, kemudian
bahkan
meskipun kelas yang menguraikan, mereka tidak harus menjadi set yang berbeda, karena
98 Aplikasi Matematika Diskrit
himpunan kosong mungkin diulang. Mengingat kesetaraan relasi R pada N,
kesetaraan berbeda kelas Ai yang menguraikan dengan serikat N. Properti refleksif
kemudian menyiratkan bahwa mereka tidak kosong, sehingga kelas kesetaraan membentuk
sebuah partisi
N. Sebaliknya, diberi P partisi = {Ai | i ∈ I}, sebuah relasi ekivalen R
didefinisikan oleh aR b jika dan hanya jika ada beberapa kelas Ai P mengandung a dan b.
Dengan demikian, ada korespondensi satu-ke-satu antara himpunan partisi dari N
dan himpunan relasi ekivalen pada N.
Sebuah relasi biner pada N didefinisikan sebagai subset dari himpunan N × N. Sejak N × N
memiliki elemen n2, jumlah hubungan biner pada N adalah 2n2. Jumlah
ini yang hubungan kesetaraan, yang sama dengan jumlah partisi
N, disebut Bell nomor *, dan dilambangkan dengan Bn. Sebagai contoh, nomor
cara yang sepuluh orang dapat dipisahkan ke dalam kelompok tidak kosong adalah Bell
nomor B10. Dua dari orang-orang memenuhi sesuai relasi ekivalen R
jika dan hanya jika mereka termasuk dalam kelompok yang sama.
Misalkan kita inginkan, bukan jumlah cara sepuluh orang dapat dipisahkan
menjadi tepat tiga kelompok tidak kosong. Artinya, berapa banyak kesetaraan
hubungan yang ada pada set sepuluh-elemen yang memiliki tepat tiga kesetaraan
kelas? Lebih umum, dari hubungan kesetaraan Bn, kita mungkin bertanya bagaimana
banyak yang tepat k kelas kesetaraan? Karena ini adalah jumlah partisi
N ke dalam kelas k, kita dituntun untuk definisi kita dari sejumlah Stirling S (n, k)
dari jenis kedua. (Perhatikan bahwa Bell jumlah Bn adalah maka jumlah lebih dari k
angka-angka ini, yaitu, Bn =
?
n
k = 1 S (n, k).)
Definisi 1 Jumlah Stirling dari jenis kedua, S (n, k), adalah nomor
partisi dari n-elemen set ke dalam kelas k.
Contoh 1 Find S (4, 2) dan S (4, 3).
Solusi: Misalkan N = {a, b, c, d}. Partisi 2 kelas dari 4-elemen
set N adalah
({a, b, c}, {d}), ({a, b, d}, {c}), ({a, c, d}, {b}), ({b, c, d} , {Sebuah})
({a, b}, {c, d}), ({a, c}, {b, d}), ({a, d}, {b, c}).
Oleh karena itu S (4, 2) = 7.
Partisi 3-kelas N adalah
({a, b}, {c}, {d}), ({a, c}, {b}, {d}), ({a, d}, {b}, {c})
* Kami tidak akan mengejar angka Bell di sini, tapi melihat salah satu referensi dan juga
Bagian 8.5, Latihan 68, dari Matematika dan Its Aplikasi untuk lebih
tentang mereka.
Bab 6 Stirling Nomor 99
({b, c}, {a}, {d}), ({b, d}, {a}, {c}), ({c, d}, {a}, {b})

Oleh karena itu kita memiliki S (4, 3) = 6.
Dalam masalah hunian, partisi sesuai dengan distribusi di mana
bola dibedakan, sel-sel yang identik, dan ada setidaknya satu
bola di setiap sel. Jumlah distribusi bola n ke dalam sel k karena itu
S (n, k). Jika kita menghapus pembatasan bahwa harus ada setidaknya satu bola
dalam setiap sel, maka distribusi sesuai dengan partisi dari himpunan N dengan di
sebagian besar kelas k. Dengan jumlah tersebut memerintah jumlah distribusi seperti sama
S (n, 1) + S (n, 2) + · + S (n, k).
Sejak kelas Ai dari P partisi = {Ai | i ∈ I} harus menguraikan dan
tidak kosong, kita memiliki S (n, k) = 0 untuk k> n. Selanjutnya, sejak ({S}) itu sendiri adalah
hanya partisi dari N dengan satu kelas, S (n, 1) = 1 untuk n ≥ 1. Mengingat awal
kondisi, bersama-sama dengan S (0, 0) = 1, S (n, 0) = 0 untuk n ≥ 1, Stirling
nomor S (n, k) dapat secara rekursif dihitung dengan menggunakan teorema berikut.
Teorema 1 Misalkan n dan k bilangan bulat positif. Kemudian
S (n + 1, k) = S (n, k - 1) + k S (n, k). (1)
Bukti: Kami memberikan bukti kombinatorial. Biarkan S menjadi (n + 1) Kumpulan -element.
Memperbaiki
a ∈ S, dan biarkan S? = S - {a} akan set n-elemen yang diperoleh dengan menghapus
dari S. S (n + 1, k) partisi dari S ke dalam kelas k dapat secara unik setiap
diperoleh baik dari
(i) P partisi? S? dengan k - 1 kelas dengan menambahkan kelas tunggal
{a}, atau
(ii) P partisi? S? dengan kelas k dengan terlebih dahulu memilih salah satu k
kelas P? dan kemudian menambahkan ke kelas itu.
Karena kasus yang eksklusif, kita memperoleh S (n, k) dengan aturan penjumlahan dengan
menambahkan
nomor S (n, k - 1) dari partisi dari (i) ke nomor k S (n, k) dari partisi
di (ii).
Contoh 2 Misalkan P menjadi salah satu partisi dari N = {a, b, c, d} dalam Contoh 1.
Kemudian P diperoleh dari S (3, 1) = 1 partisi satu kelas ({a, b, c}) dari N? =
N- {d} = {a, b, c} dengan menambahkan {} d sebagai kelas dua, atau dari salah satu S (3, 2) = 3
partisi dua kelas
({a, b}, {c}), ({a, c}, {b}), ({b, c}, {a})
100 Aplikasi Matematika Diskrit
N? dengan memilih salah satu dari partisi ini, kemudian memilih salah satu dari dua kelas yang,
dan akhirnya dengan menambahkan d ke kelas yang dipilih.
Contoh 3 Gunakan Teorema 1 untuk menemukan S (5, 3).
Solusi: WehaveS (4, 2) = 7 dan S (4, 3) = 6 dari Contoh 1. Kemudian kita
menemukan dengan Teorema 1 yang S (5, 3) = S (4, 2) + 3 S (4, 3) = 7 + 3 · 6 = 25.
Pascal rekursi C (n + 1, k) = C (n, k - 1) + C (n, k) yang digunakan untuk menghitung
koefisien binomial memiliki bentuk yang sama, tetapi koefisien di kedua
jangka jumlahnya adalah 1 untuk C (n, k) dan k untuk S (n, k).
Menggunakan relasi rekurensi dalam Teorema 1, kita dapat memperoleh masing-masing
Nomor Stirling S (n, k) dari dua Stirling nomor S (n-1, k-1), S (n-1, k)
sebelumnya ditemukan. Ini diberikan pada Tabel 1 untuk 1 ≤ k ≤ n ≤ 6.
n\k123456

11
211
3131
41761
5 1 15 25 10 1
6 1 31 90 65 15 1
Tabel 1. Stirling jumlah jenis kedua, S (n, k).
Partisi kebalikan dari Fungsi
Ingat bahwa fungsi f: N → K adalah ke jika setiap elemen b ∈ K adalah gambar
dari beberapa elemen a ∈ N, sehingga b = f (a). Jika kita menunjukkan set gambar dengan
f (N) = {f (a) | a ∈ N}, maka f adalah ke jika dan hanya jika f (N) = K.
Contoh 4 Misalkan N = {a, b, c, d}, K = {1, 2, 3}, dan fungsi f adalah
didefinisikan oleh f (a) = f (b) = f (d) = 2, f (c) = 1. Kemudian f (N) = {1, 2}? = K, sehingga f
adalah
tidak ke.
Setiap fungsi f: N → K menentukan relasi ekivalen pada N bawah
yang dua unsur N terkait jika dan hanya jika mereka memiliki gambar yang sama
di bawah f. Sejak kelas kesetaraan membentuk partisi dari N, kita membuat
definisi berikut.
Bab 6 Stirling Nomor 101
Definisi 2 Partisi terbalik didefinisikan oleh fungsi f: N → K adalah
P partisi (f) dari N ke dalam kelas kesetaraan sehubungan dengan kesetaraan yang
hubungan Rf didefinisikan oleh Arf b jika dan hanya jika f (a) = f (b).
Mengingat fungsi f, setiap elemen b ∈ f (N) menentukan suatu kesetaraan
kelas Rf. Misalkan kita dilambangkan dengan f-1 (b) set elemen dalam N yang memiliki b
sebagai citra mereka *. Kemudian f-1 (b) adalah kelas kesetaraan, disebut gambar terbalik
b. Oleh karena itu
a∈f
-1 (B) jika dan hanya jika b = f (a).
Dengan demikian, kelas kesetaraan f-1 (b) untuk b ∈ f (N) membentuk partisi terbalik
P (f) dari N, dan jumlah kelas kesetaraan adalah ukuran set f (N).
Oleh karena itu f: N → K adalah ke jika dan hanya jika P (f) memiliki kelas k.
Contoh 5 Cari partisi kebalikan dari N yang didefinisikan oleh fungsi f dari
Contoh 4.
Solusi: Untuk f fungsi dalam Contoh 4, himpunan unsur N dengan
gambar 1 adalah f-1 (1) = {a, b, d}, sedangkan set elemen dengan gambar 2 adalah f-1 (2) =
{c}. Karena tidak ada unsur memiliki 3 sebagai gambar, set-f 1 (3) kosong, sehingga tidak
kelas kesetaraan. Jadi partisi kebalikan dari N yang didefinisikan oleh f adalah kelas 2
P partisi (f) = ({a, b, d}, {c}).
Sebuah Identitas untuk Bilangan Stirling
Kita dapat mengklasifikasikan distribusi kn bola n dibedakan menjadi k dibedakan
sel dengan jumlah j sel tidak kosong. Distribusi tersebut ditentukan
oleh P partisi j-kelas dari set bola bersama-sama dengan fungsi φ injective
dari kelas j P ke sel k. Klasifikasi diperoleh dengan cara ini
mengarah ke identitas yang melibatkan angka Stirling dari jenis kedua. Menunjukkan
oleh F (N, K) himpunan fungsi f: N → K. Ingat bahwa ukuran F (N, K)

adalah kn. Mari kita mengklasifikasikan fungsi f ∈ F (N, K) sesuai dengan ukuran mereka
image set f (N), atau ekuivalen, menurut jumlah kelas di mereka
inverse partisi P (f).
* Apa yang telah kita dilambangkan dengan f-1 sebenarnya fungsi dari K ke kekuasaan
set P (N) dari N, dan bukan fungsi invers dari f. Fungsi f: N → K memiliki
fungsi invers dari K ke N jika dan hanya jika itu adalah korespondensi satu-ke-satu.
102 Aplikasi Matematika Diskrit
Mengingat P partisi j-class = {A1,, A2,. . ., Aj} N, mempertimbangkan set
fungsi f ∈ F (N, K) yang P (f) = P. Dua elemen di N dapat memiliki
gambar yang sama jika dan hanya jika mereka milik Ai yang sama. Oleh karena itu fungsi f
memiliki
P (f) = P jika dan hanya jika ada fungsi φ satu-ke-satu: {A1, A2,. . . , Aj} → K
sehingga f (a) = φ (Ai) untuk semua i dan semua ∈ Ai. Jumlah satu-ke-satu
fungsi dari j-set ke k-set adalah faktorial jatuh
(k) j = P (k, j) = k (k - 1) · (k - j + 1).
Oleh karena itu, untuk setiap j-kelas partisi P, jumlah fungsi f ∈ F (N, K) seperti
bahwa P (f) = P (k) j. Karena ada S (n, j) partisi j-kelas N, oleh
Aturan produk ada S (n, j) (k) fungsi j f ∈ F (N, K) sehingga f (N) memiliki
ukuran j. Menjumlahkan j memberi kita
kn =
?k
j=1
S (n, j) (k) j. (2)
Istilah j di sum adalah sejumlah fungsi f yang | f (N) | = J.
Kami mencatat sebelumnya bahwa ke fungsi sesuai dengan distribusi di
masalah hunian di mana bola dan sel dibedakan dan
harus ada setidaknya satu bola di setiap sel. Jika kita menghapus pembatasan yang
harus ada setidaknya satu bola di setiap sel, maka distribusi sesuai dengan
fungsi f: N → K. Klasifikasi distribusi kn menurut
jumlah sel tidak kosong memberikan (2). Jika kita menganggap istilah di mana j = k di (2),
dan perhatikan bahwa (k) k = k !, kita memiliki teorema berikut.
Teorema 2 Jumlah fungsi dari satu set dengan elemen n ke set
dengan elemen k adalah S (n, k) k !.
Prinsip inklusi-eksklusi dapat digunakan untuk menunjukkan bahwa jumlah
ke fungsi dari satu set dengan elemen n untuk set dengan elemen k adalah
?k
i=0
(-1) IC (k, i) (k - i) n. (3)
Dengan Teorema 2, kita bisa menyamakan (3) ke S (n, k) k !, dan kita memperoleh
S (n, k) =
1
k!
?k
i=0
(-1) IC (k, i) (k - i) n. (4)
Contoh 6 Misalkan