Mathematics (JEE)Very hardCodeforces Div2 D

How many permutations of {1, 2, 3, 4, 5, 6} have every cycle of length at least 3 (so no fixed point and no 2-cycle)?

  1. A. 265
  2. B. 160
  3. C. 120
  4. D. 40

Correct answer: B. 160

The cycle types are a single 6-cycle, giving 5! = 120, or two 3-cycles, giving 6!/(3^2 * 2!) = 40, so the total is 120 + 40 = 160.

More Permutations, Combinations and Probability questions

Exams that ask this topic