3

Let $X$ denote a set and $F_{\mathbf{Mon}}X$ denote the free monoid on $X$.

Call a word $w \in F_{\mathbf{Mon}}X$ non-repeating iff for all words $x,y,z \in F_{\mathbf{Mon}}X,$ we have:

$$w = xy^2 z \rightarrow y = 1$$

For example, if $X = \{a,b\}$, then the non-repeating words in $F_{\mathbf{Mon}}X$ are:

$$\{1,a,b,ab,ba,aba,bab\}$$

It turns out that if $X$ is finite, then $F_{\mathbf{Mon}}X$ has only finitely-many non-repeating words. Therefore, it has one or more non-repeating words of maximum length.

Question. Suppose $X$ is a finite set, $n$ is a natural number, and $|X|=n.$ In terms of $n$, what is the maximum length of a non-repeating word in $F_{\mathbf{Mon}}X$?

More briefly: what is the maximum length of a non-repeating word on $n$ letters?

goblin GONE
  • 67,744

1 Answers1

3

These are commonly called squarefree words (https://en.wikipedia.org/wiki/Square-free_word). With three letters, they can be arbitrarily long. One source for this result is a paper of Baake, Elser, and Grimm: The Entropy of Square-Free Words (http://arxiv.org/abs/math-ph/9809010). From this paper, you can track down the original proof if you like, but I believe it may be due to Thue, and in German.

A construction that I found in Avoiding and Enforcing Repetitive Structures on Words, the 2014 dissertation of Mike Müller:

Let $h(0) = 0121$, $h(1) = 032$, $h(2) = 013$, and $h(3) = 0302$. Then $h^{(n)}(0)$ is squarefree for all $n$.

This is over four letters, but you can track down similar constructions for three letters from these sources (maybe even in Müller — I didn't read his entire dissertation).