Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/thegatebook.in/public_html/qa/qa-include/qa-theme-base.php on line 177

# DM-Sets,Relations and Functions-Q15

Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/thegatebook.in/public_html/qa/qa-include/qa-theme-base.php on line 177

Number of onto functions from set on n elements (n>2) to set of 3 elements?

(A). $3^n-3$

(B). $3^n-3.2^n-3$

(C). $3^n-3.2^n+3$

(D). $3^n-2^n-13$

reshown Jul 6, 2019

This can be done using inclusion and exclusion principles.

Total functions: 3^n

Now, we find the number of functions which are not onto.

Case 1: One element of RHS is not mapped. Every element in LHS will have two choices, hence 2^n, 3 times.

Case 2: Two elements of RHS are not mapped. Every element in LHS will have only one choice. Hence, 1.3

Case 3: Three elements of RHS are not mapped. Zero functions possible.

Hence, answer will be 3^n - 3.2^n + 3
answered Jul 6, 2019 by (5,270 points)
selected Jul 8, 2019
yes nice approach
just take n=3, number of onto functions should be 6.
put 3 in options and check, only C satisfies