
























We present a new uniform random sampler for binary trees with $n$ internal nodes consuming $2n + Θ(\log(n)^2)$ random bits on average. This makes it quasi-optimal and out-performs the classical Remy algorithm. We also present a sampler for unary-binary trees with $n$ nodes taking $Θ(n)$ random bits on average. Both are the first linear-time algorithms to be optimal up to a constant.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。