Balancing Cyclic $R$-ary Gray Codes

Mary Flahive, Bella Bose


New cyclic $n$-digit Gray codes are constructed over $\{0, 1, \ldots, R-1 \}$ for all $R \ge 3$, $n \ge 2$. These codes have the property that the distribution of the digit changes (transition counts) is close to uniform: For each $n \ge 2$, every transition count is within $R-1$ of the average $R^n/n$, and for the $2$-digit codes every transition count is either $\lfloor{R^2/2} \rfloor$ or $\lceil{R^2/2} \rceil$.

Full Text: