Placement AptitudeHardCAT · Goldman Sachs OA

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

  1. A. 26
  2. B. 11
  3. C. 25
  4. D. 31

Correct answer: A. 26

Such an f is a permutation made of fixed points and swaps: no swap (1), one swap (C(5, 2) = 10), or two swaps (C(5, 2) × C(3, 2)/2 = 15). Total 26. Stopping at one swap gives 11.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic