Solveeit Logo

Question

Quantitative Aptitude Question on Set Theory

Consider two sets A = {2, 3, 5, 7, 11, 13} and B = {1, 8, 27}. Let f be a function from A to B such that for every element b in B, there is at least one element a in A such that f(a) = b. Then, the total number of such functions f is

A

537

B

540

C

667

D

665

Answer

540

Explanation

Solution

Each element of set BB must be mapped to at least one element of set AA, and we need to count how many such functions are possible.

We have 6 elements in set AA and 3 elements in set BB. The condition is that each element in BB must have at least one pre-image in AA, so we are looking for surjections (onto functions).

The total number of surjections from a set of size 6 to a set of size 3 can be calculated using the inclusion-exclusion principle.

The number of surjections from a set of size 6 to a set of size 3 is given by:

36(31)26+(32)16=729192+3=5403^6 - \binom{3}{1} 2^6 + \binom{3}{2} 1^6 = 729 - 192 + 3 = 540

Thus, the total number of such functions is 540.