Sei sulla pagina 1di 9

4.

3

13.) Suppose the set A has m elements and the set B has n elements. By Exercise 17 in
Section 4.1, there are 2^(mn) relations from A to B and n^m functions from A to B.

(a) If m < n, find the number of one-to-one functions from A to B.
(b) If m = n, find the number of one-to-one functions from A to B.
(c) If m > n, find the number of one-to-one functions from A to B.
(d) If m < n, find the number of functions from A onto B.
(e) If m = n, find the number of functions from A onto B.
(f) If m=n+1,find the number of functions from A onto B.
(g) If m = n, find the number of one-to-one correspondences from A onto B.

By using the techniques of finding 2(m*n) relations and n^m functions from A to B we
can then attempt to solve a-g.

2^(n*m) Relations from A!B

Relation from A to B is set of ordered pairs |AxB|=m*n

Total number of elements in a set is given by its power set P(A)=2^m

Therefore the total number of relations from A to B is the power set of AxB.
P(|AxB|)= 2^(m*n)

Example:
if A=[a], B=[b,c],

P(AxB),{{},(a,b)},{(a,c)},{(a,b),(a,c)}} : 4 Relations

(Using 2^(m*n))
P(AxB)=2^(1*2)= 4 relations

n^m functions from A!B
Want to find the total functions from A to B

Function from A to B is a relation f from A to B such that
1.) The Domain of f is A and
2.) Every x in Dom A has a unique image in B (if (x,y) in f and (x,y) in f then y=z)

For ex if A={a,b}, B={r,q,s},

By representation using strings

Input A a b
Choices from B 3 * 3 = 3^2= 9 functions from A to B



a b
a a {(a,a), (b,a)}
a b {(a,a),(b,b)}
a c {(a,a),(b,c)}
b a {(a,b),(b,a)}
b b {(a,b),(b,b)}
b c {(a,b),(b,c)}
c a {(a,c),(b,a)}
c b {(a,c),(b,b)}
c c {(a,c),(b,c)}

Visually we see there are 9 functions

-Prove for all sets using strings and applying the product rule.

if |A|=m , |B|=n


Input A a(1) a(2) a(3) a(m)
# Choices B a(n) a(n) a(n) a(n) = a(n) * a(n) * a(n)* *a(n) =n^m functions

Therefore there are n^m functions from A to B.




















a.) If m < n, find the number of one-to-one functions from A to B.

One-to-one function - iff f(x)=f(y) then x=y.

Being a function f , the domain f must equal A. Being 1-1, every x in A must have a
unique image in B


ex.) A={a,b} , B={a,b,c}

Input: a b
Choices: a b
a c
b a
b c
c a
c b

There are 6 one-to-one functions

Input a b
# Choices 3 2 = 3*2 (apply the product rule)= 6 = 3! = 3! .
1! (3-2)!

3!__ = 3P2 = __n! : Permutation Rule: repetition not allowed and order is important.
(3-2)! (n-m)!


Prove for all sets m<n
A| = m , |B| = n

a(1) a(2) a(3) a(m)
a(n) a(n-1) a(n-2) a(n-m) = a(n) * a(n-1) * a(n-2) * * a(n-m) = nPm = n!__
(n-m)!
Therefore if m<n there are __n!__ functions from A to B.
(n-m)!










b.) If m = n, find the number of one-to-one functions from A to B.

Try an example:

A={a,b} , B={a,b}

Using strings:

Input A: a b
Number of Choices B: 2 1 = 2*1=2 =2! = m!

Input: a b
Choices B a b
b a

We see there are 2 one to one functions from A to B

So If we have m and n have 3 elements:

A={a,b,c}, B={a,b,c}

Input: a b c
Choices: 3 2 1 = 3*2*1 = 3! = m! one to one functions



Prove for all sets m=n

So if |A|=m and |B|=n and m=n

Input A: a(1) a(2) a(3) a(m)
# Choices B: a(m) a(m-1) a(m-2). a(1) = m!

Therefore if m=n there are m! one to one functions from A to B.












(c) If m > n, find the number of one-to-one functions from A to B.

Example:)

A={a,b} , B={a}

Using strings:

Input A: a b
#Choices B: 1 0 = 1*0 = 0

We have 0 one to one functions from A to B.

Input A: a b
Output B: a

We can see there are 0 one to one functions

Prove for all sets m > n

|A|=m , |B|=n

Input A: a(1) a(2) a(n) a(m)
Choices B: a(n) a(n-1) a(1) 0 = a(n)* a(n-1)* *a(1)** 0 = 0

As long as m>n, some element in A will not have a unique image in B and still be a
function.
Therefore for m>n, there are 0 one to one functions from A to B.

















(d) If m < n, find the number of functions from A onto B.


A function f from A to B is onto B iff for every element y of B , there is an element x in
A such that f(x) = y . (Rng(f)=B.)

Example:

A={a,}, B={a,b,}

Using strings:

Input B: a b
# Choices A: 1 0 = 1*0 = 0 functions A onto B

Input B: a b
Pre image A: a

We can see there are 0 functions A onto B

Prove for all sets m<n.

|A|=m, |B|=n

Input B: a(1) a(2) a(m)a(n)
# Choices A: a(m) a(m-1) a(1) 0 = a(m)* a(m-1)**a(1)**0 = 0

We can conclude since there are less elements in A than in B, that in order for f to be
onto, some element in A will have more than one pre image in B

So if f is onto, then it can no longer be a function since some element or elements in the
domain will have more than one image in B, which violates the definition of a function.

Therefore if m<n then there are 0 functions A onto B.












(e) If m = n, find the number of functions from A onto B.

Example:

A={a,b}, B={a,b}

Input B: a b
Choices A: 2 1 = 2*1=2!=2 onto functions

Input B a b
0utput A: a b
b a
We see theie aie 2 onto functions

Piove foi all sets m=n

|A|=m, |B|=n

#Input B:__ a(1) a(2) .. a(m)
Choices A: a(m) a(m-1).... a(1) = a(m)*a(m-1)*...*a(1)=m!

Therefore we see if m=n then there are m! onto functions
























(f) If m=n+1, find the number of functions from A onto B.

Example:

A = {a,b,c,} anu B = {a,b}.

Using strings to visualize:

Input A: a b c
Output B: a a b
a b a
a b b
b b a
b a b
b a a

6 onto functions.

First,) some element in B has two pre-images and this can happen n ways ( 2 ways for the
example.)

Second,) count ways 2 elements of A go to that element of B with 2 pre-images by
choosing 2 out of n+1 elements. (3 ways for the example)
We can do this by using the binomial coefficient.


(n+1) choose r = (n+1) C r = __ m!__
r!(m-r)!
For the example:
(n+1) choose 2 = (n+1)C2 = 3 C 2 = __m!__ = 3! = 6 = 3 ways
r!(m-r)! 2!(3-2)! 2
Third,) knowing which 2 elements of A map to the same image, we need to assign an
image to the rest of the (n-1) elements of A, which is

((n+1) 1) 1) = (n-1)!
For the example:
((3-1) -1)! = (3 2)! = 1! = 1

Finally,) using the product rule we have a combined total of (n)*( (n+1) C 2 )* (n-1)!

For the example
2*3*1= 6 onto functions.

Therefore if m=n+1 then there are (n)*( (n+1) C 2 )* (n-1)! functions A onto B,


(g) If m = n, find the number of one-to-one correspondences from A onto B.


A function f : A ! B is a one-to-one correspondence (or a bijection) iff f is one-to-one
and onto B.

From part b and e determined if m=n then the number of one-to-one functions is m! and
the number of onto functions is m!


|A|=m, |B|=n

b.)0ne to one functions:
Input A: a(1) a(2) a(m)
# Choices B: a(m) a(m-1) a(1) = a(m)*a(m-1)**a(1) = m!

e.) Onto functions
#Input B:__ a(1) a(2) a(m)
Choices A: a(m) a(m-1).... a(1) = a(m)*a(m-1)*...*a(1) = m!

Therefore if m=n then A and B are equivalent because there exists a one-to-one function
from A onto B.

Since f is a bijection there are m! one-to-one correspondences from A to B

Potrebbero piacerti anche