Publication | Closed Access
Generating Binary Trees Lexicographically
137
Citations
2
References
1977
Year
EngineeringComputational ComplexityBinary TreeCorpus LinguisticsNatural Language ProcessingCombinatorics On WordFeasible SequencesComputational LinguisticsTree AutomatonDiscrete MathematicsLanguage StudiesCombinatorial OptimizationTree LanguageEnumerative CombinatoricsComputer ScienceGraph TheoryCombinatory AnalysisBinary Trees LexicographicallyLevel NumbersLinguistics
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).
| Year | Citations | |
|---|---|---|
Page 1
Page 1