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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Critani, F., Dall’Aglio, M., Di Biase, G.: Ranking and unranking permutations with applications. In: Innovation in Mathematics. In: Proceedings of Second International Mathematica Symposium, pp. 99–106 (1997)
Ruskey, F., Jiang, M., Weston, A.: The Hamiltonicity of directed-Cayley graphs (or: A tale of backtracking). Discrete Appl. Math. 57, 75–83 (1995)
Ruskey, F., Savage, C.: Hamilton Cycles that Extend Transposition Matchings in Cayley Graphs of Sn. SIAM Journal on Discrete Mathematics 6(1), 152–166 (1993)
Slocum, J., Sonneveld, D.: The 15 Puzzle Book. The Slocum Puzzle Foundation, Beverly Hills, CA, USA (2006)
Liebehenschel, J.: Ranking and Unranking of Lexicographically Ordered Words: An Average-Case Analysis. Journal of Automata, Languages and Combinatorics 2(4), 227–268 (1997)
Reingold, E.: Combinatorial Algorithms: Theory and Practice. Prentice Hall College Div., Englewood Cliffs (1977)
Knuth, D.: The Art of Computer Programming, Sorting and Searching, vol. 3. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA (1998)
Myrvold, W., Ruskey, F.: Ranking and unranking permutations in linear time. Information Processing Letters 79(6), 281–284 (2001)
Dietz, P.F.: Optimal algorithms for list indexing and subset rank. In: Dehne, F., Santoro, N., Sack, J.-R. (eds.) WADS 1989. LNCS, vol. 382, pp. 39–46. Springer, Heidelberg (1989)
Fredman, M., Willard, D.: Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences 47(3), 424–436 (1993)
Fredman, M., Willard, D.: Trans-dichotomous algorithms for minimum spanning trees and shortest paths. Journal of Computer and System Sciences 48(3), 533–551 (1994)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mareš, M., Straka, M. (2007). Linear-Time Ranking of Permutations. In: Arge, L., Hoffmann, M., Welzl, E. (eds) Algorithms – ESA 2007. ESA 2007. Lecture Notes in Computer Science, vol 4698. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75520-3_18
Download citation
DOI: https://doi.org/10.1007/978-3-540-75520-3_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-75519-7
Online ISBN: 978-3-540-75520-3
eBook Packages: Computer ScienceComputer Science (R0)