[Math] This question concerns functions $f:\{A,B,C,D,E\}\rightarrow\{1,2,3,4,5,6,7\}$ (counting)

combinatoricsfunctions

Can someone guide me towards a way to count surjective functions of the below question?

This question concerns functions $f:\{A,B,C,D,E\}\rightarrow\{1,2,3,4,5,6,7\}$. How many such functions are there? How many are injective? Surjective? Bijective?

My answers with logic behind them:

There are a total of $7^5$ functions since each $f(k)$ where $k\in\{A,B,C,D,E\}$ may map to $7$ elements in the set $\{1,2,3,4,5,6,7\}$.

The number of injective functions is $7\cdot6\cdot5\cdot4\cdot3$ since once we select an element to map to we may not map to it again since injectivity means that if $x\neq y\Rightarrow f(x)\neq f(y)$.

Not sure on surjective count…

Best Answer

Let $F=\{A,B,C,D,E\}$

and $G=\{1,2,3,4,5,6,7\}$

we have

$card(F)<card(G)$, so there is neither surjective nor bijective function from $F$ to $G$.

to construct an injective one,

for $A$ we have $7$ possibilities.

for $B$ we will have $6$ choices

and so on till $E$ for which we will

have $3$.

finally there will be

$7\times6\times5\times4\times3=$

$2520$ injections from $F$ to $G$.

Related Question