Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
What is the easiest way to count the number of opposite order in permutation.
meaning the total of elements in the permutation where $i<j$ and $\sigma_i>\sigma_j$
For example, $3142$, we have $31, 32, 42,$ so $OO(3142)=3$.
Required, but never shown
4 years, 3 months ago