Mathematics (JEE)ModerateCodeforces Div2 D

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

  1. A. 720
  2. B. 203
  3. C. 76
  4. D. 52

Correct answer: C. 76

Such a function is a set of fixed points and 2-cycles, counted by I(n) = I(n-1) + (n-1) I(n-2) with I(0)=I(1)=1: I(2)=2, I(3)=4, I(4)=10, I(5)=26, I(6)=76.

More Permutations, Combinations and Probability questions

Exams that ask this topic