Chapter 5 Relations and Functions
Chapter 5 Relations and Functions
Unit 4
Functions:
n m n n n 1 n m
n (n 1)
m
(n 2) ... (1) 1
m
n n 1 n 2 1
n
n
(1) k
(n k ) m
k 0 n k
Examples
Ex 5.24. Let A={1, 2, 3, 4, 5, 6, 7} and B={w, x, y, z}. So, m=7 and n=4.
There are 8400 onto functions.
C(4, 4)47-C(4, 3)37+C(4, 2)27-C(4, 1)17=8400
n
n
( 1)k
n k ( n k ) m
k 0
Problem 1
Problem 2
Examples
Ex 5.26. Let A={a, b, c, d} and B={1, 2, 3}. So, m=4
and n=3. There are 36 onto functions, or equivalently, 36
ways to distribute four distinct objects into three
distinguishable containers, with no container empty.
For mn, the number of ways to distribute m distinct
objects into n numbered containers with no container left
empty is :
n
n
( 1k
)
n k ( n k ) m
k 0
Distinguishable and identical
distribute m distinct (identical) objects into n numbered
(identical) containers
{a, b} in container 1, {c} in container 2, {d} in container 3
{a, b} in one container, {c} in the other container, {d} in another
container
2 objects in container 1, 1 object in container 2, 1 object in container 3
2 objects in one container, 1 object in the other container, 1 object in
another container
Stirling number of the second kind
The stirling number of the second kind is the number of ways
to distribute m distinct objects into n identical containers, with
no container left empty, denoted S(m,n), which is
1 n k n
( 1)
n k( n k ) m
n! k 0
n
S ( m, i )
i 1