Loop Free Generation ofK-Ary Trees
Dominique Roelants van Baronaigien · American Journal of Mathematical and Management Sciences · 2000
SYNOPTIC ABSTRACTThe optimal time complexity for listing any combinatorial object is O(1) worst case per object listed. Generation algorithms that take O(1) worst case time are called loopless because they cannot involve a loop or recursion. This paper presents a loopless algorithm for listing all k-ary trees with n nodes. The algorithm is based on the bit string representation of a k-ary tree.