CAT 2024 Slot 1 · Quant · Question 7

CAT 2024 Slot 1 previous year question on Permutation and Combination, with the answer and a step-by-step solution.

Permutation and CombinationModern MathsMultiple choiceMedium
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\left( a \right)=b. Then, the total number of such functions f is
  1. A
    540
  2. B
    537
  3. C
    665
  4. D
    667
Pick an option, then check.
Answer & solution

Answer: Option A

The condition says every element of B is hit, so we are counting onto functions from a 6-element set to a 3-element set.

Without any condition, each of the 6 elements of A has 3 choices, giving {3}^{6}=729 functions.

Subtract those that miss at least one element of B, using inclusion and exclusion.

Functions missing a chosen one of the three targets use only 2 values: {2}^{6}=64 each, and there are 3 such choices, giving 3\times 64=192.

Those using only a single value have been subtracted twice, so add them back: there are 3 such functions.

The count is 729-192+3=540.

Shortcut. The standard formula for onto functions from m elements to n is \sum_{i=0}^{n}{{\left( -1 \right)}^{i}}\left( \genfrac{}{}{0pt}{}{n}{i}\right){\left( n-i \right)}^{m}. With m=6 and n=3 it reads 729-192+3 straight off, with no case analysis.

More Permutation and Combination questions

All Permutation and Combination PYQs →

Take this paper as a timed test
Real exam timing, instant score, rank and topic-wise analysis.

Practice timed →