Linear-time ranking of permutations

  • Authors:
  • Martin Mareš;Milan Straka

  • Affiliations:
  • Department of Applied Mathematics and Institute of Theoretical Computer Science, Charles University, Praha, Czech Republic;Department of Applied Mathematics and Institute of Theoretical Computer Science, Charles University, Praha, Czech Republic

  • Venue:
  • ESA'07 Proceedings of the 15th annual European conference on Algorithms
  • Year:
  • 2007

Quantified Score

Hi-index 0.12

Visualization

Abstract

A lexicographic ranking function for the set of all permutations of n ordered symbols translates permutations to their ranks in the lexicographic order of all permutations. This is frequently used for indexing data structures by permutations. We present algorithms for computing both the ranking function and its inverse using O(n) arithmetic operations.