Linear time sampling of P\'olya trees
Pith reviewed 2026-06-26 07:37 UTC · model grok-4.3
The pith
An algorithm samples uniformly random Pólya trees of exact size n in linear expected time.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The central claim is that there exists an algorithm which, for any n, outputs a uniformly random Pólya tree on exactly n nodes and runs in expected O(n) time; the algorithm rests on an efficient recursive decomposition together with a linear-time method for inverting the size-conditioned generating function or equivalent branching-process conditioning.
What carries the argument
recursive decomposition of Pólya trees combined with linear-time resolution of the size-conditioned branching process
If this is right
- Exact uniform samples of Pólya trees become available at sizes where previous methods were impractical.
- The same decomposition immediately yields a linear-time sampler for the associated conditioned branching process.
- The generated trees satisfy the exact uniform distribution over all Pólya trees of size n.
- No quadratic overhead from naive recursion or rejection sampling remains in the expected running time.
Where Pith is reading between the lines
- The technique may transfer to other unlabeled tree models whose generating functions admit similar recursive decompositions.
- It supplies a concrete benchmark for comparing the cost of exact versus approximate sampling in random combinatorial structures.
- Large exact samples enable direct Monte-Carlo study of additive parameters on Pólya trees without bias from size conditioning.
Load-bearing premise
The decomposition and the size-resolution step each run in linear expected time; any super-linear worst-case cost in either step would invalidate the overall linear-runtime claim.
What would settle it
An explicit computation, for a sequence of sizes n, showing that the measured expected number of operations grows faster than c n for every constant c.
read the original abstract
We present an algorithm for exact-size sampling of uniformly random P\'olya trees with linear expected runtime.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript claims to present an algorithm for exact-size sampling of uniformly random Pólya trees with linear expected runtime.
Significance. If the claimed linear-expected-time exact-size uniform sampler exists and is correctly analyzed, the result would be significant for combinatorial enumeration and random generation, as Pólya trees arise in many enumeration problems and an optimal-time sampler would enable large-scale simulation and statistical studies. The manuscript provides no supporting details, however, so the significance cannot be assessed beyond the abstract claim.
major comments (1)
- [Abstract] Abstract: The central claim of an algorithm achieving linear expected runtime for exact-size uniform sampling is stated with no description of the recursive decomposition, generating-function inversion procedure, size-conditioned branching process, or runtime analysis. Without these elements the claim is unverifiable and the soundness of the result cannot be evaluated.
Simulated Author's Rebuttal
We thank the referee for their report. The single major comment concerns the lack of technical details supporting the abstract claim. We address it directly below.
read point-by-point responses
-
Referee: [Abstract] Abstract: The central claim of an algorithm achieving linear expected runtime for exact-size uniform sampling is stated with no description of the recursive decomposition, generating-function inversion procedure, size-conditioned branching process, or runtime analysis. Without these elements the claim is unverifiable and the soundness of the result cannot be evaluated.
Authors: We agree that the submitted manuscript consists only of the abstract and contains none of the requested elements (recursive decomposition, generating-function inversion, size-conditioned branching process, or runtime analysis). Consequently the central claim cannot be verified from the text as provided. We will revise the manuscript by expanding it to include a complete description of these components together with the supporting analysis. revision: yes
- The manuscript contains no technical details of the algorithm or its analysis, so we cannot supply or defend those details without adding new content.
Circularity Check
No significant circularity detected
full rationale
The paper presents an algorithmic claim for exact-size uniform sampling of Pólya trees in linear expected time. The abstract contains no equations, generating functions, fitted parameters, or self-citations. No derivation chain, recursive decomposition details, or size-conditioned branching analysis is supplied in the visible text, so no load-bearing step can be shown to reduce by construction to its own inputs. This is a standard honest non-finding for an algorithmic result whose internal steps are not exhibited.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
Bacher, O
A. Bacher, O. Bodini, and A. Jacquot. Efficient random sampling of binary and unary- binary trees via holonomic equations.Theor. Comput. Sci., 695:42–53, 2017
2017
-
[2]
Bartholdi and P
L. Bartholdi and P. Diaconis. An algorithm for uniform generation of unlabeled (P´ olya) trees.Forum Math. Sigma, 14:27, 2026. Id/No e76
2026
-
[3]
Bodini, D
O. Bodini, D. Gardy, and A. Jacquot. Asymptotics and random sampling for BCI and BCK lambda terms.Theor. Comput. Sci., 502:227–238, 2013. 24
2013
-
[4]
Bodini and Y
O. Bodini and Y. Ponty. Multi-dimensional Boltzmann sampling of languages. InPro- ceeding of the 21st international meeting on probabilistic, combinatorial, and asymptotic methods in the analysis of algorithms (AofA’10), Vienna, Austria, June 28 – July 2, 2010, pages 49–64. Nancy: The Association. Discrete Mathematics & Theoretical Com- puter Science (DMT...
2010
-
[5]
Bodini, O
O. Bodini, O. Roussel, and M. Soria. Boltzmann samplers for first-order differential specifications.Discrete Appl. Math., 160(18):2563–2572, 2012
2012
-
[6]
Bodirsky, ´E
M. Bodirsky, ´E. Fusy, M. Kang, and S. Vigerske. Boltzmann samplers, P´ olya theory, and cycle pointing.SIAM J. Comput., 40(3):721–769, 2011
2011
-
[7]
Bodirsky and M
M. Bodirsky and M. Kang. Generating outerplanar graphs uniformly at random.Comb. Probab. Comput., 15(3):333–343, 2006
2006
-
[8]
Bringmann and T
K. Bringmann and T. Friedrich. Exact and efficient generation of geometric random variates and random graphs. InAutomata, languages, and programming. 40th inter- national colloquium, ICALP 2013, Riga, Latvia, July 8–12, 2013, Proceedings, Part I, pages 267–278. Berlin: Springer, 2013
2013
-
[9]
L. Devroye. Simulating size-constrained Galton-Watson trees.SIAM J. Comput., 41(1):1–11, 2012
2012
-
[10]
Flajolet and R
P. Flajolet and R. Sedgewick.Analytic combinatorics. Cambridge University Press, Cambridge, 2009
2009
-
[11]
Fusy and K
´E. Fusy and K. Panagiotou.Manuscript in preparation
-
[12]
I. A. Ibragimov and Y. V. Linnik.Independent and stationary sequences of random vari- ables. Wolters-Noordhoff Publishing, Groningen, 1971. With a supplementary chapter by I. A. Ibragimov and V. V. Petrov, Translation from the Russian edited by J. F. C. Kingman
1971
-
[13]
S. Janson. Simply generated trees, conditioned Galton-Watson trees, random alloca- tions and condensation.Probab. Surv., 9:103–252, 2012
2012
-
[14]
R. Otter. The number of trees.Ann. of Math. (2), 49:583–599, 1948
1948
-
[15]
Panagiotou, L
K. Panagiotou, L. Ramzews, and B. Stufler. Exact-size sampling of enriched trees in linear time.SIAM J. Comput., 52(5):1097–1131, 2023
2023
-
[16]
Panagiotou and B
K. Panagiotou and B. Stufler. Scaling limits of random P´ olya trees.Probab. Theory Related Fields, 170(3-4):801–820, 2018
2018
-
[17]
J. Pitman. Enumerations of trees and forests related to branching processes and random walks. InMicrosurveys in discrete probability. DIMACS workshop, Princeton, NJ, USA, June 2–6, 1997, pages 163–180. Providence, RI: AMS, American Mathematical Society, 1998
1997
-
[18]
G. P´ olya. Kombinatorische Anzahlbestimmungen f¨ur Gruppen, Graphen und chemische Verbindungen.Acta Math., 68(1):145–254, 1937
1937
-
[19]
Sportiello
A. Sportiello. Boltzmann sampling of irreducible context-free structures in linear time, 2021
2021
-
[20]
B. Stufler. Probabilistic enumeration and equivalence of nonisomorphic trees.Discrete Math. Theor. Comput. Sci., 27(3):14, 2025. Id/No 18
2025
-
[21]
Tak´ acs
L. Tak´ acs. Ballots, queues and random graphs.J. Appl. Probab., 26(1):103–112, 1989
1989
-
[22]
J. G. Wendel. Left-continuous random walk and the Lagrange expansion.Am. Math. Mon., 82:494–499, 1975
1975
-
[23]
´Eric Fusy and C. Pivoteau. Leap generators for composition schemes.arxiv:2605.06471, 2026. Benedikt Stufler, Vienna University of Technology•E-mail :benedikt.stufler at tuwien.ac.at
Pith/arXiv arXiv 2026
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.