key: cord-0043811-f8qfdtr5 authors: Rukavicka, Josef title: Transition Property for [Formula: see text]-Power Free Languages with [Formula: see text] and [Formula: see text] Letters date: 2020-05-26 journal: Developments in Language Theory DOI: 10.1007/978-3-030-48516-0_22 sha: b1d1e0ce5c0c0da0c4bb0da1b4c042e9e7cd1b1f doc_id: 43811 cord_uid: f8qfdtr5 In 1985, Restivo and Salemi presented a list of five problems concerning power free languages. Problem 4 states: Given [Formula: see text]-power-free words u and v, decide whether there is a transition from u to v. Problem 5 states: Given [Formula: see text]-power-free words u and v, find a transition word w, if it exists. Let [Formula: see text] denote an alphabet with k letters. Let [Formula: see text] denote the [Formula: see text]-power free language over the alphabet [Formula: see text], where [Formula: see text] is a rational number or a rational “number with [Formula: see text]”. If [Formula: see text] is a “number with [Formula: see text]” then suppose [Formula: see text] and [Formula: see text]. If [Formula: see text] is “only” a number then suppose [Formula: see text] and [Formula: see text] or [Formula: see text] and [Formula: see text]. We show that: If [Formula: see text] is a right extendable word in [Formula: see text] and [Formula: see text] is a left extendable word in [Formula: see text] then there is a (transition) word w such that [Formula: see text]. We also show a construction of the word w. The power free words are one of the major themes in the area of combinatorics on words. An α-power of a word r is the word r α = rr . . . rt such that |r α | |r| = α and t is a prefix of r, where α ≥ 1 is a rational number. For example (1234) 3 = 123412341234 and (1234) 7 4 = 1234123. We say that a finite or infinite word w is α-power free if w has no factors that are β-powers for β ≥ α and we say that a finite or infinite word w is α + -power free if w has no factors that are β-powers for β > α, where α, β ≥ 1 are rational numbers. In the following, when we write "α-power free" then α denotes a number or a "number with +". The power free words, also called repetitions free words, include well known square free (2-power free), overlap free (2 + -power free), and cube free words (3-power free). Two surveys on the topic of power free words can be found in [8] and [13] . One of the questions being researched is the construction of infinite power free words. We define the repetition threshold RT(k) to be the infimum of all rational numbers α such that there exists an infinite α-power-free word over an alphabet with k letters. Dejean's conjecture states that RT(2) = 2, RT(3) = 7 4 , RT(4) = 7 5 , and RT(k) = k k−1 for each k > 4 [3] . Dejean's conjecture has been proved with the aid of several articles [1] [2] [3] 5, 6, 9] . It is easy to see that α-power free words form a factorial language [13] ; it means that all factors of a α-power free word are also α-power free words. Then Dejean's conjecture implies that there are infinitely many finite α-power free words over Σ k , where α > RT(k). In [10] , Restivo and Salemi presented a list of five problems that deal with the question of extendability of power free words. In the current paper we investigate Problem 4 and Problem 5: -Problem 4: Given α-power-free words u and v, decide whether there is a transition word w, such that uwu is α-power free. -Problem 5: Given α-power-free words u and v, find a transition word w, if it exists. A recent survey on the progress of solving all the five problems can be found in [7] ; in particular, the problems 4 and 5 are solved for some overlap free (2 +power free) binary words. In addition, in [7] the authors prove that: For every pair (u, v) of cube free words (3-power free) over an alphabet with k letters, if u can be infinitely extended to the right and v can be infinitely extended to the left respecting the cube-freeness property, then there exists a "transition" word w over the same alphabet such that uwv is cube free. In 2009, a conjecture related to Problems 4 and Problem 5 of Restivo and Salemi appeared in [12] : Conjecture 1. [12, Conjecture 1] Let L be a power-free language and let e(L) ⊆ L be the set of words of L that can be extended to a bi-infinite word respecting the given power-freeness. If u, v ∈ e(L) then uwv ∈ e(L) for some word w. In 2018, Conjecture 1 was presented also in [11] in a slightly different form. Let N denote the set of natural numbers and let Q denote the set of rational numbers. ∪{(k, α) | k ∈ N and α ∈ Q and k > 3 and α ≥ 2} Remark 1. The definition of Υ says that: If (k, α) ∈ Υ and α is a "number with +" then k ≥ 3 and α ≥ 2. If (k, α) ∈ Υ and α is "just" a number then k = 3 and α > 2 or k > 3 and α ≥ 2. Let L be a language. A finite word w ∈ L is called left extendable (resp., right extendable) in L if for every n ∈ N there is a word u ∈ L with |u| = n such that uw ∈ L (resp., wu ∈ L). In the current article we improve the results addressing Problems 4 and Problem 5 of Restivo and Salemi from [7] as follows. Let Σ k denote an alphabet with k letters. Let L k,α denote the α-power free language over the alphabet Σ k . We show that if (k, α) ∈ Υ , u ∈ L k,α is a right extendable word in L k,α , and v ∈ L k,α is a left extendable word in L k,α then there is a word w such that uwv ∈ L k,α . We also show a construction of the word w. We sketch briefly our construction of a "transition" word. Let u be a right extendable α-power free word and let v be a left extendable α-power free word over Σ k with k > 2 letters. Letū be a right infinite α-power free word having u as a prefix and letv be a left infinite α-power free word having v as a suffix. Let x be a letter that is recurrent in bothū andv. We show that we may suppose thatū andv have a common recurrent letter. Let t be a right infinite α-power free word over Σ k \ {x}. Lett be a left infinite α-power free word such that the set of factors oft is a subset of the set of recurrent factors of t. We show that sucht exists. We identify a prefixũxg ofū such that g is a prefix of t andũxt is a right infinite α-power free word. Analogously we identify a suffixḡxṽ ofv such thatḡ is a suffix oft andtxṽ is a left infinite α-power free word. Moreover our construction guarantees that u is a prefix ofũxt and v is a suffix oftxṽ. Then we find a prefix hp of t such that pxṽ is a suffix oftxṽ and such that both h and p are "sufficiently long". Then we show thatũxhpxṽ is an α-power free word having u as a prefix and v as a suffix. The very basic idea of our proof is that if u, v are α-power free words and x is a letter such that x is not a factor of both u and v, then clearly uxv is α-power free on condition that α ≥ 2. Just note that there cannot be a factor in uxv which is an α-power and contains x, because x has only one occurrence in uxv. Our constructed wordsũxt,txṽ, andũxhpxṽ have "long" factors which does not contain a letter x. This will allow us to apply a similar approach to show that the constructed words do not contain square factor rr such that r contains the letter x. Another key observation is that if k ≥ 3 and α > RT(k − 1) then there is an infinite α-power free wordw over Σ k \ {x}, where x ∈ Σ k . This is an implication of Dejean's conjecture. Less formally said, if u, v are α-power free words over an alphabet with k letters, then we construct a "transition" word w over an alphabet with k − 1 letters such that uwv is α-power free. Dejean's conjecture imposes also the limit to possible improvement of our construction. The construction cannot be used for RT(k) ≤ α < RT(k − 1), where k ≥ 3, because every infinite (or "sufficiently long") word w over an alphabet with k − 1 letters contains a factor which is an α-power. Also for k = 2 and α ≥ 1 our technique fails. On the other hand, based on our research, it seems that our technique, with some adjustments, could be applied also for RT(k − 1) ≤ α ≤ 2 and k ≥ 3. Moreover it seems to be possible to generalize our technique to bi-infinite words and consequently to prove Conjecture 1 for k ≥ 3 and α ≥ RT(k − 1). Recall that Σ k denotes an alphabet with k letters. Let denote the empty word. Let Σ * k denote the set of all finite words over Σ k including the empty word , let denote the set of all right infinite words over Σ k , and let Σ N,L k denote the set of all left infinite words over Let occur(w, t) denote the number of occurrences of the nonempty factor Let F(w) denote the set of all finite factors of a finite or infinite word w ∈ Σ * k ∪ Σ N k . The set F(w) contains the empty word and if w is finite then also it means the sets of right infinite and left infinite α-power free words. Let (k, α) ∈ Υ and let u, v be α-power free words. The first lemma says that uv is α-power free if there are no word r and no nonempty prefixv of v such that rr is a suffix of uv and rr is longer thanv. The following technical set Γ (k, α) of 5-tuples (w 1 , w 2 , x, g, t) will simplify our propositions. 7. occur(w 2 xgy, xgy) = 1, where y ∈ Σ k is such that gy ∈ Prf(t), and 8. occur(w 2 , x) ≥ occur(w 1 , x). Less formally said, the 5-tuple (w 1 , w 2 , x, g, t) is in Γ (k, α) if w 1 w 2 xg is α-power free word over Σ k , t is a right infinite α-power free word over Σ k , t has no occurrence of x (thus t is a word over Σ k \ {x}), g is a prefix of t, xgy has only one occurrence in w 2 xgy, where y is a letter such that gy is a prefix of t, and the number of occurrences of x in w 2 is bigger than the number of occurrences of x in w 1 , where w 1 , w 2 , g are finite words and x is a letter. The next proposition shows that if (w 1 , w 2 , x, g, t) is from the set Γ (k, α) then w 1 w 2 xt is a right infinite α-power free word, where (k, α) is from the set Υ . k,α . Proof. Lemma 1 implies that it suffices to show that there are no u ∈ Prf(t) with |u| > |g| and no r ∈ Σ * k \ { } such that rr ∈ Suf(w 1 w 2 xu) and |rr| > |u|. Recall that w 1 w 2 xg is an α-power free word, hence we consider |u| > |g|. To get a contradiction, suppose that such r, u exist. We distinguish the following distinct cases. -If |r| ≤ |u| then: Since u ∈ Prf(t) ⊆ L k,α it follows that xu ∈ Suf(r 2 ) and hence x ∈ F(r 2 ). It is clear that occur(r 2 , x) ≥ 1 if and only if occur(r, x) ≥ 1. Since x ∈ F(u) and thus x ∈ F(r), this is a contradiction. -If |r| > |u| and rr ∈ Suf(w 2 xu) then: Let y ∈ Σ k be such that gy ∈ Prf(t). Since |u| > |g| we have that gy ∈ Prf(u) and xgy ∈ Prf(xu). Since |r| > |u| we have that xgy ∈ F(r). In consequence occur(rr, xgy) ≥ 2. But Property 7 of Definition 2 states that occur(w 2 xgy, xgy) = 1. Since rr ∈ Suf(w 2 xu), this is a contradiction. -If |r| > |u| and rr ∈ Suf(w 2 xu) and r ∈ Suf(w 2 xu) then: Let w 11 , w 12 , w 13 , w 21 , w 22 ∈ Σ * k be such that w 1 = w 11 w 12 w 13 , w 2 = w 21 w 22 , w 12 w 13 w 21 = r, w 12 w 13 w 2 xu = rr, and w 13 w 21 = xu; see Figure below . It follows that w 22 xu = r and w 22 = w 12 . It is easy to see that w 13 w 21 = xu. From occur(u, x) = 0 we have that occur(w 2 , x) = occur(w 22 , x) and occur(w 13 , x) = 1. From w 22 = w 12 it follows that occur(w 1 , x) > occur(w 2 , x). This is a contradiction to Property 8 of Definition 2. -If |r| > |u| and rr ∈ Suf(w 2 xu) and r ∈ Suf(w 2 xu) then: Let w 11 , w 12 , w 13 ∈ Σ * k be such that w 1 = w 11 w 12 w 13 , w 12 = r and w 13 w 2 xu = r; see Figure below . This is a contradiction to Property 8 of Definition 2. We proved that the assumption of existence of r, u leads to a contradiction. Thus we proved that for each prefix u ∈ Prf(t) we have that w 1 w 2 xu ∈ L k,α . The proposition follows. We prove that if (k, α) ∈ Υ then there is a right infinite α-power free word over Σ k−1 . In the introduction we showed that this observation could be deduced from Dejean's conjecture. Here additionally, to be able to address Problem 5 from the list of Restivo and Salemi, we present in the proof also examples of such words. If (k, α) ∈ Υ then the set L N,R k−1,α is not empty. Proof. If k = 3 then |Σ k−1 | = 2. It is well known that the Thue Morse word is a right infinite 2 + -power free word over an alphabet with 2 letters [11] . It follows that the Thue Morse word is α-power free for each α > 2. If k > 3 then |Σ k−1 | ≥ 3. It is well known that there are infinite 2-power free words over an alphabet with 3 letters [11] . Suppose 0, 1, 2 ∈ Σ k . An example is the fixed point of the morphism θ defined by θ(0) = 012, θ(1) = 02, and θ(2) = 1 [11] . If an infinite word t is 2-power free then obviously t is α-power free and α + -power free for each α ≥ 2. This completes the proof. We define the sets of extendable words. If u ∈ lext(L) then let lext(u, L) be the set of all left infinite wordsū such that Suf(ū) ⊆ L and u ∈ Suf(ū). Analogously if u ∈ rext(L) then let rext(u, L) be the set of all right infinite wordsū such that Prf(ū) ⊆ L and u ∈ Prf(ū). We show the sets lext(u, L) and rext(v, L) are nonempty for left extendable and right extendable words. If L ⊆ Σ * k and u ∈ lext(L) (resp., v ∈ rext(L)) then lext(u, L) = ∅ (resp., rext(v, L) = ∅). Proof. Realize that u ∈ lext(L) (resp., v ∈ rext(L)) implies that there are infinitely many finite words in L having u as a suffix (resp., v as a prefix). Then the lemma follows from König's Infinity Lemma [4, 8] . The next proposition proves that if (k, α) ∈ Υ , w is a right extendable α-power free word,w is a right infinite α-power free word having the letter x as a recurrent factor and having w as a prefix, and t is a right infinite α-power free word over Σ k \{x}, then there are finite words w 1 , w 2 , g such that the 5-tuple (w 1 , w 2 , x, g, t) is in the set Γ (k, α) and w is a prefix of w 1 w 2 xg. k,α , and occur(t, x) = 0 then there are finite words w 1 , w 2 , g such that (w 1 , w 2 , x, g, t) ∈ Γ (k, α) and w ∈ Prf(w 1 w 2 xg). Proof. Let ω = F(w) ∩ Prf(xt) be the set of factors ofw that are also prefixes of the word xt. Based on the size of the set ω we construct the words w 1 , w 2 , g and we show that (w 1 , w 2 , x, g, t) ∈ Γ (k, α) and w 1 w 2 xg ∈ Prf(w) ⊆ L k,α . The Properties 1, 2, 3, 4, 5, and 6 of Definition 2 are easy to verify. Hence we explicitly prove only properties 7 and 8 and that w ∈ Prf(w 1 w 2 xg). -If ω is an infinite set. It follows that Prf(xt) = ω. Let g ∈ Prf(t) be such that |g| = |w|; recall that t is infinite and hence such g exists. Let w 2 ∈ Prf(w) be such that w 2 xg ∈ Prf(w) and occur(w 2 xg, xg) = 1. Let w 1 = . Property 7 of Definition 2 follows from occur(w 2 xg, xg) = 1. Property 8 of Definition 2 is obvious, because w 1 is the empty word. Since |g| = |w| and w ∈ Prf(w) we have that w ∈ Prf(w 1 w 2 xg). -If ω is a finite set. Letω = ω ∩ F r (w) be the set of prefixes of xt that are recurrent inw. Since x is recurrent inw we have that x ∈ω and thusω is not empty. Let g ∈ Prf(t) be such that xg is the longest element inω. Let w 1 ∈ Prf(w) be the shortest prefix ofw such that if u ∈ ω\ω is a non-recurrent prefix of xt inw then occur(w 1 , u) = occur(w, u). Such w 1 obviously exists, because ω is a finite set and non-recurrent factors have only a finite number of occurrences. Let w 2 be the shortest factor ofw such that w 1 w 2 xg ∈ Prf(w), occur(w 1 , x) < occur(w 2 , x), and w ∈ Prf(w 1 w 2 xg). Since xg is recurrent in w and w ∈ Prf(w) it is clear such w 2 exists. We show that Property 7 of Definition 2 holds. Let y ∈ Σ k be such that gy ∈ Prf(t). Suppose that occur(w 2 xg, xgy) > 0. It would imply that xgy is recurrent inw, since all occurrences of non-recurrent words from ω are in w 1 . But we defined xg to be the longest recurrent word ω. Hence it is contradiction to our assumption that occur(w 2 xg, xgy) > 0. Property 8 of Definition 2 and w ∈ Prf(w 1 w 2 xg) are obvious from the construction of w 2 . This completes the proof. We define the reversal w R of a finite or infinite word w = Σ * k ∪ Σ N k as follows: If w ∈ Σ * k and w = w 1 w 2 . . . w m , where w i ∈ Σ k and 1 ≤ i ≤ m, then w R = w m w m−1 . . . w 2 w 1 . If w ∈ Σ N,L k and w = . . . w 2 w 1 , where w i ∈ Σ k and i ∈ N, then w R = w 1 w 2 · · · ∈ Σ N,R k . Analogously if w ∈ Σ N,R k and w = w 1 w 2 . . . , where w i ∈ Σ k and i ∈ N, then w R = . . . w 2 w 1 ∈ Σ N,L k . Proposition 1 allows one to construct a right infinite α-power free word with a given prefix. The next simple corollary shows that in the same way we can construct a left infinite α-power free word with a given suffix. k,α , and occur(t, x) = 0 then there are finite words w 1 , w 2 , g such that Then the corollary follows from Proposition 1 and Proposition 2. Given k ∈ N and a right infinite word t ∈ Σ N,R k , let Φ(t) be the set of all left infinite wordst ∈ Σ N,L k such that F(t) ⊆ F r (t). It means that all factors of t ∈ Φ(t) are recurrent factors of t. We show that the set Φ(t) is not empty. Proof. Since t is an infinite word, the set of recurrent factors of t is not empty. Let g be a recurrent nonempty factor of t; g may be a letter. Obviously there is x ∈ Σ k such that xg is also recurrent in t. This implies that the set {h | hg ∈ F r (t)} is infinite. The lemma follows from König's Infinity Lemma [4, 8] . The next lemma shows that if u is a right extendable α-power free word then for each letter x there is a right infinite α-power free wordū such that x is recurrent inū and u is a prefix ofū. Lemma 5. If (k, α) ∈ Υ , u ∈ rext(L k,α ), and x ∈ Σ k then there isū ∈ rext(u, L k,α ) such that x ∈ F r (ū). Proof. Let w ∈ rext(u, L k,α ); Lemma 3 implies that rext(u, L k,α ) is not empty. If x ∈ F r (w) then we are done. Suppose that x ∈ F r (w). Let y ∈ F r (w) ∩ Σ k . Clearly x = y. Proposition 2 implies that there is (w 1 , w 2 , y, g, t) ∈ Γ (k, α) such that u ∈ Prf(w 1 w 2 yg). The proof of Lemma 2 implies that we can choose t in such a way that x is recurrent in t. Then w 1 w 2 yt ∈ rext(u, L k,α ) and x ∈ F r (w 1 w 2 yt). This completes the proof. The next proposition shows that if u is left extendable and v is right extendable then there are finite wordsũ,ṽ, a letter x, a right infinite word t, and a left infinite wordt such thatũxt,txṽ are infinite α-power free words, t has no occurrence of x, every factor oft is a recurrent factor in t, u is a prefix ofũxt, and v is a suffix oftxṽ. Proposition 3. If (k, α) ∈ Υ , u ∈ rext(L k,α ), and v ∈ lext(L k,α ) then there arẽ u,ṽ ∈ Σ * k , x ∈ Σ k , t ∈ Σ N,R k , andt ∈ Σ N,L k such thatũxt ∈ L N,R k,α ,txṽ ∈ L N,L k,α , occur(t, x) = 0, F(t) ⊆ F r (t), u ∈ Prf(ũxt), and v ∈ Suf(txṽ). Proof. Letū ∈ rext(u, L k,α ) andv ∈ lext(v, L k,α ) be such that F r (ū) ∩ F r (v) ∩ Σ k = ∅. Lemma 5 implies that suchū,v exist. Let x ∈ F r (ū) ∩ F r (v) ∩ Σ k . It means that the letter x is recurrent in bothū andv. Let t be a right infinite α-power free word over Σ k \ {x}. Lemma 2 asserts that such t exists. Lett ∈ Φ(t); Lemma 4 shows that Φ(t) = ∅. It is easy to see thatt ∈ L N,L k,α , because F(t) ⊆ F r (t) and t ∈ L N,R k,α . Proposition 2 and Corollary 1 imply that there are u 1 , u 2 , g, v 1 , v 2 ,ḡ ∈ L k,α such that This completes the proof. The main theorem of the article shows that if u is a right extendable α-power free word and v is a left extendable α-power free word then there is a word w such that uwv is α-power free. The proof of the theorem shows also a construction of the word w. Theorem 1. If (k, α) ∈ Υ , u ∈ rext(L k,α ), and v ∈ lext(L k,α ) then there is w ∈ L k,α such that uwv ∈ L k,α . Proof. Letũ,ṽ, x, t,t be as in Proposition 3. Let p ∈ Suf(t) be the shortest suffix such that |p| > max{|ũx|, |xṽ|, |u|, |v|}. Let h ∈ Prf(t) be the shortest prefix such that hp ∈ Prf(t) and |h| > |p|; such h exists, because p is a recurrent factor of t; see Proposition 3. We show thatũxhpxṽ ∈ L k,α . We have thatũxhp ∈ L k,α , since hp ∈ Prf(t) and Proposition 3 states that uxt ∈ L N,R k,α . Lemma 1 implies that it suffices to show that there are no g ∈ Prf(ṽ) and no r ∈ Σ * k \ { } such that rr ∈ Suf(ũxhpxg) and |rr| > |xg|. To get a contradiction, suppose there are such r, g. We distinguish the following cases. -If |r| ≤ |xg| then rr ∈ Suf(pxg), because |p| > |xṽ| and xg ∈ Prf(xṽ). This is a contradiction, since pxṽ ∈ Suf(txṽ) andtxṽ ∈ L N,L k,α ; see Proposition 3. -If |r| > |xg| then |r| ≤ 1 2 |ũxhpxg|, otherwise rr cannot be a suffix ofũxhpxg. Because |h| > |p| > max{|ũx|, |xṽ|} we have that r ∈ Suf(hpxg). Since occur(hp, x) = 0, |h| > |p| > |xṽ|, and xg ∈ Suf(r) it follows that there are words h 1 , h 2 such thatũxhpxg =ũxh 1 h 2 pxg, r = h 2 pxg and r ∈ Suf(ũxh 1 ). It follows that xg ∈ Suf(ũxh 1 ) and because occur(h 1 , x) = 0 we have that |h 1 | ≤ |g|. Since |p| > |ũx| we get that |h 2 pxg| > |ũxg| ≥ |ũxh 1 |; hence |r| > |ũxh 1 |. This is a contradiction. We conclude that there is no word r and no prefix g ∈ Prf(ṽ) such that rr ∈ Suf(ũxhpxg). Henceũxhpxṽ ∈ L k,α . Due to the construction of p and h we have that u ∈ Prf(ũxhpxṽ) and v ∈ Suf(ũxhpxṽ). This completes the proof. On Dejean's conjecture over largealphabets A proof of Dejean's conjecture Sur un théorème de Thue Sur les correspondances multivoques des ensembles Proof of Dejean's conjecture for alphabets with 5 A propos d'une conjecture de F. Dejean sur les répétitions dans les mots Transition property for cube-free words Overlap-free words and generalizations Last cases of Dejean's conjecture Some decision results on nonrepetitive words Subword complexity and power avoidance Two-sided bounds for the growth rates of power-free languages Growth properties of power-free languages Acknowledgments. The author acknowledges support by the Czech Science Foundation grant GAČR 13-03538S and by the Grant Agency of the Czech Technical University in Prague, grant No. SGS14/205/OHK4/3T/14.