Journal Article10.1137/0206055
Generating Binary Trees Lexicographically
Frank Ruskey,T. C. Hu +1 more
151
TL;DR: The necessary and sufficient conditions for a sequence to represent a binary tree are given, and an algorithm for generating all the feasible sequences lexicographically as a list is given.
read more
Abstract: We represent a binary tree by the level numbers of its leaves from left to right Thus every binary tree of n leaves corresponds to a sequence of n numbers We first give the necessary and sufficient conditions for a sequence to represent a binary tree; then we give an algorithm for generating all the feasible sequences lexicographically as a list Also, algorithms are developed to determine the position of a given sequence, or to generate the sequence of a given position Finally, it is shown that the average time per sequence generated is constant (independent of the length of the sequence)
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
A Survey of Combinatorial Gray Codes
TL;DR: The area of combinatorial Gray codes is surveyed, recent results, variations, and trends are described, and some open problems are highlighted.
559
Lexicographic generation of ordered trees
TL;DR: A one-one correspondence between all the regular binary trees with n internal nodes and certain integer sequences, an algorithm for generating these trees lexicographically, and the ranking function and the corresponding unranking procedure is shown.
191
Constant Time Generation of Rooted Trees
TL;DR: An algorithm is presented which generates canonical representations of k-ary trees lexicographically to generating all rooted trees with n vertices in a well-defined order.
133
Constant time generation of free trees
TL;DR: All the nonisomorphic trees of a given size are generated, without repetition, in time proportional to the number of trees.
Enumerations of ordered trees
Nachum Dershowitz,Shmuel Zaks +1 more
TL;DR: Several enumeration problems concerning T"n and some of its combinatorial properties are studied and closed-form expressions for the following enumerations are given.
98
References
Optimal Computer Search Trees and Variable-Length Alphabetical Codes
T. C. Hu,Alan Tucker +1 more
TL;DR: An algorithm is given for constructing an alphabetic binary tree of minimum weighted path length (for short, an optimalAlphabetic tree), where n is the number of terminal nodes in the tree.
336