English

Words that almost commute

Combinatorics 2022-03-15 v2 Discrete Mathematics

Abstract

The \emph{Hamming distance} ham(u,v)\text{ham}(u,v) between two equal-length words uu, vv is the number of positions where uu and vv differ. The words uu and vv are said to be \emph{conjugates} if there exist non-empty words x,yx,y such that u=xyu=xy and v=yxv=yx. The smallest value ham(xy,yx)\text{ham}(xy,yx) can take on is 00, when xx and yy commute. But, interestingly, the next smallest value ham(xy,yx)\text{ham}(xy,yx) can take on is 22 and not 11. In this paper, we consider conjugates u=xyu=xy and v=yxv=yx where ham(xy,yx)=2\text{ham}(xy,yx)=2. More specifically, we provide an efficient formula to count the number h(n)h(n) of length-nn words u=xyu=xy over a kk-letter alphabet that have a conjugate v=yxv=yx such that ham(xy,yx)=2\text{ham}(xy,yx)=2. We also provide efficient formulae for other quantities closely related to h(n)h(n). Finally, we show that there is no one easily-expressible good bound on the growth of h(n)h(n).

Keywords

Cite

@article{arxiv.2110.01120,
  title  = {Words that almost commute},
  author = {Daniel Gabric},
  journal= {arXiv preprint arXiv:2110.01120},
  year   = {2022}
}
R2 v1 2026-06-24T06:35:28.432Z