计算机科学 > 数据结构与算法
[提交于 2018年2月20日]
标题:Efficient random sampling of binary and unary-binary trees via holonomic equations
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We present a new uniform random sampler for binary trees with $n$ internal nodes consuming $2n + \Theta(\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 $\Theta(n)$ random bits on average. Both are the first linear-time algorithms to be optimal up to a constant.
提交历史
来自:Axel Bacher[v1] 2018年2月20日 星期二 00:00:00 UTC