Efficient Enumeration of Ordered Trees with k Leaves (Extended Abstract)

  • Authors:
  • Katsuhisa Yamanaka;Yota Otachi;Shin-Ichi Nakano

  • Affiliations:
  • Graduate School of Information Systems, The University of Electro-Communications, Tokyo, Japan 182-8585;Department of Computer Science, Gunma University, Gunma, Japan 376-8515;Department of Computer Science, Gunma University, Gunma, Japan 376-8515

  • Venue:
  • WALCOM '09 Proceedings of the 3rd International Workshop on Algorithms and Computation
  • Year:
  • 2009
  • The semigroups of order 10

    CP'12 Proceedings of the 18th international conference on Principles and Practice of Constraint Programming

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, we give a simple algorithm to generate all ordered trees with exactly n vertices including exactly k leaves. The best known algorithm generates such trees in O(n − k) time for each, while our algorithm generates such trees in O(1) time for each in worst case.