Abstract

For any $q \geq 2$, let $\Sigma_{q}=\{0,\ldots,q\!-\!1\}$, and fix a string $A$ over $\Sigma_{q}$. The $A$-free strings of length $n$ are the strings in $\Sigma_{q}^n$ which do not contain $A$ as a contiguous substring. In this paper, we investigate the possibility of listing the $A$-free strings of length $n$ so that successive strings differ in only one position, and by $\pm 1$ in that position. Such a listing is a Gray code for the $A$-free strings of length $n$. We identify those $q$ and $A$ such that, for infinitely many $n \geq 0$, a Gray code for the $A$-free strings of length $n$ is prohibited by a parity problem. Our parity argument uses techniques similar to those of Guibas and Odlyzko (Journal of Combinatorial Theory A 30 (1981) pp. 183–208) who enumerated the $A$-free strings of length $n$. When $q$ is even, we also give the complementary positive result: for those $A$ for which an infinite number of parity problems do not exist, we construct a Gray code for the $A$-free strings of length $n$ for all $n \geq 0$.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.