Number of Onto Functions

CAT 2024 Slot 1 · QA · Medium · Functions and Relations

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

  1. A.

    540

  2. B.

    537

  3. C.

    665

  4. D.

    667

Answer

A

Explanation

Number of elements in domain A=6|A| = 6 and codomain B=3|B| = 3. The condition states that ff is an onto (surjective) function. Using the principle of inclusion-exclusion, the number of onto functions is: 36(31)26+(32)16=7293(64)+3(1)=729192+3=5403^6 - \binom{3}{1}2^6 + \binom{3}{2}1^6 = 729 - 3(64) + 3(1) = 729 - 192 + 3 = 540

Practise this under exam conditions

Sign in to solve it with a live timer, the on-screen CAT calculator, and streak and accuracy tracking across every question you attempt.

Solve in the workspace