An Efficient Scheme for the Generation of Ordered Trees in Constant Amortized Time

by   Victor Parque, et al.

Trees are useful entities allowing to model data structures and hierarchical relationships in networked decision systems ubiquitously. An ordered tree is a rooted tree where the order of the subtrees (children) of a node is significant. In combinatorial optimization, generating ordered trees is relevant to evaluate candidate combinatorial objects. In this paper, we present an algebraic scheme to generate ordered trees with n vertices with utmost efficiency; whereby our approach uses 𝒪(n) space and 𝒪(1) time in average per tree. Our computational studies have shown the feasibility and efficiency to generate ordered trees in constant time in average, in about one tenth of a millisecond per ordered tree. Due to the 1-1 bijective nature to other combinatorial classes, our approach is favorable to study the generation of binary trees with n external nodes, trees with n nodes, legal sequences of n pairs of parentheses, triangulated n-gons, gambler's sequences and lattice paths. We believe our scheme may find its use in devising algorithms for planning and combinatorial optimization involving Catalan numbers.


page 1

page 2

page 3

page 4


A Gray Code of Ordered Trees

A combinatorial Gray code for a set of combinatorial objects is a sequen...

On recursively defined combinatorial classes and labelled trees

We define and prove isomorphisms between three combinatorial classes inv...

Generation Matrix: An Embeddable Matrix Representation for Hierarchical Trees

Starting from the local structures to study hierarchical trees is a comm...

Combinatorial and computational investigations of Neighbor-Joining bias

The Neighbor-Joining algorithm is a popular distance-based phylogenetic ...

Growth of Random Trees by Leaf Attachment

We study the growth of a time-ordered rooted tree by probabilistic attac...

Nonleaf Patterns in Trees: Protected Nodes and Fine Numbers

A closed-form formula is derived for the number of occurrences of matche...

Tuning as convex optimisation: a polynomial tuner for multi-parametric combinatorial samplers

Combinatorial samplers are algorithmic schemes devised for the approxima...