Abstract

Let $${{\mathcal {T}}}_{d}(n)$$ be the set of d-ary rooted trees with n internal nodes. We give a method to construct a sequence $$( \textbf{t}_{n},n\ge 0)$$ , where, for any $$n\ge 1$$ , $$ \textbf{t}_{n}$$ has the uniform distribution in $${{\mathcal {T}}}_{d}(n)$$ , and $$ \textbf{t}_{n}$$ is constructed from $$ \textbf{t}_{n-1}$$ by the addition of a new node, and a rearrangement of the structure of $$ \textbf{t}_{n-1}$$ . This method is inspired by Rémy’s algorithm which does this job in the binary case, but it is different from it. This provides a method for the random generation of a uniform d-ary tree in $${{\mathcal {T}}}_{d}(n)$$ with a cost linear in n.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call