一种随机混合树的生成算法
An algorithm for generating random mixed-arity trees
摘要:
受文献[4]的启发,我们提出了一个新的有序树的一致随机生成算法,其中所有出现的出度都可以由给定的数列指定。该方法可用于二叉树、n叉树或具有不同特征的树的随机生成。我们表明,该算法是正确的,并具有$O(n)$的时间复杂度为$n$所需的节点数在所产生的树。在讨论部分,我们展示了如何选择一些公式可以推导出使用的想法开发的算法的正确性的证明。
英文摘要:
Inspired by [4] we present a new algorithm for uniformly random generation of ordered trees in which all occuring outdegrees can be specified by a given sequence of numbers. The method can be used for random generation of binary or n-ary trees, or ones with various arities. We show that the algorithm is correct and has $O(n)$ time complexity for $n$ being the desired number of nodes in the resulting tree. In the discussion part we show how some selected formulas can be derived with the use of ideas developed in the proof of correctness of the algorithm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。