Growing random uniform d-ary trees

Let Td(n) be the set of d-ary rooted trees with n internal nodes. We give a method to construct a sequence (tn, n ≥ 0) where, for any n ≥ 1, tn has the uniform distribution in Td(n), and tn is constructed from tn−1 by the addition of a new node, and a rearrangement of the structure of tn−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 Td(n) with a cost linear in n.