Holonomic equations are recursive equations which allow computingefficiently numbers of combinatoric objects. R{\'e}my showed that theholonomic equation associated with binary trees yields an efficientlinear random generator of binary trees. I extend this paradigm toMotzkin trees and Schr{\"o}der trees and show that despite slightdifferences my algorithm that generates random Schr{\"o}der trees has linearexpected complexity and my algorithm that generates Motzkin trees is inO(n) expected complexity, only if we can implement a specific oraclewith a O(1) complexity. For Motzkin trees, I propose a solution whichworks well for realistic values (up to size ten millions) and yields anefficient algorithm.
翻译:全息方程式是循环式方程式,可以计算出组合物体的高效数量。 R {'e}my 显示,与二进制树相关的超光速方程式生成了二进制树的高效线性随机生成器。我将这一范式扩展至莫兹金树和Schr}o}der树,并表明,尽管产生随机Schr {'o}der树的算法略有差异,但产生莫兹金树的算法具有线性预期的复杂性,而我生成莫兹金树的算法则在O(n)预期的复杂度中,只有我们能够执行一个具有O(1)复杂度的特定神器。对于莫兹金树,我提出了一个解决方案,它对于现实值(高达1 000万大小)和高效算法非常有效。