Mathematics (JEE)HardGATE CS

How many functions from {1, 2, 3, 4, 5} to {1, 2, 3, 4, 5} have a range (set of values taken) of size exactly 3?

  1. A. 150
  2. B. 750
  3. C. 1500
  4. D. 3125

Correct answer: C. 1500

Choose the 3 values in the range in C(5,3) = 10 ways, then count surjections from 5 points onto those 3 values: 3^5 - 3*2^5 + 3 = 150, so 10 * 150 = 1500.

More Permutations, Combinations and Probability questions

Exams that ask this topic