CAT 2024 Slot 1 - Quant
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 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
540
Set A = {2, 3, 5, 7, 11, 13} so |A|= 6
Set B = {1, 8, 27} so |B|= 3
Without any restrictions, each element in A can map to any of the 3 elements in B. Thus, the total number of functions is: 36 = 729
Excluding Functions That Miss One Element in B: If a function does not map to an element in B, there are 2 elements in B left for mapping. The total number of such functions (for each specific element not mapped) is: 26 = 64
Since there are 3 elements in B, the total number of such functions is: 3 × 64 = 192
Adding Back Functions That Miss Two Elements in B: If a function misses two elements in B, there is only 1 element left for mapping. The total number of such functions is: 16 = 1
Since there are 3C2 ways to choose which two elements are missed, the total number of such functions is: 3
Using the inclusion-exclusion principle, the number of functions where all elements of B are mapped by at least one element of A is:
729 – 192 + 3 = 540



is











