Efficient loopless generation of Gray codes for -ary trees

Limin Xiang, Kazuo Ushijima, Changjie Tang
2000 Information Processing Letters  
Vajnovszki recently developed a loopless algorithm [Inform. Process. Lett. 68 (1998) 113] to enumerate Gray codes for binary trees, and then Korsh and Lafollette gave a loopless algorithm [Inform. Process. Lett. 70 (1999) 7] to generate Gray codes for k-ary trees. In this paper, another loopless algorithm is presented to list Gray codes for k-ary trees more efficiently in both space and time than the two former algorithms, and the algorithm is also conceptually simpler than the predecessors.
more » ... ed on the algorithm, Gray codes for k-ary trees with n internal nodes (n 2 and k > 3) can be generated in at least 2 2(n−1) different ways easily.
doi:10.1016/s0020-0190(00)00139-3 fatcat:glrgl73aobb4dninzhkoyoacgi