Combinatorica`
Combinatorica`
ToInversionVector
ToInversionVector[p]
gives the inversion vector associated with permutation .
Details and Options
- To use ToInversionVector, you first need to load the Combinatorica Package using Needs["Combinatorica`"].