An algorithm for generating random mixed-arity trees
Aleksander Kiryk

TL;DR
This paper introduces an efficient algorithm for uniformly generating ordered trees with specified outdegree sequences, applicable to binary, n-ary, and mixed-arity trees, with proven correctness and linear time complexity.
Contribution
It presents a novel algorithm for random generation of mixed-arity trees with proven correctness and linear time complexity, expanding capabilities beyond fixed-arity trees.
Findings
Algorithm is correct and runs in O(n) time.
Applicable to binary, n-ary, and mixed-arity trees.
Derived formulas using the algorithm's proof ideas.
Abstract
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 time complexity for 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Data Management and Algorithms · Constraint Satisfaction and Optimization
