We were given the following question in class:
Let A = {1, 2, 3, 4, 5} and B = {a, b, c, d, e, f}. How many functions
from A to B are there:
(a) which are a surjection?
(b) which are an injection
(c) which are a bijection,
(d) which have f(1) = a,
(e) for which ∃x ∈ A, f(x) = b,
(f) for which 1 and 5 have the same image,
(g) for which two elements of A have the image c, and three elements have the image e.
I was just wondering if someone could give me a little advice with how I'm working through these, and some tips on how to go through the question.
- For (a) I treated it like a Stars and Bars question, where the size was 6 (size of B) and the amount of gaps was 5 (size of A) and you could have ones where certain ones in A didn't do anything, so the formula would be $\binom{5 + 6 - 1}{5 - 1}$. Is that right?
- For (b) I was confused with whether or not injection means ALL of the ones in the domain must match to unique ones in the codomain, or if for instance, one matching to one in the codomain counts as a separate one, such as f(1) = b, and f(1) = a count as two separate functions. How would I tackle this one?
- c) I figured 0, because $|B| > |A|$
- d) I figured 1 was a mandatory option now, so that left us with 4 other numbers to match with (to 6 different letters). Considering that something else could still equal a, just 1 couldn't, I considered it another Stars and Bars question and said $\binom{4 + 6 - 1}{4 - 1}$
- e) I know this means that b will always have a value in the domain linking to it, but I'm not sure how to tackle it.
- f) and g) I'm not sure how to tackle either.
For the ones I think I did well at solving, the numbers seem really low for my understanding of injective, surjective and bijective functions.
Could anyone offer some insight/help into how I'd go about solving these? Many thanks, just looking for some help.
