Discrete Mathematics
WEN-CHING LIEN Department of Mathematics National Cheng Kung University
2008
5.3: Onto Functions: Stirling Numbers of the Second Kind
Definition (5.9)
A function f :A→B, is called onto, or surjective, if f(A) =B that is, if for all b ∈B there is at least one a∈A with f(a) =b.
Example (5.22)
If A= {x,y,z}and B= {1,2}, then all functions f :A→B, are onto except
f1= {(x,1), (y,1), (z,1)},and f2= {(x,2), (y,2), (z,2)},the constant functions.
So there are|B||A|−2=23−2=6 onto functions from A to B.
5.3: Onto Functions: Stirling Numbers of the Second Kind
Definition (5.9)
A function f :A→B, is called onto, or surjective, if f(A) =B that is, if for all b ∈B there is at least one a∈A with f(a) =b.
Example (5.22)
If A= {x,y,z}and B= {1,2}, then all functions f :A→B, are onto except
f1= {(x,1), (y,1), (z,1)},and f2= {(x,2), (y,2), (z,2)},the constant functions.
So there are|B||A|−2=23−2=6 onto functions from A to B.
5.3: Onto Functions: Stirling Numbers of the Second Kind
Definition (5.9)
A function f :A→B, is called onto, or surjective, if f(A) =B that is, if for all b ∈B there is at least one a∈A with f(a) =b.
Example (5.22)
If A= {x,y,z}and B= {1,2}, then all functions f :A→B, are onto except
f1= {(x,1), (y,1), (z,1)},and f2= {(x,2), (y,2), (z,2)},the constant functions.
So there are|B||A|−2=23−2=6 onto functions from A to B.
5.3: Onto Functions: Stirling Numbers of the Second Kind
Definition (5.9)
A function f :A→B, is called onto, or surjective, if f(A) =B that is, if for all b ∈B there is at least one a∈A with f(a) =b.
Example (5.22)
If A= {x,y,z}and B= {1,2}, then all functions f :A→B, are onto except
f1= {(x,1), (y,1), (z,1)},and f2= {(x,2), (y,2), (z,2)},the constant functions.
So there are|B||A|−2=23−2=6 onto functions from A to B.
5.3: Onto Functions: Stirling Numbers of the Second Kind
Definition (5.9)
A function f :A→B, is called onto, or surjective, if f(A) =B that is, if for all b ∈B there is at least one a∈A with f(a) =b.
Example (5.22)
If A= {x,y,z}and B= {1,2}, then all functions f :A→B, are onto except
f1= {(x,1), (y,1), (z,1)},and f2= {(x,2), (y,2), (z,2)},the constant functions.
So there are|B||A|−2=23−2=6 onto functions from A to B.
Numbers of onto function from A to B:
For any sets A, B with |A| =m and|B| =n,there are
n n
nm− n−1n (n−1)m+ n−2n (n−2)m− · · · +(−1)n−2 n2
2m+ (−1)n−1 n1
1m=Pn−1
k=0(−1)n−k n−kn (n−k)m
=
n
X
k=0
(−1)n−k
n n−k
(n−k)m onto functions from A to B.
Numbers of onto function from A to B:
For any sets A, B with |A| =m and|B| =n,there are
n n
nm− n−1n (n−1)m+ n−2n (n−2)m− · · · +(−1)n−2 n2
2m+ (−1)n−1 n1
1m=Pn−1
k=0(−1)n−k n−kn (n−k)m
=
n
X
k=0
(−1)n−k
n n−k
(n−k)m
onto functions from A to B.
Numbers of onto function from A to B:
For any sets A, B with |A| =m and|B| =n,there are
n n
nm− n−1n (n−1)m+ n−2n (n−2)m− · · · +(−1)n−2 n2
2m+ (−1)n−1 n1
1m=Pn−1
k=0(−1)n−k n−kn (n−k)m
=
n
X
k=0
(−1)n−k
n n−k
(n−k)m
onto functions from A to B.
Numbers of onto function from A to B:
For any sets A, B with |A| =m and|B| =n,there are
n n
nm− n−1n (n−1)m+ n−2n (n−2)m− · · · +(−1)n−2 n2
2m+ (−1)n−1 n1
1m=Pn−1
k=0(−1)n−k n−kn (n−k)m
=
n
X
k=0
(−1)n−k
n n−k
(n−k)m onto functions from A to B.
Rule:
For m ≥n there arePn
k=0(−1)n−k n−kn (n−k)m ways to distribute m distinct objects into n numbered(but otherwise identical) containers with no container left empty.
Removing the numbers on the containers, so that they are now identical in appearance, we find that one distribution into these n (nonempty) identical containers corresponds with n!such distributions into the numbered containers.
...continued
Rule:
For m ≥n there arePn
k=0(−1)n−k n−kn (n−k)m ways to distribute m distinct objects into n numbered(but otherwise identical) containers with no container left empty.
Removing the numbers on the containers, so that they are now identical in appearance, we find that one distribution into these n (nonempty) identical containers corresponds with n!such distributions into the numbered containers.
...continued
So the number of ways in which it is possible to distribute the m distinct objects into n identical containers, with no container left empty, is
1 n!
n
X
k=0
(−1)n−k
n n−k
(n−k)m
This will be denoted by S(m,n)and is called a Stirling number of the second kind.
We note that for |A| =m≥n= |B|,there are n! ·S(m,n)onto functions from A to B.
So the number of ways in which it is possible to distribute the m distinct objects into n identical containers, with no container left empty, is
1 n!
n
X
k=0
(−1)n−k
n n−k
(n−k)m
This will be denoted by S(m,n)and is called a Stirling number of the second kind.
We note that for |A| =m≥n= |B|,there are n! ·S(m,n)onto functions from A to B.
So the number of ways in which it is possible to distribute the m distinct objects into n identical containers, with no container left empty, is
1 n!
n
X
k=0
(−1)n−k
n n−k
(n−k)m
This will be denoted by S(m,n)and is called a Stirling number of the second kind.
We note that for |A| =m≥n= |B|,there are n! ·S(m,n)onto functions from A to B.
So the number of ways in which it is possible to distribute the m distinct objects into n identical containers, with no container left empty, is
1 n!
n
X
k=0
(−1)n−k
n n−k
(n−k)m
This will be denoted by S(m,n)and is called a Stirling number of the second kind.
We note that for |A| =m≥n= |B|,there are n! ·S(m,n)onto functions from A to B.
Example (5.27) For m ≥n,Pn
i=1S(m,i)is the number of possible ways to distribute m distinct objects into n identical containers with empty containers allowed.From the fourth row of Table 5.1
we see that there are 1+7+6=14 ways to distribute the
we see that there are 1+7+6=14 ways to distribute the
Theorem (5.3)
Let m, n be positive integers with 1<n≤m.Then S(m+1,n) =S(m,n−1) +nS(m,n).
Theorem (5.3)
Let m, n be positive integers with 1<n≤m.Then S(m+1,n) =S(m,n−1) +nS(m,n).
Proof:
Let A= {a1,a2, ...,am,am+1}Then S(m+1,n)counts the number of ways in which the objects of A can be
distributed among n identical containers, with no container left empty.
1 am+1is in a container by itself.
(i) There are S(m,n−1)ways of distributing a1,a2, ...,am
objects among n−1 identical containers.
(ii) Placing am+1in the remaining empty (nth) container results in S(m,n−1)ways counted in S(m+1,n).
2 am+1is in the same container as another object.
Proof:
Let A= {a1,a2, ...,am,am+1}Then S(m+1,n)counts the number of ways in which the objects of A can be
distributed among n identical containers, with no container left empty.
1 am+1is in a container by itself.
(i) There are S(m,n−1)ways of distributing a1,a2, ...,am
objects among n−1 identical containers.
(ii) Placing am+1in the remaining empty (nth) container results in S(m,n−1)ways counted in S(m+1,n).
2 am+1is in the same container as another object.
Proof:
Let A= {a1,a2, ...,am,am+1}Then S(m+1,n)counts the number of ways in which the objects of A can be
distributed among n identical containers, with no container left empty.
1 am+1is in a container by itself.
(i) There are S(m,n−1)ways of distributing a1,a2, ...,am
objects among n−1 identical containers.
(ii) Placing am+1in the remaining empty (nth) container results in S(m,n−1)ways counted in S(m+1,n).
2 am+1is in the same container as another object.
Proof:
Let A= {a1,a2, ...,am,am+1}Then S(m+1,n)counts the number of ways in which the objects of A can be
distributed among n identical containers, with no container left empty.
1 am+1is in a container by itself.
(i) There are S(m,n−1)ways of distributing a1,a2, ...,am
objects among n−1 identical containers.
(ii) Placing am+1in the remaining empty (nth) container results in S(m,n−1)ways counted in S(m+1,n).
2 am+1is in the same container as another object.
Proof:
Let A= {a1,a2, ...,am,am+1}Then S(m+1,n)counts the number of ways in which the objects of A can be
distributed among n identical containers, with no container left empty.
1 am+1is in a container by itself.
(i) There are S(m,n−1)ways of distributing a1,a2, ...,am
objects among n−1 identical containers.
(ii) Placing am+1in the remaining empty (nth) container results in S(m,n−1)ways counted in S(m+1,n).
2 am+1is in the same container as another object.
(i) There are S(m,n)ways of distributing a1,a2, ...,amobjects among n identical containers.
(ii) Placing am+1in the n distinct container results in nS(m,n) ways counted in S(m+1,n).
∴Totally,S(m+1,n) =S(m,n−1) +nS(m,n).
(i) There are S(m,n)ways of distributing a1,a2, ...,amobjects among n identical containers.
(ii) Placing am+1in the n distinct container results in nS(m,n) ways counted in S(m+1,n).
∴Totally,S(m+1,n) =S(m,n−1) +nS(m,n).
(i) There are S(m,n)ways of distributing a1,a2, ...,amobjects among n identical containers.
(ii) Placing am+1in the n distinct container results in nS(m,n) ways counted in S(m+1,n).
∴Totally,S(m+1,n) =S(m,n−1) +nS(m,n).