In the second chapter of Cormen's textbook on Algorithms, he lists a discrete mathematics exercise on so-called inversions, defined as follows:Let $A[1 \ldots n]$ be an array of $n$ distinct numbers. If $i < j$ and $A[i] > A[j]$, then the pair $(i, j)$ is called an inversion of $A$.Question: Is this a mathematical concept that is used frequently in computer science? Are there some widely known applications of inversions that other people here know of? (I checked the wikipedia page for the concept, but it didn't list any).
Why are inversions useful in computer science?
discrete mathematics