Combinatorica`
Combinatorica`
RankPermutation
RankPermutation[p]
gives the rank of permutation p in lexicographic order.
Details and Options
- To use RankPermutation, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
RankPermutation[p]
gives the rank of permutation p in lexicographic order.