Mathematics (JEE)HardGATE CS

How many permutations of {1, 2, 3, 4, 5} have exactly 2 inversions (pairs i < j with p(i) > p(j))?

  1. A. 10
  2. B. 8
  3. C. 15
  4. D. 9

Correct answer: D. 9

The Mahonian numbers for n = 5 are 1, 4, 9, 15, 20, 22, 20, 15, 9, 4, 1 by inversion count, so exactly 2 inversions occur for 9 permutations.

More Permutations, Combinations and Probability questions

Exams that ask this topic