Balancing Cyclic R-ary Gray Codes II

New cyclic $n$-digit Gray codes are constructed over $\{0, 1, \ldots, R-1 \}$ for all $R \ge 2$, $n \ge 3$. These codes have the property that the distribution of digit changes (transition counts) between two successive elements is close to uniform. For $R=2$, the construction and proof are simpler than earlier balanced cyclic binary Gray codes. For $R \ge 3$ and $n \ge 2$, every transition count is within $2$ of the average $R^n/n$. For even $R >2$, the codes are as close to uniform as possible, except when there are two anomalous transition counts for $R \equiv 2 \pmod{4}$ and $R^n$ is divisible by $n$.

[1]  W. M. Goodall Television by pulse code modulation , 1951 .

[2]  Carla D. Savage,et al.  Balanced Gray Codes , 1996, Electron. J. Comb..

[3]  Chi-Jen Lu,et al.  A Note on Iterating an alpha-ary Gray Code , 2001, SIAM J. Discret. Math..

[4]  I. Nengah Suparta,et al.  Counting sequences, Gray codes and lexicodes , 2006 .

[5]  Bhu Dev Sharma,et al.  On m-ary Gray codes , 1978, Inf. Sci..

[6]  I. Nengah Suparta A Simple Proof for the Existence of Exponentially Balanced Gray Codes , 2005, Electron. J. Comb..

[7]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[8]  Andreas Baltz,et al.  The Structure of Maximum Subsets of {1, ..., n} with No Solutions to a+b = kc , 2005, Electron. J. Comb..

[9]  András Ádám Truth functions and the problem of their realization by two-terminal graphs , 1968 .

[10]  CodeChi,et al.  A Note on Iterating an-ary Gray , 2007 .

[11]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[12]  AJ van Zanten,et al.  Totally balanced and exponentially balanced Gray codes , 2004 .

[13]  Yaagoub Ashir,et al.  Lee Distance and Topological Properties of k-ary n-cubes , 1995, IEEE Trans. Computers.

[14]  BroegBob,et al.  Lee Distance and Topological Properties of k-ary n-cubes , 1995 .

[15]  Bella Bose,et al.  Lee distance Gray codes , 1995, Proceedings of 1995 IEEE International Symposium on Information Theory.

[16]  John P. Robinson,et al.  Counting sequences , 1981, IEEE Transactions on Computers.

[17]  Bella Bose,et al.  Balancing Cyclic R-ary Gray Codes , 2007, Electron. J. Comb..

[18]  Martin Cohn Affine m-ary Gray Codes , 1963, Inf. Control..

[19]  Carla Savage,et al.  A Survey of Combinatorial Gray Codes , 1997, SIAM Rev..