0

I am having trouble understanding this question.

I know the total number of function is $4^6 = 4096$. There are no injective functions as the domain > co domain.

I know there is a part that I'm missing that has to do with the amount of functions that are neither surjective nor injective.

My train of thought was along the lines of (total - injective (=0) - not injective not surjective) = total number of surjective.

N. F. Taussig
  • 76,571
lowy95
  • 1
  • Your thought is completely illogical. Coming to your question, there is a long formula to find this (uses inclusion-exclusion principle). You can find it up on internet. – Tojra Mar 30 '19 at 03:28
  • okay thanks.... thought it might be on the wrong track. im very new to this and am a little confused – lowy95 Mar 30 '19 at 03:34
  • Hint: you will need to consider two types of cases: 3 elements of $A$ map to 1 element of $B$ and the other 3 elements of $A$ map to the other 3 elements of $B$; and 2 elements of $A$ map to 1 element of $B$ other 2 elements of $A$ map to another 1 element of $B$ and the remaining 2 elements of $A$ map to 2 elements of $B$. – Ertxiem - reinstate Monica Mar 30 '19 at 03:37

1 Answers1

2

Since the function is surjective, the pre-image of any element is non-empty. Thus, the maximum number of elements in any pre-image of any element is 3. So we break it up into cases:

Case 1 Some element in B has 3 elements in its preimage: There are $\binom{4}{1} = 4$ ways to pick that element. Given that element there are $\binom{6}{3}$ = 20 ways to pick the 3 elements in A as the pre-image. Then there are 3!=6 ways to pick the pre-images of the remaining elements. So this case has counted 4*20*6 such functions.

Case 2 Two elements in B each have 2 elements in its preimage: Arguing similarly in Case 1, we have $\binom{4}{2}$=6 ways to pick these two elements. Given the two elements we have $\binom{6}{2}\binom{4}{2} = 15*6$ ways to pick the pre-images. Then there are 2!=2 ways to pick the pre-image of the remaining elements. So this case has counted 6*15*6*2 such functions.

Now we have exhausted all possibilities, so we just add the numbers together and we are done.

Joel Pereira
  • 1,229