If $A = \{1,2,3,4,...,n\}$ and $B = \{x, y\}$, then the number of surjections from A to B is |
$2^n-1$ $2^n-2$ ${^nP}_2$ $n!$ |
$2^n-2$ |
The correct answer is Option (2) → $2^n-2$ Given: $A = \{1,2,3,4,\ldots,n\},\quad B = \{x, y\}$ Number of functions from $A$ to $B = 2^n$ Number of non-surjective functions = functions mapping all $n$ elements to only $x$ or only $y$ = $2$ Number of surjections = $2^n - 2$ |