Find the number of all onto functions from the set {1, 2, 3, … , n) to itself.
Onto functions from the set {1, 2, 3, … ,n} to itself is simply a permutation on n symbols 1, 2, …, n.
Thus, the total number of onto maps from {1, 2, … , n} to itself is the same as the total number of permutations on n symbols 1, 2, …, n, which is n!.