Combinatorics for computer science
Combinatorics for computer science
Efficient loopless generation of gray codes for K-array trees
Information Processing Letters
Generating regular K-ary trees efficiently
The Computer Journal
Gray codes for reflectable languages
Information Processing Letters
Hi-index | 0.01 |
Y. Li and J. Sawada classified a type of language called a reflectable language [Inform. Process. Lett. 109 (2009) 296-300], and gave a generic recursive algorithm GrayCode to list all strings of length n for any reflectable language in Gray code order. GrayCode runs in O(n) worst-case time per string for any application. Based on Williamson’s algorithm for k-ary strings, a generic non-recursive algorithm GenericNext is proposed in this paper to list all strings of length for any reflectable language in Gray code order, but the worst-case time is O(1) per string for all the applications mentioned in Y. Li and J. Sawada’s paper.