Skarbek's Algorithm for t-Ary Trees

  • Authors:
  • James F. Korsh

  • Affiliations:
  • Department of Computer and Information Sciences, Temple University Philadelphia, PA, USA

  • Venue:
  • The Computer Journal
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents a new algorithm for generating all n node t-ary trees in linked representation by providing a context and generalizing Skarbek's algorithm for generating binary trees. It initially appeared that Skarbek's algorithm could not be generalized to even 3-ary trees, which motivated the author to previously develop an algorithm for generating all n node t-ary trees in linked representation based on a particular listing of integer sequences representing the trees. The context for the generalization of Skarbek's algorithm turns out to also be a particular listing of integer sequences representing the trees. The paper also gives two constant average time implementations. The first generates the next tree from its predecessor given in linked representation while the second retains additional information about the predecessor beyond just its linked representation.