Efficient generation of the binary reflected gray code and its applications
Communications of the ACM
Hi-index | 0.04 |
A word is called cyclic if each letter occurs in it an even number of times. A cyclic word X on the n-letter alphabet is called a cyclic 〈m,n〉-word if there is a letter in each subword of X occurring in it an odd number of times, and in each subword of X of length m all the letters are distinct. Such words induce 〈m,n,〉-enumerations of binary strings (Methods of Discrete Analysis for Solving Combinatorial, Problems, Vol. 34, Novosibirsk, Russia, 1980, pp. 8). For any positive integers n and m, where m , we build a cyclic 〈m,n〉-word of length l = m2n-⌈m/2⌉ and give an algorithm of finding the corresponding binary string from its number in the 〈m, n〉-enumeration obtained.