If $A = \{1, 2, 3, \dots, n\}$ and $B = \{a, b\}$. Then, the number of surjections from $A$ into $B$ is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → $2^n - 2$ ##
Given that, $A = \{1, 2, 3, \dots, n\}$ and $B = \{a, b\}$.
Total number of functions from $A$ to $B = 2^n$
and number of elements in set $B = 2$
Then, total number of onto (surjections) functions from $A$ into $B = 2^n - 2$