Abstract—A non-regular tree T with a prescribed branching sequence is an ordered tree whose internal nodes are numbered from 1 to n in preorder such that every node in T has a prescribed number of children. Recently, Wu et al. (2010) introduced a concise representation called RD-sequences to represent all non-regular trees and proposed a loopless algorithm for generating all non-regular trees in a Gray-code order. In this paper, based on such a Gray-code order, we show that a ranking algorithm can be done in quadratic time provided a preprocessing in advance.
Index Terms—Loopless algorithms, ranking algorithms, lexico-graphic order, gray-code order; non-regular trees.
Ro-Yu Wu is with the Department of Industrial Management, Lunghwa University of Science and Technology, Taoyuan, Taiwan. (e-mail:email@example.com)
Jou-Ming Chang and An-Hang Chen are with the Institute of Information and Decision Sciences, National Taipei College of Business, Taipei, Taiwan. (e-mail: firstname.lastname@example.org; email@example.com)
Cite: Ro–Yu Wu, Jou–Ming Chang, and An–Hang Chen, "A Ranking Algorithm of Non-Regular Trees in Gray-Code Order," International Journal of Machine Learning and Computing vol. 2, no. 6, pp. 767-770, 2012.