Thank you for reporting, we will resolve it shortly
Q.
If $P=\left\{1,2 , 3,4 , 5\right\}$ and $Q=\left\{a , b , c\right\}$ , then the number of onto functions from $P$ to $Q$ is
NTA AbhyasNTA Abhyas 2020
Solution:
Total number of functions $=3^{5}$
(since each of $1,2,3,4$ or $5$ can correspond to any of $a,b$ or $c$ )
The number of functions that corresponds to only one element of $B$ is $^{3}C_{1}\times 1^{5}$ and the number of functions that correspond to atmost two elements of $B$ is $^{3}C_{2}\times 2^{5}.$
Total number of onto functions $=3^{5}-^{3}C_{2}\times 2^{5}+^{3}C_{1}\times 1^{5}=243-96+3=150$
$\left(^{3} C_{1} \times 1^{5} \, i s \, r e p e a t e d \, t w i c e \, i n \left( \, \right)^{3} C_{2} \times 2^{5}\right)$