CAT 2024 Slot 1 — QA Question 20
Basics (Functions)Easy
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 function f is
Answer & solution
- A
667
540
- C
665
- D
537
Solution
Hard
The condition "every in is hit by some " means is onto (surjective). Count surjections from a -element set onto a -element set using inclusion–exclusion: total minus those that miss at least one target.
1
Total functions. Each of the elements of maps to any of the elements of .
2
Inclusion–exclusion for onto. Subtract functions missing at least one element of .
3
Evaluate.
Surjections onto targets where is a Stirling number: .