[Math] How many functions Injective have for $|A|=3 \rightarrow |B|=4$ And How many Surjective

combinatoricsdiscrete mathematics

How many functions Injective and Surjective have for $|A|=3 \rightarrow |B|=4$
for example :
$$A=\{1,2,3\} \rightarrow B=\{1,2,3,4\}$$
the answer for Injective is: $4\cdot 3 \cdot 2$ or $\binom {3} {4}$
for how many surjective functions we have I didnt understand that because $A$ dont point on all the elements in $B$

any suggestions?
thanks!

EDIT
if I want all the functions from $|A|=3 \rightarrow |B|=4$ so how many functions I have now?

Best Answer

If $|A|=3$ and $|B|=4$, then you have $4^3 = 64$ possible functions from $A$ to $B$. Of those you have $3!\cdot \binom{4}{3} = 24$ injective ones (notice that we use the binomial to choose $3$ elements from $B$, and then we count the permutations of $A$ with the factorial to find the possible different assignments). Since $|B|>|A|$, there are no surjective functions $A\rightarrow B$.