Gray-Code Ranking and Unranking on Left-Weight Sequences of Binary Trees

被引:1
|
作者
Wu, Ro-Yu [1 ]
Chang, Jou-Ming [2 ]
Peng, Sheng-Lung [3 ]
Liu, Chun-Liang [4 ]
机构
[1] Lunghwa Univ Sci & Technol, Dept Ind Management, Taoyuan, Taiwan
[2] Natl Taipei Univ Business, Inst Informat & Decis Sci, Taipei 10051, Taiwan
[3] Natl Dong Hwa Univ, Dept Comp Sci & Informat Engn, Hualien, Taiwan
[4] Natl Taiwan Normal Univ, Dept Humanity & Social Sci, Taipei, Taiwan
关键词
ranking algorithms; unranking algorithms; Gray-code order; left-weight sequences; left-distance sequence; K-ARY TREES; LOOPLESS GENERATION; NONREGULAR TREES; ROTATIONS; ALGORITHM; ORDER;
D O I
10.1587/transfun.E99.A.1067
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Left-weight sequences (LW-sequences for short) are in common currency for encoding binary trees. In [16], Wu et al. proposed an algorithm associated with tree rotations for listing all binary trees in diverse representations including LW-sequences. In particular, such a list of LW-sequences is generated in Gray-code order. In this paper, based on this ordering, we present efficient ranking and unranking algorithms. For binary trees with n internal nodes, the time complexity and the space requirement in each of our ranking and unranking algorithms are O(n(2)) and O(n), respectively.
引用
收藏
页码:1067 / 1074
页数:8
相关论文
共 13 条
  • [1] Ranking Left-weight Sequences of Binary Trees in Gray-code Order
    Wu, Ro-Yu
    Chang, Jou-Ming
    Peng, Sheng-Lung
    Chang, Shun-Chieh
    2015 INTERNATIONAL COMPUTER SCIENCE AND ENGINEERING CONFERENCE (ICSEC), 2015, : 100 - 105
  • [2] 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
  • [3] 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
  • [4] ENUMERATING, RANKING AND UNRANKING BINARY-TREES
    PALLO, JM
    COMPUTER JOURNAL, 1986, 29 (02): : 171 - 175
  • [5] Gray-Code/Binary Transformation through Software.
    Wehlan, H.
    Regelungstechnik RT, 1980, 28 (02): : 61 - 63
  • [6] Loopless Algorithms for Listing Zaks' Sequences in Gray-Code Order
    Wu, Ro-Yu
    Hsu, Cheng-Hsien
    Chang, Jou-Ming
    JOURNAL OF INTERNET TECHNOLOGY, 2014, 15 (04): : 679 - 684
  • [7] A loopless Gray-code algorithm for listing k-ary trees
    van Baronaigien, DR
    JOURNAL OF ALGORITHMS, 2000, 35 (01) : 100 - 107
  • [8] 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
  • [9] Quaternary gray-code phase unwrapping for binary fringe projection profilometry
    He, Xiaoyu
    Zheng, Dongliang
    Kemao, Qian
    Christopoulos, George
    OPTICS AND LASERS IN ENGINEERING, 2019, 121 : 358 - 368
  • [10] 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