A Loopless Algorithm for Generating Binary Tree Sequences

Abstract A loopless generation algorithm is an algorithm where the amount of computation to go from one object to the next is 0(1). As with most of the generation algorithms, the algorithm presented in this paper generates an integer sequence representation of the binary trees, but none of the previously published algorithms have been loopless. A loopless algorithm for generating all binary trees with n nodes is presented here. We also discuss ranking and unranking.