Question:
Mark the correct alternative in the following question:
Let $A=\{1,2, \ldots, n\}$ and $B=\{a, b\}$. Then the number of subjections from $A$ into $B$ is
(a) ${ }^{n} P_{2}$
(b) $2^{n}-2$
(c) $2^{n}-1$
(d) ${ }^{n} \mathrm{C}_{2}$
Solution:
As, the number of surjections from $A$ to $B$ is equal to the number of functions from $A$ to $B$ minus the number of functions from $A$ to $B$ whose images are proper subsets of $B$.
And, the number of functions from a set with $n$ number of elements into a set with $m$ number of elements $=m^{n}$
So, the number of subjections from $A$ into $B$ where $A=\{1,2, \ldots, n\}$ and $B=\{a, b\}$ is $2^{n}-2$.
(As, two functions can be many-one into functions)
Hence, the correct alternative is option (b).