A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. In a permutation a1.....an of n distinct integers, an inversion is a pair (ai, aj) such that i < j and ai > aj. If all permutations are equally likely, what is the expected number of inversions in a randomly chosen permutation of 1.....n ?
a. n(n - 1)/2
b. n(n - 1)/4
c. n(n + 1)/4
d. 2n[log2 n]
Answer:n(n - 1)/4
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: