Let A = {1, 2, 3, 4} and B = {x, y, z}. (a) List five functions from AtoB. (b) How many functions f : A→B are there? (c) How many functions f : A→B are one-to-one? (d) How many functions g: B →A are there? (e) How many functions g: B →A are one-to-one? (f) How many functions f : A→B satisfy f (1) = x? (g) How many functions f : A→B satisfy f (1) = f (2) = x? (h) How many functions f : A→B satisfy f (1) = x and f (2) = y?
b)3*3*3*3=81 c)3*2*1=6 d)4*4*4=64 e)4*3*2=24 f)1*3*3*3=27 g)1*1*3*3=9 h)1*1*3*3=9
Very interesting question.
I can help with b)
ok thank you wio
I would find all subsets of size \(k\). There are \(\binom nk\) ways to do this where \(n\) is carnality of \(A\). They can all be mapped to one of \(3\) elements in \(B\). So \(3^k\) possible mappings, for any such subset.
Doing this for subsets of every size, we get: \[ \sum\binom nk3^k=\sum\binom nk 3^k1^{n-k}=(3+1)^n=4^n \]
Does that make sense?
\(n=|A|=4\) and so \(4^n=4^4=256\)
It think you are wrong Wio. Each element in A can be assign to three different element in B. So there are 3*3*3*3 such function
You are correct if you must use all elements in A. However I am assuming you can use a subset of the elements of A if you want.
No, in an undegrad course when we say function f:A-> B it is always assumed that the domain is the whole A
Then your answer to \(c\) should be \(0\) since you can't have a one to one function that uses all elements in the domain. You're not even consistent with your own assumptions.
yes, that is right! I was wrong!
Well for me it isn't about right or wrong, but consistency. We can do it your way, but then c is 0. We can do it my way, and c is a bit more of a challenge.
Page 24 (Which is slide 4) covers some of this more clearly. http://www.cs.toronto.edu/~stacho/macm101-2.pdf
well just ask the student what is the definition of function here
@sexybunch Can you fill us in? Does every element in \(A\) have to be used?
Let's do it @watchmath 's way, but then change c) to be 0
can we edit our answer? I don't know how
let me look it up for you on the definition of function ...if you still need it
yes every element of A can be used wio
must be used you mean?
can be used and must be used are not the same.
yes
can be use
The responses work and I really appreciate your help.
Join our real-time social learning platform and learn together with your friends!