The total number of onto functions from the set {1, 2, 3, 4} to the set {3, 4, 7} is
Answer & explanation
Correct answer: option 2
If A and B are two sets consisting of m and n elements respectively such that $1 ≤ n ≤ m$, then number of onto functions from A to B is
$\sum\limits_{r=1}^3(-1)^{n-r}{^nC}_rr^m$
Here, m = 4 and n = 3.
So, total number of onto functions
$=\sum\limits_{r=1}^3(-1)^{3-r}{^3C}_rr^4$
$={^3C}_1 - {^3C}_2 × 2^4 + {^3C}_3 × 3^4 = 3-48 + 81 = 36$