Avoiding conjugacy classes on the 5-letter alphabet

We construct an infinite word $w$ over the $5$-letter alphabet such that for every factor $f$ of $w$ of length at least two, there exists a cyclic permutation of $f$ that is not a factor of $w$. In other words, $w$ does not contain a non-trivial conjugacy class. This proves the conjecture in Gamard et al. [TCS 2018]

It is conjectured that the smallest alphabet allowing an infinite word satisfying P 2 has 5 letters [5], which is best possible. In this paper, we prove this conjecture using a morphic word. This settles the topic of the smallest alphabet needed to satisfy P i .

Main result
Let ε denote the empty word. We consider the morphic word w 5 = G(F ω (0)) defined by the following morphisms. In order to prove this theorem, it is convenient to express w 5 with the larger morphisms f = F 3 and g = G • F 2 given below. Clearly, w 5 = g(f ω (0)).

Avoiding conjugacy classes in F ω (0)
Here we study the pure morphic word and the conjugacy classes it contains.
Proof. Notice that the factor 01 only occurs as the prefix of the f -image of every letter in F ω (0). Moreover, every letter 1 only occurs in F ω (0) as the suffix of the factor 01. Let us say that the index of a conjugacy class is the number of occurrences of 1 in any of its elements. An easy computation shows that the set of complete conjugacy classes in F ω (0) with index at most one is C 1 = F (2), F 2 (2), F (4), F 2 (4), f (4), f (0) . Let us assume that F ω (0) contains a conjugacy class c with index at least two. Let w ∈ c be such that 01 is a prefix of w. We write w = ps such that the leftmost occurrence of 01 in w is the prefix of s. Then the conjugate sp of w also belongs to c and thus is a factor of F ω (0). This implies that the pre-image v = f −1 (w) is a factor of F ω (0), and so does every conjugate of v. Thus, F ω (0) contains a conjugacy class c such that the elements of c with prefix 01 are the f -images of the elements of c . Moreover, the index of c is strictly smaller than the index of c.
Using this argument recursively, we conclude that every complete conjugacy class in F ω (0) has a member of the form f i (x) such that x is an element of a conjugacy class in C 1 . Now we show that F (2) does not generate larger conjugacy classes in F ω (0). We thus have to exhibit a conjugate of f (F (2)) = F 4 (2) = 0120301240324 that is not a factor of F ω (0). A computer check shows that the conjugate 4012030124032 is not a factor of F ω (0). Similarly, F 2 (2) does not generate larger conjugacy classes in F ω (0) since the conjugate 301203012401203230124032 of f (F 2 (2)) = F 5 (2) = 012030124012032301240323 is not a factor of F ω (0).

Avoiding conjugacy classes in w 5
We are ready to prove Theorem 2.1. A computer check 1 shows that w 5 avoids every conjugacy class of length at most 1000. Let us assume that w 5 contains a conjugacy class c of length at least 41. Consider a word w ∈ c with prefix ab. Notice that ab only appears in w 5 as the prefix of the g-image of every letter. Since |w| 41, w contains at least 2 occurrences of ab and we write w = ps such that the rightmost occurrence of ab in w is the prefix of s. Then the conjugate sp of w also belongs to c and thus is a factor of w 5 . This implies that the pre-image v = g −1 (w) is a factor of F ω (0), and so does every conjugate of v. Thus, F ω (0) contains a conjugacy class c such that the elements of c with prefix ab are the f -images of the elements of c .
The next four lemmas handle the remaining cases (with d 1): Notice that for technical reasons, we do not consider g(f (4)) and g(f (4)), which are also covered by the computer check. Proof. It is easy to check that T 23 is indeed a conjugate of g(f d (23)). Let us assume that T 23 appears in w 5 .
The letter 3 in f ω (0) appears after either 0 or 2. However e is a suffix of g(2) and not of g(0). Therefore, e.g(3) is a suffix of g(23) only. Since 23 is a suffix of f (2) and not of f (0), then g(23f (3)) is a suffix of g(f (23)) only. Using this argument recursively, p 23 is a suffix of g(f d (23)) only. Now, the letter 3 in f ω (0) appears before either 0 or 2, however abcdeacdb is a prefix of g(2) and not of g(0). Thus g(01203).abcdeacdb is a prefix of g(012032) only. Since 012032 is a prefix of f (2) and not of f (0), then g(f (01203)012032) is a prefix of g(f (012032)) only. Using this argument recursively, s 23 is a prefix of g(f d−1 (012032)) only. Thus, if T 23 is a factor of w 5 , then g(f d (232)) is a factor of w 5 . This is a contradiction since 232 is not a factor of f ω (0).  (24f (24) . . . f d−1 (24)).f d (24)) and s 0324 = g(f d−1 (01240) . . . f (01240).01240).abcdbecde. For every d 0, the word T 0324 = p 0324 g(f d (0))s 0324 is a conjugate of g(f d (0324)) that is not a factor of w 5 .
Proof. Let us assume that T 0324 appears in w 5 .
The letter 2 in f ω (0) appears after either 1 or 3. However acdbecd is a suffix of g(3) and not of g(1). Therefore acdbecd.g(24) is a suffix of g(324) only. Since 324 is a suffix of f (3) and not of f (1), then g(324f (24)) is a suffix of g(f (324)) only. Using this argument recursively, p 0324 is a suffix of g(f d (324)) only. Now, the letter 0 in f ω (0) appears before either 1 or 3. However abcdbecde is a prefix of g(3) and not of g(1). Thus g(01240).abcdbecde is a prefix of g(012403) only. Since 012403 is a prefix of f (3) and not of f (1), then g(f (01240)012403) is a prefix of g(f (012403)) only. Using this argument recursively, s 0324 is a prefix of g(f d−1 (012403)) only. Thus, if T 0324 is a factor of w 5 , then g(f d (32403)) is a factor of w 5 . This is a contradiction since 32403 is not a factor of f ω (0). Lemma 2.5. Let p 01240323 = ecdeacdbe.g(0323f (0323) · · · f d−1 (0323).f d (0323)) and s 01240323 = g(f d (012)f d−1 (012).· · · f (012)012).abcdb. For every d 0, the word T 01240323 = p 01240323 s 01240323 is a conjugate of g(f d (01240323) that is not a factor of w 5 .
Proof. Let us assume that T 01240323 appears in w 5 .
The factor 03 in f ω (0) appears after either 2 or 4. However ecdeacdbe is a suffix of g(4) and not of g(2). Therefore ecdeacdbe.g(0323) is a suffix of g(40323) only. Since 40323 is a suffix of f (4) and not of f (2), then g(40323f (0323)) is a suffix of g(f (40323)), using this argument recursively, p 01240323 is a suffix of g(f d (40323)) only. Now, the factor 12 in f ω (0) appears before either 0 or 4. However abcdb is a prefix of g(4) and not of g(0). Thus g(012).abcdb must only be a prefix of g(0124) and since 0323 is a prefix of f (4) and not of f (0) then g(f (012)0124) is a prefix of g(f (0124)) only. Using this argument recursively, s 01240323 is a prefix of g(f d (0124)) only. Thus, if T 01240323 is a factor of w 5 , then g(f d (403230124)) is a factor of w 5 . This is a contradiction since 403230124 is not a factor of f ω (0). (3)) and s 01203 = g(f d (012)f d−1 (012).f d−2 (012) . . . f (012)012).abcdeac. For every d 0, the word T 01203 = p 01203 s 01203 is a conjugate of g(f d (01203)) that is not a factor of w 5 .
Proof. Let us assume that T 01203 appears in w 5 . The letter 3 in f ω (0) appears after either 0 or 2. however d is a suffix of g(0) and not of g (2). Therefore d.g (2) is a suffix of g(12) only. Since 12 is a suffix of f (1) and not of f (3), then g(12f (2)) is a suffix of g(f (12)) only. Using this argument recursively, p 01203 is a suffix of g(f d (12)) only.
Now, 012 in f ω (0) appears before either 1 or 4, however abcdeac is only a prefix of g(1) and not of g(4). Thus g(012).abcdeac is a prefix of g(0120) only. Since 0120 is a prefix of f (1) and not of f (4), then g(f (012)0120) is a prefix of g(f (0120)) only. Using this argument recursively, s 01203 is a prefix of g(f d (0120)). Thus, if T 01203 is a factor of w 5 , then g(f d (030120)) is a factor of w 5 . This is a contradiction since 030120 is not a factor of f ω (0).