Hostname: page-component-6766d58669-7cz98 Total loading time: 0 Render date: 2026-05-14T09:58:51.486Z Has data issue: false hasContentIssue false

An algorithm for uniform generation of unlabeled (Pólya) trees

Published online by Cambridge University Press:  14 May 2026

Laurent Bartholdi*
Affiliation:
Section de Mathématiques, Université de Genève, Switzerland and Institut Camille Jordan, Université Claude Bernard Lyon, France
Persi Diaconis
Affiliation:
Department of Mathematics, Stanford University , USA
*
E-mail: laurent.bartholdi@gmail.com (Corresponding author)

Abstract

Pólya trees are unlabeled rooted trees on n vertices. This paper gives a new way to generate Pólya trees, that conjecturally is very efficient. This allows comparing typical unlabeled and labeled tree statistics and comparing asymptotic theorems with “reality.”

Our method is an application of the Burnside process, alternating two steps: from a labeled rooted tree, produce a uniform permutation fixing it; and from a permutation, produce a uniform labeled rooted tree fixed by it. This last step is linked to a product formula, refining Cayley’s, for the number of rooted labeled trees preserved by a given permutation.

Information

Type
Probability
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1 The $16$ labeled rooted trees at $1$, for $n=4$. Here and below the root vertex is indicated as solid, and nonroot vertices are hollow. There are $64$ labeled rooted trees, obtained by selecting any of the four vertices as root.

Figure 1

Figure 2 The $4$ unlabeled rooted trees, for $n=4$.

Figure 2

Figure 3 The distributions of degree-n vertices in a random Pólya tree, for $n=1,\dots ,8$.