Given a binary word relation $\tau$ onto $A^*$ and a finite language $X\subseteq A^*$, a $\tau$-Gray cycle over $X$ consists in a permutation $\left(w_{[i]}\right)_{0\le i\le |X|-1}$ of $X$ such that each word $w_{[i]}$ is an image under $\tau$ of the previous word $w_{{[i-1]}}$. We define the complexity measure $\lambda_{A,\tau}(n)$, equal to the largest cardinality of a language $X$ having words of length at most $n$, and s.t. some $\tau$-Gray cycle over $X$ exists. The present paper is concerned with $\tau=\sigma_k$, the so-called $k$-character substitution, s.t. $(u,v)\in\sigma_k$ holds if, and only if, the Hamming distance of $u$ and $v$ is $k$. We present loopless (resp., constant amortized time) algorithms for computing specific maximum length $$\sigma_k$-Gray cycles.
翻译:给定一个关于$A^*$的二元词关系$\tau$和一个有限语言$X\subseteq A^*$,一个$X$上的$\tau$-Gray循环包含$X$的一个排列$\left(w_{[i]}\right)_{0\le i\le |X|-1}$,使得每个词$w_{[i]}$都是前一词$w_{{[i-1]}}$在$\tau$下的像。我们定义复杂度度量$\lambda_{A,\tau}(n)$,它等于存在某个$\tau$-Gray循环的语言$X$的最大基数,其中$X$的单词长度至多为$n$。本文关注$\tau=\sigma_k$,即所谓的$k$-字符替换,满足$(u,v)\in\sigma_k$当且仅当$u$和$v$的汉明距离为$k$。我们给出了计算特定最大长度$\sigma_k$-Gray循环的无环(或常数摊还时间)算法。