Consider functions from a set with $5$ elements to a set with $3$ elements.
(a) How many functions are there?
(b) How many are one-to-one?
(c) How many are onto?
a) Each element mapped to $3$ images.
$3 \cdot 3 \cdot 3 \cdot 3 \cdot 3$
b) $0$
c) How do I do this?
Edit: I tried doing this way.
EDIT: There can be a set of cardinality {3,1,1} or {2,2,1}.
For {3,1,1}: 5C3 * 2C1 * 1C1 * 3!
For {2,2,1}: 5C2 * 3C2 * 1C1 * 3!
And i realized my 3! is wrong. Should be * 3 only. Why is that so?