Mathematics (JEE)Very hardGATE CS

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

  1. A. 120
  2. B. 32
  3. C. 52
  4. D. 26

Correct answer: D. 26

Such functions are involutions: they pair up some elements and fix the rest. Counting by the number of 2-cycles k (0, 1 or 2): 1 + 10 + 15 = 26.

More Permutations, Combinations and Probability questions

Exams that ask this topic