Abstract
Enumeration of rooted trees is a major area of research in computer science and mathematics. Rooted ordered trees are used to solve combinatorial optimization problems, analyze the structure of chemical compounds, and many others. Several researchers from different continents have given different algorithms for generating rooted ordered trees. Different encodings have been used to represent the rooted ordered trees by these researchers. We have introduced the children sequence to represent each rooted ordered tree. In this paper, our proposed algorithm, All-Ordered-Trees, uses an efficient algebraic approach to generate all the children sequences (representing rooted ordered trees) in lexicographic order for a given number of vertices, n. With slight modification, this algorithm can also be used to generate degree-bound rooted ordered trees. We have also implemented three existing algorithms in this domain and included the experimental results of these algorithms with the experimental results of our proposed algorithm for comparative study. From the experimental results, we observe that each tree can be generated in approximately constant time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Amani M, Nowzari A (2016) Generation, ranking and unranking of ordered trees with degree bounds. Electron Proc Theor Comput Sci 204:31–45. https://doi.org/10.4204/EPTCS.204.4
Aringhieri R, Hansen P, Malucelli F (2003) Chemical trees enumeration algorithms. Q J Belg Fr Ital Oper Res Soc 1(1):67–83. https://doi.org/10.1007/s10288-002-0008-9
Beyer T, Hedetniemi SM (1980) Constant time generation of rooted trees. SIAM J Comput 9:706–712. https://doi.org/10.1137/0209055
Brown P, Fenner T (2020) Fast generation of unlabelled free trees using weight sequences. J Graph Algorithm Appl 25(2):219–240
Cattell K, Ruskey F, Sawada J, Serra M, Miers CR (2000) Fast algorithms to generate necklaces, unlabeled necklaces and irreducible polynomials over GF (2). J Algorithms 37:267–282. https://doi.org/10.1006/jagm.2000.1108
Chakraborty S, Chakraborty M, Pal RK (2022) Generation of all rooted trees up to a given height. Innovations in systems and software engineering, S.I.: coupling data and software engineering towards smart systems. https://doi.org/10.1007/s11334-022-00467-1
Chakraborty M, Chowdhury S, Chakraborty J, Mehera R, Pal RK (2019) Algorithms for generating all possible spanning trees of a simple undirected connected graph: an extensive review. Complex Intell Syst 5:265–281. https://doi.org/10.1007/s40747-018-0079-7
Chakraborty M, Mehera R, Pal RK (2022) Divide-and-conquer based all possible spanning tree generation algorithm of a simple connected graph. Theoret Comput Sci 900:35–52. https://doi.org/10.1016/j.tcs.2021.11.018
Deo N (2005) Graph theory with applications to engineering and computer science. Prentice Hall of India Pvt. Ltd., New Delhi
Fujiwara H, Wang J, Zhao L, Nagamochi H, Akutsu T (2008) Enumerating treelike chemical graphs with given path frequency. J Chem Inf Model 48(7):1345–1357. https://doi.org/10.1021/ci700385a
Horowitz E, Sahni S, Rajasekaran S (2009) Fundamentals of computer algorithms, 2nd edn. University Press
Knuth DE (1972) The art of computer programming: fundamental algorithms, vol 1. Addison-Wesley
Li G, Ruskey F (1999) The advantages of forward thinking in generating rooted and free trees. In: 10th Annual ACM-SIAM symposium on discrete algorithms (SODA). Society for Industrial and Applied Mathematics, USA, pp 939–940
Nakano S (2002) Efficient generation of plane trees. Inf Process Lett 84:167–172. https://doi.org/10.1016/S0020-0190(02)00240-5
Nakano S, Uno T (2003) Efficient generation of rooted trees. NII technical report
Parque V, Miyashita T (2021) An efficient scheme for the generation of ordered trees in constant amortized time. In: 15th International conference on ubiquitous information management and communication (IMCOM)
Ruskey F (1978) Generating t-ary trees lexicographically. SIAM J Comput 7(4):424–439. https://doi.org/10.1137/0207034
Ruskey F, Hu TC (1977) Generating binary trees lexicographically. SIAM J Comput 6(4):745–758. https://doi.org/10.1137/0206055
Sawada J (2006) Generating rooted and free plane trees. ACM Trans Algorithms 2(1):1–13. https://doi.org/10.1145/1125994.1125995
Scoins H (1968) Placing trees in lexicographic order. Mach Intell 3:43–60
Skarbek W (1988) Generating ordered trees. Theoret Comput Sci 57:153–159. https://doi.org/10.1016/0304-3975(88)90169-7
Yamanakaa K, Otachi Y, Nakano S (2012) Efficient enumeration of ordered trees with k leaves. Theoret Comput Sci 442:22–27. https://doi.org/10.1016/j.tcs.2011.01.017
Zaks S (1980) Lexicographic generation of ordered trees. Theoret Comput Sci 10:63–82. https://doi.org/10.1016/0304-3975(80)90073-0
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Chakraborty, S., Bhattacharyya, R., Chakraborty, M., Pal, R.K. (2023). Generation of All Rooted Ordered Trees. In: Chaki, R., Chaki, N., Cortesi, A., Saeed, K. (eds) Applied Computing for Software and Smart Systems. ACSS 2023. Lecture Notes in Networks and Systems, vol 781. Springer, Singapore. https://doi.org/10.1007/978-981-99-7783-3_1
Download citation
DOI: https://doi.org/10.1007/978-981-99-7783-3_1
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-7782-6
Online ISBN: 978-981-99-7783-3
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)