Mathematics (JEE)ModerateGATE CS

How many functions f from {1, 2, 3, 4, 5} to itself satisfy f(f(x)) = f(x) for every x?

  1. A. 196
  2. B. 26
  3. C. 52
  4. D. 3125

Correct answer: A. 196

An idempotent map is fixed on its image set S of size k, which can be chosen in C(5,k) ways, and each of the other 5 - k points maps into S in k ways: sum over k of C(5,k) * k^(5-k) = 5 + 80 + 90 + 20 + 1 = 196.

More Permutations, Combinations and Probability questions

Exams that ask this topic