Let $A$ be a set of size $m$, let $B$ be a set of size $n$, and assume that $n \geq m \geq 1$. How many functions $f : A \rightarrow B$ are there that are ${not}$ one-to-one? Justify your answer.
Asked
Active
Viewed 83 times
2 Answers
1
Hint: There are $n^m$ functions from $A$ to $B$. Now let us count the one-to-one functions. Let $A=\{a_1,a_2,\dots,a_m\}$.
To make a one-to-one function $f$, $f(a_1)$ can be chosen in $n$ ways. For each such choice, $f(a_2)$ can be chosen in $n-1$ ways. And so on.
André Nicolas
- 507,029