Mathematics (JEE)HardGATE CS · ISI

A random permutation of 1, 2, 3, 4, 5 is chosen uniformly. An inversion is a pair of positions i < j with the value at position i larger than the value at position j. What is the expected number of inversions?

  1. A. 5/2
  2. B. 5
  3. C. 10
  4. D. 25/4

Correct answer: B. 5

There are C(5,2) = 10 pairs of positions. For each pair, the two values are equally likely to be in either order, so each pair is an inversion with probability 1/2. Hence E = 10/2 = 5.

More Permutations, Combinations and Probability questions

Exams that ask this topic