Greedy Gray Codes for some Restricted Classes of Binary Words
Nathanaël Hassler, Vincent Vajnovszki, Dennis Wong
TL;DR
This work studies greedy Gray codes for two restricted binary word families: $F_n(p,k)$ (weight-$k$ words with no $p$ consecutive 1's) and $C_n(p,k)$ (prefix-constrained words). It introduces tail partitioned and recursive tail partitioned structures and analyzes the greedy generation via homogeneous transpositions, establishing when such greedy processes yield exhaustive Gray codes. For Fibonacci words, the authors define Gen$F(n,k)$ and give an explicit description with size $|\text{GenF}(n,k)|=n-2k+2$, along with last-word characterizations. For general $C_n(p,k)$, they first solve the integer $p$ case to obtain Gen$_p(n,k)$ with size $n-k+1-p$, and then generalize to real $p$ with $|\text{Gen}_p(n,k)|=n-k+1-\lceil p\rceil$, providing explicit word-constructs that realize the Gray codes. The paper also outlines CAT-style algorithms to realize these Gray codes, enabling efficient generation of constrained binary words in practice.
Abstract
We investigate the existence of greedy Gray codes, based on the choice of the first element in the code, for two classes of binary words: generalized Fibonacci words and generalized Dyck words.
