Generating rooted and free plane trees

  • Authors:
  • Joe Sawada

  • Affiliations:
  • University of Guelph, Guelph, Canada

  • Venue:
  • ACM Transactions on Algorithms (TALG)
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This article has two main results. First, we develop a simple algorithm to list all nonisomorphic rooted plane trees in lexicographic order using a level sequence representation. Then, by selecting a unique centroid to act as the root of a free plane tree, we apply the rooted plane tree algorithm to develop an algorithm to list all nonisomorphic free plane trees. The latter algorithm also uses a level sequence representation and lists all free plane trees with a unique centroid first followed by all free plane trees with two centroids. Both algorithms are proved to run in constant amortized time using straightforward bounding methods.