Efficient generation of plane trees

SI Nakano - Information Processing Letters, 2002 - Elsevier
A rooted plane tree is a rooted tree with a left-to-right ordering specified for the children of
each vertex. In this paper we give a simple algorithm to generate all rooted plane trees with
at most n vertices. The algorithm uses O (n) space and generates such trees in O (1) time
per tree without duplications. The algorithm does not output entire trees but the difference
from the previous tree. By modifying the algorithm we can generate without duplications all
rooted plane trees having exactly n vertices in O (1) time per tree, all rooted plane trees …