Generation, Ranking and Unranking of Ordered Trees with Degree Bounds
Mahdi Amani (Universit\`a di Pisa, Pisa, Italy), Abbas Nowzari-Dalini, (UT, Tehran, Iran)

TL;DR
This paper introduces a new encoding for generating, ranking, and unranking unlabeled ordered trees with degree bounds, generalizing chemical trees, achieving efficient algorithms with constant average generation time and polynomial precomputation.
Contribution
A novel encoding method for ordered trees with degree bounds enabling efficient generation, ranking, and unranking algorithms with improved time complexities.
Findings
Generation in constant average time with O(n) worst case
Ranking and unranking algorithms with O(n) and O(n log n) complexities
Precomputation of O(n^2) for encoding and algorithms
Abstract
We study the problem of generating, ranking and unranking of unlabeled ordered trees whose nodes have maximum degree of . This class of trees represents a generalization of chemical trees. A chemical tree is an unlabeled tree in which no node has degree greater than 4. By allowing up to children for each node of chemical tree instead of 4, we will have a generalization of chemical trees. Here, we introduce a new encoding over an alphabet of size 4 for representing unlabeled ordered trees with maximum degree of . We use this encoding for generating these trees in A-order with constant average time and O(n) worst case time. Due to the given encoding, with a precomputation of size and time O(n^2) (assuming is constant), both ranking and unranking algorithms are also designed taking O(n) and O(nlogn) time complexities.
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.
