# A linear Time Algorithm for the Generation of Trees

Abstract : We present a linear algorithm which generates randomly and with uniform probability many kinds of trees: binary trees, ternary trees, arbitrary trees, forests of $p$ $k$-ary trees, $\ldots$. The algorithm is based on the definition of generic trees which can be coded as words. These words, in turn, are generated in linear time.
Keywords :
Document type :
Reports
Domain :

https://hal.inria.fr/inria-00073765
Contributor : Rapport de Recherche Inria <>
Submitted on : Wednesday, May 24, 2006 - 1:42:41 PM
Last modification on : Thursday, February 11, 2021 - 2:48:31 PM
Long-term archiving on: : Sunday, April 4, 2010 - 11:57:34 PM

### Identifiers

• HAL Id : inria-00073765, version 1

### Citation

Laurent Alonso, Jean-Luc Rémy, René Schott. A linear Time Algorithm for the Generation of Trees. [Research Report] RR-2934, INRIA. 1996. ⟨inria-00073765⟩

Record views