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 条
  • [21] Ranking and unranking algorithms for loopless generation of t-ary trees
    Ahmadi-Adl, Amin
    Nowzari-Dalini, Abbas
    Ahrabian, Hayedeh
    LOGIC JOURNAL OF THE IGPL, 2011, 19 (01) : 33 - 43
  • [22] Ranking and Unranking t-ary Trees in a Gray-Code Order
    Wu, Ro-Yu
    Chang, Jou-Ming
    Chen, An-Hang
    Liu, Chun-Liang
    COMPUTER JOURNAL, 2013, 56 (11): : 1388 - 1395
  • [23] Ranking and Unranking of Well-formed Parenthesis Strings: A Unified Approach
    Wu, Ro-Yu
    Chang, Jou-Ming
    Chen, An-Hang
    Liu, Chun-Liang
    CHIANG MAI JOURNAL OF SCIENCE, 2012, 39 (04): : 648 - 659
  • [24] Ranking and unranking of non-regular trees with a prescribed branching sequence
    Wu, Ro-Yu
    Chang, Jou-Ming
    Chang, Chir-Ho
    MATHEMATICAL AND COMPUTER MODELLING, 2011, 53 (5-6) : 1331 - 1335
  • [25] Ranking and Unranking of Non-regular Trees in Gray-Code Order
    Wu, Ro-Yu
    Chang, Jou-Ming
    Chen, An-Hang
    Ko, Ming-Tat
    IEICE TRANSACTIONS ON FUNDAMENTALS OF ELECTRONICS COMMUNICATIONS AND COMPUTER SCIENCES, 2013, E96A (06) : 1059 - 1065
  • [26] Gray-Code Ranking and Unranking on Left-Weight Sequences of Binary Trees
    Wu, Ro-Yu
    Chang, Jou-Ming
    Peng, Sheng-Lung
    Liu, Chun-Liang
    IEICE TRANSACTIONS ON FUNDAMENTALS OF ELECTRONICS COMMUNICATIONS AND COMPUTER SCIENCES, 2016, E99A (06): : 1067 - 1074
  • [27] Optimal node ranking of trees in linear time
    Schaffer, Alejandro A., 1600, (33):
  • [28] Optimal Edge Ranking of Trees in Linear Time
    T. W. Lam
    F. L. Yue
    Algorithmica, 2001, 30 : 12 - 33
  • [29] OPTIMAL NODE RANKING OF TREES IN LINEAR TIME
    SCHAFFER, AA
    INFORMATION PROCESSING LETTERS, 1989, 33 (02) : 91 - 96
  • [30] Optimal edge ranking of trees in linear time
    Lam, TW
    Yue, FL
    ALGORITHMICA, 2001, 30 (01) : 12 - 33