Discrete Math question involving mapping $A$ to $B$ and finding out how many functions $f:A\rightarrow B$ are there such that $f(a) = f(b) = f(c)$ Let $A = \{a,b,c,d\}$ and $B = \{2,3,5,7,9\}$. How many functions $f:A\rightarrow B$ are there, such that $f(a) = f(b) = f(c)?$ 
I'm doing some practice questions from my textbook and cannot figure out how to do this question. Any help would be great, thanks.

Hint: Recall how we define a function: for every point in the domain, we choose exactly one point in the codomain. We write this choice as $x\mapsto f(x)$.
So, to determine the number of functions, you can count the number of choices for each element of the domain.

Solution: Since $|B|=5$, we have 5 choices for $f(a)$. There is now exactly one choice for $f(b)$, since by assumption, $f(a)=f(b)$. Similarly, there is one choice for $f(c)$. Finally, there are $5$ choices for $f(d)$. So in total there are $5\cdot 1\cdot 1\cdot 5=25$ different functions $f:A\rightarrow B$ with the property that $f(a)=f(b)=f(c)$.
