DM Chap5
DM Chap5
+ ordered pairs
1. For (a ,b ), (c , d ) A B
(a ,b ) = (c , d ) a = c and b = d
3. A B 6= B A
|A B | = |B A|
4. In general, if n Z+ , n 3, and A 1 , A 2 A n U ,
A 1 A 2 A n = {(a 1 , a 2 , a n )|a i A i , 1 i n}
n-fold product.
(a 1 , a 2 , a n ) : n-tuples.
Example 2
U = R, R R = {(x , y )|x , y R} : real plane of coordinate geometry.
Definition 2
For set A, B U , any subset of A B is called a relation from A to B .
Any subset of A A is called a binary relation on A.
Example 3
In Example 1: relations from A to B :
+ In general, for finite sets A, B with |A| = m and |B | = n, there are 2 mn relations from A to B .
Example 4 A = U = Z+
1
Example 5
Let R be a subset of N N where R = {(m , n)|n = 7m }
Then R can be given recursively by
1. (0, 0) R
2. If (s , t ) R, (s + 1, t + 7) R
2
2 Functions : Plain and One-To-One
Definition 1
For nonempty sets A, B , a function, or mapping, f from A to B , denote f : A B , is a relation from
A to B in which every element of A appears exactly once as the first component of an ordered pair in
the relation.
a: preimage of b
If (a ,b ), (a , c ) f b =c
3
Example 3 ceiling and floor
Definition 2
A function f : A B is called one-to-one, or injective, if each element of B appears at most once as
the image of an element of A.
f (a 1 ) = f (a 2 ) a1 = a2
4
+ Let A = {a 1 , a 2 , a m } B = {b 1 ,b 2 , b n } and m n, a 1-1function f : A B has the form
{(a 1 , x 1 ), (a 2 , x 2 ), , (a m , x m )}, where there are n choices for x 1 , n 1 choices for x 2 , n 2 choices for
x 3 , , n (m 1) choices for x m . Then the # of 1-1 functions from A to B is
n!
n(n 1)(n 2) (n m + 1) = = P(n, m )
(n m )!
Definition 3
If f : A B and A 1 A then
f (A 1 ) = {b B |b = f (a ) for some a A 1 }
and f (A 1 ) is called the image of A 1 under f .
Definition 4
If f : A B and A 1 A, then f |A1 : A 1 B is called restriction of f to A 1 if f |A1 (a ) = f (a ) for all a A 1 .
5
3 Onto Functions : Stirling Numbers of the Second Kind
Definition 1
If 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 1
Example 2 If A = {1, 2, 3, 4} B = {x , y , z }
+
The # of onto functions from a set of size 7 to a set of size 4.
= The # of ways to distribute 7 different objects into 4 distinct containers with no container left empty.
6
Example 5
A = {a ,b, c , d } B = {1, 2, 3}
There are 36 onto functions from A to B .
How many ways to distribute the distinct objects a ,b, c , d among three identical container, leaving
no container empty?
+ The # of ways to distribute the m distinct objects into n identical containers, with no container
left empty, is
n
1 X n
S(m , n) = (1)k
(n k )m
n! k =0 n k
+
For |A| = m n = |B |, there are n! S(m , n) onto functions from A to B .
m \n 1 2 3 4 5 6 7 8
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
7 1 63 301 350 140 21 1
8 1 127 966 1701 1050 266 28 1
Theorem 1.
For m , n Z with 1 < n m , then
7
4 Special Functions
Definition 1
For any nonempty sets A, B , any function f : A A B is called a binary operation on A. If B A,
then the binary operation is said to be closed on A.
Definition 2
A function g : A A is called a unary, or monary, operation on A.
Example 1
Definition 3 f : A A B
Example 2
8
Example 3 A = {a ,b, c , d } |A A| = 16 f : A A A
Determine the number of commutative closed binary ops on A.
Definition 4
Let f : A A B be a binary op on A. An element x A is called an identity for f if f (a , x ) = f (x , a ) =
a , a A
Example 4
Example 5 If A = {x , a ,b, c , d }, how many closed binary ops on A have x as the identity?
+ REMARK:
2
1. n n closed binary ops f : A A A
(n 2 n)
2. n n n 2 commutative closed binary ops on A.
identity element.
n
4. 1 n (n 1) binary ops on A where there is an identity.
2
9
5 The Pigeonhole Principle
The Pigeonhole Principle
If m pigeons occupy n pigeonholes and m > n, then at least one pigeonhole has two or more pigeons
roosting in it.
Example 1
How many people must be selected from a collection of 15 married couples to ensure that at least two
of the persons chosen are married to each other?
Example 2
Let S Z+ , where |S| = 37. Then S contains 2 or more elements that have the same remainder upon
division by 36.
Example 3
Any subset of size 6 from the set S = {1, 2, , 9} must contain two elements whose sum is 10.
Example 4
Let S be a set of 6 POS integers whose maximum is at most 14. Show that the sums of the elements in
all nonempty subsets of S cannot all be distinct.
10