Ann wins the nonrepetitive game over four letters and the erase-repetition game over six letters

We consider two games between two players Ann and Ben who build a word together by adding alternatively a letter at the end of the shared word. In the nonrepetitive game, Ben wins the game if he can create a square of length at least $4$, and Ann wins if she can build an arbitrarily long word before that. In the erase-repetition game, whenever a square occurs the second part of the square is erased and the goal of Ann is still to build an arbitrarily large word (Ben simply wants to limit the size of the word in this game). Grytczuk, Kozik, and Micek showed that Ann has a winning strategy for the nonrepetitive game if the alphabet is of size at least $6$ and for the erase-repetition game is the alphabet is of size at least $8$. In this article, we lower these bounds to respectively $4$ and $6$. The bound obtain by Grytczuk et al. relied on the so-called entropy compression and the previous bound by Pegden relied on some particular version of the Lov\'asz Local Lemma. We recently introduced a counting argument that can be applied to the same set of problems as entropy compression or the Lov\'asz Local Lemma and we use our method here. For these two games, we know that Ben has a winning strategy when the alphabet is of size at most 3, so our result for the nonrepetitive game is optimal, but we are not able to close the gap for the erase-repetition game.


Introduction
A square is a word of the form uu where u is a non-empty word.The period of the square uu is |u| the length of u.We say that a word is square-free (or avoids squares) if none of its factors is a square.For instance, hotshots is a square while minimize is square-free.In 1906, Thue showed that there are arbitrarily long ternary words avoiding squares [8,9].This result is often regarded as the starting point of combinatorics on words, and the many generalizations of this question were widely studied.
The nonrepetitive game over an alphabet A is a game between Ann and Ben in which they consecutively add a letter at the end of a shared sequence.Ann's goal is to avoid squares while Ben tries to construct squares.More precisely if a square of period 2 or more appears then Ben wins.We do not forbid squares of length 1, since Ben could simply repeat the last letter played by Ann to win the game otherwise.However, over a large enough alphabet, Ann can avoid all the other squares.In fact, Pedgen, who introduced this game, used his extension of the Lovász Local Lemma to show that Ann can always win the game if the alphabet is of size at least 37 [4].Grytczuk Kozik and Micek showed that Ann has a winning strategy as long as the alphabet is of size at least 6 [1].To obtain this result they used the entropy compression argument based on the work of Moser on the algorithmic proof of the Lovász Local Lemma [3].On the other hand, it is not hard to see that if the alphabet is of size at most 3 Ben has a winning strategy (see [4]).In this article, we close the gap by showing that Ann has a winning strategy as soon as the alphabet is of size at least 4.
Theorem 1.Over an alphabet of size at least 4 Ann has a winning strategy for the nonrepetitive game.
Our proof relies on the same idea as the technique used in [5] (in fact, we recommend reading Lemma 2 of [5] before any proof from the current article since it is a less technical proof using the same central idea).More precisely, it relies on a recent counting argument [6,10] and on some ideas introduced by Kolpakov and improved by Shur [2,7].Intuitively, we use some extensive computer calculations to verify that Ann has exponentially many strategies for some "approximation" of the game, and we show that if there are enough such strategies then at least some of them are valid for the original game.
In their article Grytczuk et al. also considered the erase-repetition game [1].Once again Ann and Ben build a sequence together by alternately picking the next symbol.This time, however, as soon as a square occurs the second half of the square is deleted 1 .The goal of Ann is to build an arbitrarily long word while Ben tries to bound the size of the word.Notice that, in this game, we erase the second half of the square even if it has period 1 (which is equivalent to allowing the players to skip their turn).Grytczuk et al. showed that Ann has a winning strategy as soon as the alphabet is of size at least 8.Because of the nature of the problem, the entropy compression argument seems particularly well suited to tackle it.Indeed, the idea behind the entropy compression argument in this setting is to try to build a word from left to right in a pseudo-random manner and to erase the second half of any square that might occur.We use the same technique as for the nonrepetitive game to show that Ann has a winning strategy as soon as the alphabet is of size at least 6.We consider another game, the hard game which is easier for Ben than the erase-repetition game and we show that Ann wins the hard game with an alphabet of size 6.
Theorem 2.Over an alphabet of size at least 6 Ann has a winning strategy for the erase-repetition game.
We first provide the proof of Theorem 1 in Section 2 and the proof of Theorem 2 in Section 3. The second proof follows the same idea as the first one but is slightly more technical (this is mostly because Ben can skip his turn in the hard game).These two proofs rely on the existence of a vector with the right properties that we find with the aid of a computer.These computer verifications are delayed to Section 4. We then conclude our article in Section 5 with a simple proof that Ben has a winning strategy for the erase-repetition game over an alphabet of size at most 3.We are, however, not able to say who has a winning strategy for the erase-repetition game over an alphabet of size 4 or 5 and we leave this question open.
Let us recall the following formula related to the sum of a geometric series, for all x > 1, We use this formula and a few elementary variations extensively without detailing every step of computation in the rest of the article.We will say that a word v is a 2 − -power if it has length at least 3 and there exists a letter a such that va is a square.This notion will be really useful since Ben can create a square of period at least 2 at his turn if and only if Ann created a 2 − -power at her turn.
cannot create two squares.Indeed, it is not hard to verify that a word that admits two different squares as suffixes also admits a square as a proper factor.

Ann wins the nonrepetitive game over 4 letters
Ann can build arbitrarily long words in the nonrepetitive game if and only if she can play in such a way that after her turn the word never ends with a 2 − -power.Let A = {0, 1, 2, 3} be our alphabet.Let p = 15.We denote by S ≤p f ree the set of words that contain no square of period at most p and at least 2.
A word w is normalized if it is the smallest for the lexicographic order amongst all the words obtained by applying to w a permutation of the alphabet.Let Λ be the set of normalized prefixes of minimal squares of period between 2 and p (by mininal, we mean that no proper factor of these words should be a square of period between 2 and p).For any w, we let Λ(w) be the longest word from Λ that is a suffix of w up to a permutation of the alphabet.
Example.The normalized minimal squares of period between 2 and 3 are 0000, 0101, 001001, 011011, 010010 and 012012.Hence, if we were working with p = 3 the set Λ would be the set of prefixes of these words and in this case Λ(03012312) = 01201 and Λ(0123122) = 011.
Notice that the size of this set grows really fast as a function of p (for p = 15, we have |Λ| = 298489407 and this is why we will use a computer).
For any set of words L, and any w ∈ Λ, we let L (w) be the set of words from L whose longest suffix that belongs to Λ up to a permutation of the alphabet is w, that is L (w) = {u ∈ L : Λ(u) = w}.We are ready to state our first lemma.Lemma 3.There exist coefficients (C w ) w∈Λ such that C 0 > 0 and for all v ∈ Λ, where α = 12914/6541 and for all v ∈ Λ, C v ≤ 10635 and either The proof of this lemma relies on a simple computer verification that we delay to Section 4. For the rest of this section let us fix coefficients (C w ) w∈Λ that respect the conditions given by Lemma 3. We also let α be defined as in Lemma 3 and γ = 10635/4441.The weight of a word w ∈ L is given by C Λ(w) .For any set of words L, the weight L of the set L is the sum of the weight of the words of L, that is, To show that Ann can reach arbitrarily long words we are going to "count" the number of words of length n that Ann can reach.More precisely, instead of counting them, we are going to count the total weight of the words of size n that she can reach.If this weight is non-zero then she can reach at least one word (we will show that she can reach exponentially many words).
We fix a strategy φ : A * → A for Ben (a strategy for Ben is simply a function that gives the next play of Ben for each word).We then say that a square-free word v of odd length2 is playable by Ann (or simply playable) if • there is a sequence of moves by Ann that leads to this word against the strategy φ of Ben, • for every prefix u of w whose last letter was played by Ann, C Λ(u) > 0, • for every prefix u of w whose last letter was played by Ann, u does not end with a 2 − -power.
Let us explain the two last conditions.We lower bound the total weight of the playable words, so we might as well not count the words of weight 0. In particular, Lemma 3 tells us that any playable word weights at least 4441 and at most 10635, so for any two sets of playable words A and B such that |A| ≤ |B| we have A ≤ γ B (recall that, γ = 10635/4441).The third condition ensures that Ben can never choose a letter that would create a square, and that Ann herself does not create a square of period at least 2 (since every square of period at least 2 ends with a 2 − -power).
Remark.By the definition of (C w ) w∈Λ , for any w ∈ Λ, if w ends with a 2 − -power, then C w = 0.So the second condition in the definition of playable moves implies that any word played by Ann does not end with a 2 − -power of period at most p.
For all n, let S n be the set of playable words of length 2n − 1.We are now ready to state our main Lemma.
Then for all n, S n+1 ≥ β S n .
Proof.We proceed by induction on n.Let n be an integer such that the lemma holds for any integer smaller than n and let us show that S n+1 ≥ β S n .By the induction hypothesis, for all positive i, We say that a word v of length 2n + 1 is good, if • v contains no square of period at most p and at least 2, • and Let G be the set of good words.A word is wrong if it is good but not playable, that is, if one of its suffixes is 2 − -power (this also covers the case where a suffix is a square).Let F be the set of wrong words.Then for any w, S n+1 = G \ F and Let us first lower-bound G = w∈Λ |G (w) |C w .
The extensions of any word v ∈ S n are the words of the form vφ(v)a where a ∈ A. Such an extension belongs to G if and only if vφ(v)a ∈ S ≤p f ree and C Λ(vφ(v)a) = 0 (this last condition implies amongst other things that vφ(v)a does not end with a 2 − -power of period at most p).By definition, Λ(v) is the longest suffix of v that is a prefix of a square of period of length at most p (up to permutation of the alphabet).This implies that for any square-free word v and for any word u, vu ∈ S ≤p f ree if and only if Λ(v)u ∈ S ≤p f ree .For the same reason, for any square-free word v and for any word u, Λ(vu) = Λ(Λ(v)u).We then deduce that the contribution of the extensions of any word By Lemma 3, we deduce that the contribution of the extensions of any word v ∈ S n to G is at least αC Λ(v) .We sum the contributions over S n to obtain Let us now bound F .For all i, let F i be the set of words from F that end with a 2 − -power of period i.Clearly, F = i≥1 F i and Let us now upper-bound the F i separately depending on the magnitude and parity of i.
Case i ≤ p : For the sake of contradiction suppose that there is a word v in F i .Let u be the shortest 2 − -power that is a suffix of v. Then |u| ≤ p and u is the prefix of a minimal-square, which implies that u belongs to Λ. Hence u is a suffix of Λ(v).There exists a letter a such that Λ(v)a is a minimal square and by inequality (1), C v = 0.This is a contradiction since it implies that v is not good and F i contains only good words.We deduce |F i | = 0 and F i = 0.
Case i = 2j + 1 ≥ p + 1 : Any word u ∈ F i ends with a 2 − -power of period 2j + 1, so the last 2j letters are uniquely determined by the remaining prefix.This prefix belongs to S n+1−j .Hence, Case i = 2j ≥ p + 1 : Any word u ∈ F i ends with a 2 − -power of period 2j, so the last 2j − 1 letters are uniquely determined by the remaining prefix.Since the last letter was played by Ann then the 2j-th letter from the end of the word was played by Ben and is uniquely determined by the previous prefix (and the strategy of Ben).Thus, the last 2j letters of the word are uniquely determined by the remaining prefix that belongs to S n+1−j .Hence, We can now sum these bounds over the F i to upper bound F (we use the fact that p = 15 is odd), Using this bound and (4) with (3) yields By theorem hypothesis we deduce which concludes our proof.
One easily verifies that the conditions of the Lemma hold for β = 7/4 with the values given in Lemma 3 (or for any β ∈ [1.733, 1.790]).This implies the following Corollary Corollary 5.For all n ≥ 1, Since, S 0 = 4C 0 > 0 (by Lemma 6), we deduce |S n | > 0 for all n.There are playable words of any odd length, so Ann can reach arbitrarily long words over 4 letters.This concludes the proof of Theorem 1.
If the alphabet is such that |A| ≥ 5, then Ann can always "pretend" that two letters that are congruent modulo 4 are identical and play the same strategy as she would over 4 letters.If Ann avoids squares with this extra equality between letters then there is no square with the real value of the letters as well (it does not work for the erase-repetition game, since, amongst other things, the game is not over after one square).This is why increasing the size of the alphabet can only benefit Ann in the non-repetitive game.
3 Ann wins the erase-repetition game over 6 letters We will consider a slightly different game that we call the hard game.In this game, Ann and Ben alternately add a letter at the end of a shared word, Ben cannot repeat the letter previously played by Ann, but he can decide to skip his turn (or equivalently, play the empty word ε) and Ben wins if a square appears.If Ann has a strategy to win this game (i.e., build arbitrarily long words) then she can use the same strategy to win the erase-repetition game.More precisely, if Ben plays a repetition of period 1 in the erase-repetition game, we simulate this by having him play ε in the hard game, and because Ann uses a winning strategy for the hard game there is no square of period more than 1 that appears and nothing needs to be erased.We will show that with 6 letters or more Ann wins the hard game which implies Theorem 2. The proof and the definitions in this section are almost identical to the previous section, but there are a few technicalities that differ and in particular, the computation of the upper bound on F is slightly more complicated in this case.
Ann can build arbitrarily long words in the hard game if and only if she can play in such a way that after her turn the word never ends with a square or a 2 − -power.Let A = {0, 1, 2, 3, 4, 5} be our alphabet and let p = 9.We denote by S ≤p f ree the set of words that contain no square of period at most p.A word is normalized if it is the smallest of all the words obtained by a permutation of the alphabet.Let Λ be the set of normalized prefixes of minimal squares of period at most p over A. For any w, we let Λ(w) be the longest word from Λ that is a suffix of w up to a permutation of the alphabet.For any set of words S, and any w ∈ Λ, we let S (w) be the set of words from S whose longest suffix that belongs to Λ up to a permutation of the alphabet is w, that is S (w) = {u ∈ S : Λ(u) = w}.
The last letter of any word w is denoted by (w).
Lemma 6.There exist coefficients (C w ) w∈Λ such that C 0 > 0 and for all v ∈ Λ, where α = 29481/9855 and for all v ∈ Λ, C v ≤ 11699 and either The proof of this lemma relies on a computer verification that we delay to Section 4. For the rest of this section let us fix coefficients (C w ) w∈Λ that respect the conditions given by this lemma.We let γ = 11699/6710.The weight of a word w is given by C Λ(w) , and, for each set S of words, the weight S of S is the sum of the weight of the words in S, that is, Once again our goal will be to show that the weight of the words of playable words of any length is positive, which implies that there are playable words of any length.
We fix a strategy φ : A * → A ∪ {ε} of Ben (a strategy of Ben is simply a map that gives the next play of Ben for each word).A square-free word v is said to be playable by Ann (or simply playable) if • there is a sequence of moves by Ann that leads to v against the strategy φ of Ben, • for every prefix u of v whose last letter was played by Ann, we have C Λ (v) > 0, • and for every prefix u of v whose last letter was played by Ann, v does not end with a 2 − -power.
For all n, w, let S n be the set of all playable words obtained after Ann played n times.We are now ready to state our main Lemma.
Proof.We proceed by induction on n.Let n be an integer such that the lemma holds for any integer smaller than n and let us show that S n+1 ≥ β S n .By the induction hypothesis, for all i, A word v whose last letter was played at Ann's n + 1th move is good, if its prefix produced by the previous move of Ann is in S n , if it contains no square of period at most p and if C Λ (v) > 0. Let G be the set of good words.A word is wrong if it is good but not playable, that is, if one of its suffixes is a 2 − -power (this covers the case where one of the suffix is a square).Let F be the set of wrong words.Then for any w, S n+1 = G \ F and Let us first lower-bound G = w∈Λ |G(w)|C w .The extensions of any word v ∈ S n that belong to G are the words of the form vφ(v)a where a ∈ A and such that vφ(v)a ∈ S ≤p f ree .By definition, Λ(v) is the longest suffix of v that is a prefix of a square of period of length at most p (up to permutation of the alphabet).This implies that for any square-free word v and for any word u, vu ∈ S ≤p f ree if and only if Λ(v)u ∈ S ≤p f ree .For the same reason, for any square-free word v and for any word u, Λ(vu) = Λ(Λ(v)u).We then deduce that the contribution of the extensions of any word where the last inequality relies on the fact that φ(v) cannot be the last letter (v) of v by the rules of the hard game.By Lemma 3, we deduce that the contribution of the extensions of any word v ∈ S n to G is at least αC Λ(v) .We sum the contributions over S n to obtain Let us now bound F .For all i, let F i be the set of words from F that end with a 2 − -power of period i.Clearly, F = i≥1 F i and Let us now upper-bound the F i separately depending on the magnitude and the parity of i.
Case i ≤ p For the sake of contradiction suppose that there is a word v in F i .Let u be the shortest 2 − -power that is a suffix of v. Then |u| ≤ p and u is the prefix of a minimal-square, which implies that u belongs to Λ. Hence u is a suffix of Λ(v).There exists a letter a such that Λ(v)a is a minimal square and by equation ( 1), C v = 0.This is a contradiction since it implies that v is not good and F i contains only good words.Thus |F i | = 0 and F i = 0.
Case i ∈ {2j, 2j + 1} ≥ p + 1 Any word u ∈ F i ends with a 2 − -power of period 2j + 1, so the last 2j letters are uniquely determined by the remaining prefix.Removing the last 2j letters corresponds to erasing between j and 2j moves, so the corresponding prefix belongs to 2j k=j S n+1−k .Hence, Case i ∈ 2j +1 ≥ p+1 Any word u ∈ F i ends with a 2 − -power of period 2j, so the last 2j − 1 letters are uniquely determined by the remaining prefix.In particular, the last 2(j − 1) letters are uniquely determined by the remaining prefix.Now, with the same argument as in the previous case, we obtain k=(j−1) We can now sum the over the F i to upper bound F (we use the fact that p = 9 is odd), Using this bound and ( 10) with ( 9) yields The theorem hypothesis given in equation ( 7) implies which concludes our proof.
One easily verifies that the condition of the Lemma holds for β = 5/2 with the values given in Lemma 6 (in fact, we can take any β ∈ [2.19, 2.68]).It implies the following Corollary Corollary 8.For all n ≥ 1, Since, S 0 = 6C 0 > 0 (by Lemma 6), we deduce |S n | > 0 for all n.There are playable words after any number of moves, so Ann can reach arbitrarily long words over 6 letters.

And over larger alphabets as well
To conclude the proof of Theorem 2, we need to show that this also holds for 7 letters.The case |A| ≥ 8 was already solved by Grytczuk et al. and the proof that we used for the case |A| = 6 is easy to adapt to the case |A| = 7.The only difficulty is to find an equivalent of Lemma 6 (this can almost be done by hand in this case since p = 5 is enough).However, we can in fact use Ann's strategy over 6 letters to find strategies over more than 6 letters with a simple idea: Ann ignores the other letters.More precisely, Ann never plays the extra letters and whenever Ben plays such a letter Ann pretends that Ben passed.Lemma 9. Let k be a positive integer such that Ann has a winning strategy for the hard game over k letters, then she has a winning strategy for the hard game over k + 1 letters.
Proof.For any word, w ∈ {0, . . ., k} * , we let π(w) be the word obtained by deleting all the occurrences of k from w.For instance, if k = 6, π(01656346) = 01534.Let φ : {0, . . ., k − 1} * → {0, . . ., k − 1} be a winning strategy of Ann over k letters (a strategy of any of the two players is simply a map that given the current word indicates the next letter to play).Notice, that in a winning strategy Ann does not need to pass, so she does not need to play ε.We claim that the strategy φ • π is a winning strategy for Ann over {0, . . ., k} which would immediately imply our Lemma.
For the sake of contradiction, suppose that there is a strategy Ψ : {0, . . ., k} * → {0, . . ., k, ε} of Ben over {0, . . ., k} that wins against φ • π.It means that when Ann plays φ • π and Ben plays Ψ after some step they reach a word u that ends with a square vv.Since Ann does not pass v contains at least one letter, other than k, played by Ann.This implies that π(u) also ends with a non-empty square π(v)π(v).However, π(u) is a word reached if Ann played the strategy φ against Ben playing the same sequence of letters where k is replaced by ε.Since φ is a winning strategy for Ann, π(u) cannot contain any square which is a contradiction.

Verifying Lemma 3 and Lemma 6
The idea to find the sequence of coefficients is identical to the one used in Section 5 of [5].We use a computer to first compute the set Λ of minimal forbidden factors and we can then find a set of coefficients with the desired properties.This set of coefficients can be seen as a fixed point of some (almost linear) transformation, and we find them by iterating the corresponding transformation until it converges enough.This is really the same idea as iterating a matrix on some random vector to find a good approximation of the main eigenvector of the matrix.
The sets Λ are really large, so instead of providing the coefficients, we simply provide two almost identical programs (one for each Lemma) that find the coefficients and verify that they have the desired properties 3 .
The first step is to compute the set Λ of prefixes of minimal forbidden words of length at most p.In a second step, we compute the directed multi-graph G over the set of vertices Λ and such that there is an arc from u to v, if v = Λ(ua) and ua is square-free, for some letter a.More precisely, the multiplicity of the number of arcs from u to v in our graph is given by |{a ∈ A : v = Λ(ua)}|.This graph is useful to efficiently compute for any v ∈ Λ, the quantity min We consider the procedure that takes coefficients (C w ) w∈Λ as input and produces the coefficients (C w ) w∈Λ such that for each v ∈ Λ In practice, we even compute an intermediate vector (C w ) w∈Λ , such that for and then for each v ∈ Λ, For every v, we call the quantity C v /C v the growth associated to v. If we let α be the minimum of the growth over every v ∈ Λ then α and the current coefficients (C w ) w∈Λ respect the condition of equation 1.Our goal is then simply to find coefficients (C w ) w∈Λ that give the largest value of α.
To find our coefficients we simply start by setting all the C w to the same value, and then we iterate our procedure.We can normalize the coefficients after each iteration by dividing them by the average value.We then simply iterate until the algorithm converges.
When we give new values to each coefficient we replace any coefficient smaller than some threshold value m by 0 and any coefficient larger than some threshold value M by M .We want γ = M/m to be as small as possible, but if we choose m too large or M too small then we get a smaller coefficient α.So we chose these values experimentally so that γ would be as small as possible while minimizing the effect on the coefficient α.The threshold values m and M are inside the C++ code.
We suspect that there are good reasons why this procedure seems to converge toward the optimal.However, it is enough for our purpose that we verified that this deterministic procedure produces coefficients (C w ) w∈Λ with the desired property (which is verified exactly using computation over the rationals).
5 Ben wins the erase-repetition game over 3 letters Lemma 10.Ben wins the erase-repetition game over 3 letters.
Proof.It is always a bad choice for Ann to repeat the last letter of the word, since Ben can do the same thing and then we are back to the same configuration.So if Ann has a winning strategy then she never repeats the last letter of the word.We now describe the winning strategy of Ben (it is illustrated in Fig. 1).Up to a permutation of the alphabet, the two first letters played by Ann and Ben are respectively 0 and 1.If Ann plays 0, Ben can play 1 so we remove the second part of the square 0101 and we are back to the word 01 and Ann's turn.So in a winning strategy, Ann has to play 2 for and Ben can play 0 and the game then reaches the word 0120.Here, if Ann plays 2 Ben can play 0 and we reach 0120 and Ann's turn, which is a previously visited configuration.So for the game to progress, she has to play 1 and then Ben can play 2 so this is Ann's turn and the word is 012.Now if she plays 1, Ben answers 2 and we are back to Ann's turn with the word 012.If she plays 0 then Ban can simply play 0, so this is now Ann's turn and the word is 0120 which is a situation we've already encountered.We deduce that over 3 letters Ann cannot hope to reach a word of length larger than 6.From each configuration where it's Ann turn to play we give the two leaving arrows corresponding to the two possible moves of Ann (other than skipping her turn).From every configuration where it's Ben turn there is one leaving arrow corresponding to the chosen strategy for Ben.Since this graph is finite, it describes a winning strategy for Ben.
With a similar, but slightly more complicated analysis one can verify that Ben wins the hard game over 4 letters.Thus, we know that if Ann wants to win the erase-repetition game with 4 letters then she needs to use the erasing to her advantage.Erasing the second half of a square of even period puts the game into a previously visited configuration and if Ann creates a square of odd length at her turn then Ben can skip his next turn (by repeating a single letter) to put the game in a previously visited configuration.Hence, if Ann has a winning strategy for the erase-repetition game over 4 letters, this strategy must regularly put Ben in a position where he can choose to create a square of odd length.It is not clear if our approach can be adapted to deal with such strategies (and with the fact that the size of the word does not necessarily increase at every step).On one hand, the erase-repetition game does not seem to be much easier for Ann than the hard game, but on the other hand, when trying to play the game with short words it seems that the difference might be enough to allow Ann to win the game.
Experimental computations suggest that the coefficients that can be computed in Lemma 3 if one replaces p = 8 and A = {0, 1, 2, 3, 4, 5} by p = 21 and A = {0, 1, 2, 3, 4} would allow us to conclude that Ann wins the eraserepetition game over 5 letters with the exact same proof.We are, however, not able to carry out such computations since it seems to require at least a few terabytes of RAM (it takes 30 GB and 29 minutes for p = 16).Moreover, if we consider a modified version of the hard game where Ben is not allowed to play ε then our technique allows us to show that Ann wins this game over 5 letters.So while we leave the question over the alphabet of size 4 completely open, we conjecture that Ann also wins the erase-repetition game over 5 letters (and that, in a few years with larger computational power, it shouldn't be harder to prove than the current result).
Let us finally conclude that this technique can certainly be used to study many variations of these questions.One could, for instance, replace squares with other powers or avoidability of patterns, modify the short factors that are forbidden or allow Ben to skip his turn or not.

Figure 1 :
Figure1: An illustration of a winning strategy for Ben over 3 letters.From each configuration where it's Ann turn to play we give the two leaving arrows corresponding to the two possible moves of Ann (other than skipping her turn).From every configuration where it's Ben turn there is one leaving arrow corresponding to the chosen strategy for Ben.Since this graph is finite, it describes a winning strategy for Ben.