Ranking and unranking permutations in linear time

被引:53
|
作者
Myrvold, W [1 ]
Ruskey, F [1 ]
机构
[1] Univ Victoria, Dept Comp Sci, Victoria, BC V8W 3P6, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
permutation; ranking; unranking; algorithms; combinatorial problems;
D O I
10.1016/S0020-0190(01)00141-7
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
A ranking function for the permutations on n symbols assigns a unique integer in the range [0, n! - 1] to each of the n! permutations. The corresponding unranking function is the inverse: given an integer between 0 and n! - 1, the value of the function is the permutation having this rank. We present simple ranking and unranking algorithms for permutations that can be computed using 0(n) arithmetic operations. (C) 2001 Elsevier Science B.V. All rights reserved.
引用
收藏
页码:281 / 284
页数:4
相关论文
共 50 条
  • [31] Sorting Signed Permutations by Reversals in Nearly-Linear Time
    Dudek, Bartiomiej
    Gawrychowski, Pawel
    Starikovskaya, Tatiana
    2024 SYMPOSIUM ON SIMPLICITY IN ALGORITHMS, SOSA, 2024, : 199 - 214
  • [32] Improved algorithms for ranking and unranking (k, m)-ary trees in B-order
    Yu-Hsuan Chang
    Ro-Yu Wu
    Ruay-Shiung Chang
    Jou-Ming Chang
    Journal of Combinatorial Optimization, 2022, 44 : 1495 - 1510
  • [33] Efficient Generation, Ranking, and Unranking of (k, m)-Ary Trees in B-Order
    M. Amani
    A. Nowzari-Dalini
    Bulletin of the Iranian Mathematical Society, 2019, 45 : 1145 - 1158
  • [34] Ranking and Unranking of t-Ary Trees Using RD-Sequences
    Wu, Ro-Yu
    Chang, Jou-Ming
    Wang, Yue-Li
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2011, E94D (02): : 226 - 232
  • [35] Efficient Generation, Ranking, and Unranking of (k, m)-Ary Trees in B-Order
    Amani, M.
    Nowzari-Dalini, A.
    BULLETIN OF THE IRANIAN MATHEMATICAL SOCIETY, 2019, 45 (04) : 1145 - 1158
  • [36] Improved algorithms for ranking and unranking (k, m)-ary trees in B-order
    Chang, Yu-Hsuan
    Wu, Ro-Yu
    Chang, Ruay-Shiung
    Chang, Jou-ming
    JOURNAL OF COMBINATORIAL OPTIMIZATION, 2022, 44 (03) : 1495 - 1510
  • [37] Amortized efficiency of generation, ranking and unranking left-child sequences in lexicographic order
    Pai, Kung-Jui
    Chang, Jou-Ming
    Wu, Ro-Yu
    Chang, Shun-Chieh
    DISCRETE APPLIED MATHEMATICS, 2019, 268 : 223 - 236
  • [38] Generating Spanning-Tree Sequences of a Fan Graph in Lexicographic Order and Ranking/Unranking Algorithms
    Wu, Ro-Yu
    Tseng, Cheng-Chia
    Hung, Ling-Ju
    Chang, Jou-Ming
    COMBINATORIAL OPTIMIZATION (ISCO 2022), 2022, 13526 : 201 - 211
  • [39] Generalised linear orthomorphic permutations
    Han H.
    Zhu S.
    Dai Y.
    Mao Q.
    Li Q.
    Shi K.
    International Journal of Reasoning-based Intelligent Systems, 2021, 13 (03) : 115 - 122
  • [40] Permutations via linear translators
    Cepak, Nastja
    Charpin, Pascale
    Pasalic, Enes
    FINITE FIELDS AND THEIR APPLICATIONS, 2017, 45 : 19 - 42