4.3.1 Phases of a treeLet us call Φ v the set of numbers that can be phases of a node v and Φ, the set of the possiblephases of a tree is the uni<strong>on</strong> of all possible phases of its nodes: Φ = ∪ b Φ v . The set Φ may becountable or uncountable. Countable for example when α/(d − 1) is normal since there are atmost as many phases as nodes. Uncountable for example for the tree with all label 0, for whichfor each node, all phases in [0; 1) work. Nevertheless, the set of possible phases is dense is [0; 1).Indeed, at least all phases defined by the relati<strong>on</strong> (10) are in Φ. If φ is the phase of the root,then all nodes at level k have a phase which is the fracti<strong>on</strong>al part of:φ+α+i kd +α+i k−1d+ · · · + α + i 1= α( 1 dd k . . . 1 d ) + φ d k + i kd k + · · · + i 1d 1 , (16)with 0 ≤ i j < d for all j. C<strong>on</strong>versely all of these numbers are the phases of some node at level k.As k tends to infinity, by a proper choice of i 1 , . . . , i k the fracti<strong>on</strong>al part of this number canbe as close as possible to any number in [0; 1]. Thus the set of phases of the tree is dense in [0; 1].If the density isp(d−1)d n+k −d k(with n+k minimal) <strong>on</strong>e can show that the set of all possible phasesfor a given node is [ dm −1d−1 α; min( dm+1 −1d−1α, 1)) for some m ∈ 0, . . . , n + k − 1. As Φ is dense in[0; 1), it c<strong>on</strong>tains all of these intervals. Therefore, Φ = [0; 1) and the tree has exactly n + kdifferent factors of size greater than n + k. Hence its minimal graph has exactly n + k nodes.4.4 Equivalence between str<strong>on</strong>gly balanced and mechanical <strong>trees</strong>As we have seen in secti<strong>on</strong> 4.1, there are str<strong>on</strong>g relati<strong>on</strong>s between balanced and mechanicalwords. In this part, we will see that we can prove the same results between str<strong>on</strong>gly balancedand mechanical <strong>trees</strong>. This result is formally stated in the following theorem.A tree is ultimately mechanical if all nodes (except finitely many) are mechanical (i.e. satisfiesthe equati<strong>on</strong>s 8 or 9).Theorem 4.1. The following statements are true.(i) A mechanical tree is str<strong>on</strong>gly balanced.(ii) An irrati<strong>on</strong>al str<strong>on</strong>gly balanced tree is mechanical.(iii) A rati<strong>on</strong>al str<strong>on</strong>gly balanced tree is ultimately mechanical.This theorem is the analog of the theorem linking balanced and mechanical words. We haveseen that the word 0 k 10 ∞ is balanced but not mechanical, <strong>on</strong>ly ultimately mechanical. Itscounterpart for <strong>trees</strong> would be a tree with all label equal to 0 except for <strong>on</strong>e node which has alabel 1. The number 1 can be chosen as deep as desired, which shows that we can not boundthe size of the “n<strong>on</strong>-mechanical” beginning of the tree. A more complicated example is drawnFigure 8.Let us begin by the proof the first part of the theorem:Lemma 4.2.1. A mechanical tree is str<strong>on</strong>gly balanced.Proof. Let n, k ∈ N. For all node v, h v (n, k) is the number of 1 in the factor of size n and widthk rooted in v. We want to prove that for all pairs of nodes v and v ′ : |h v (n, k) − h v ′(n, k)| ≤ 1.We assume that the nodes v and v ′ are inferior of phase φ and φ ′ (the proof with superiorphases is similar).h v (n, k) − h v ′(n, k) = ⌊ dn+k − 1d − 1 α + φ⌋ − ⌊dk − 1d − 1 α + φ⌋ − ⌊dn+k − 1d − 1 α + φ′ ⌋ + ⌊ dk − 1d − 1 α + φ′ ⌋.16
Using the well-known inequality x − x ′ − 1 < ⌊x⌋ − ⌊x ′ ⌋ < x − x ′ + 1, <strong>on</strong>e can show that−2 < h v (n, k) − h v ′(n, k) < 2.As h v (n, k) and h v ′(n, k) are integers, we have −1 ≤ h v (n, k) − h v ′(n, )k ≤ 1 which ends theproof of the lemma.We will see in the next secti<strong>on</strong> 4.5 that a tree is rati<strong>on</strong>al if and <strong>on</strong>ly if its density can bepwritten asS(n,k)(p, k, n ∈ N), therefore we will do the proof of theorem 4.1 distinguishingstr<strong>on</strong>gly balanced tree with density of this form or not.Lemma 4.2.2. If A is a str<strong>on</strong>gly balanced tree of density α which can not be written as(p, k, n ∈ N) then A is mechanical.pS(n,k)Proof. let τ be a real number and v a node. At least <strong>on</strong>e of the two following properties is true:∀n ≥ 1 : h v (n) ≤ ⌊S(n)α + τ⌋, (17)∀n ≥ 1 : h v (n) ≥ ⌊S(n)α + τ⌋. (18)To prove this, assume that it is not true. Then there exists k, n such that h v (n) < ⌊S(n)α + τ⌋and h v (k) > ⌊S(k)α + τ⌋. In that case the number of 1 in the factor of size n, n − k (or k, k − nif k > n) is h v (n) − h v (k) ≤ ⌊S(n)α + φ⌋ − ⌊S(k)α + φ⌋ − 2 < dn −d kd−1α − 1 which violates theformula (7).Let us define now the number φ as the minimum τ that satisfies (17)φ = infτ{For all n : h v (n) ≤ ⌊S(n)α + τ⌋}.For all τ > φ, the equati<strong>on</strong> (17) is true, while for all τ ′ < φ, the equati<strong>on</strong> (18) is true. Thismeans that for all ɛ > 0 and all n:S(n)α + φ − ɛ − 1 ≤ ⌊S(n)α + φ − ɛ⌋ ≤ h v (n) ≤ ⌊S(n)α + φ + ɛ⌋ ≤ S(n)α + φ + ɛ. (19)Taking the limit when ɛ tends to 0 shows that:S(n)α + φ − 1 ≤ h v (n) ≤ S(n)α + φ. (20)Therefore, unless S(n)α + φ ∈ N, h v (n) = ⌊S(n)α + φ⌋ = ⌈S(n)α + φ − 1⌉.If there exists n ∈ N such that S(n)α + φ ∈ N, then there are no other k ∈ N (k ≠ n)psuch that S(k)α + φ ∈ N – otherwise that would violate the c<strong>on</strong>diti<strong>on</strong> α /∈ {S(n,k), p, k, q ∈ N}.Therefore, for this particular n, either h v (n) = S(n)α + φ = ⌊S(n)α + φ⌋ – in that case the nodeis inferior of phase φ – or h v (n) = S(n)α + φ − 1 = ⌈S(n)α + φ − 1⌉ – in that case the node issuperior of phase 1 − φ.Lemma 4.2.3. Let A be a tree such that there exist n and k such that all factors of size (n, k)have the same number of nodes with label 1. Then the tree is mechanical.Proof. Let us take n and k satisfying the property, such that n + k is minimal and let us callp is the comm<strong>on</strong> number of <strong>on</strong>es in the factors of size (n, k). Obviously, the tree as a densityα =p(d−1)d k (d n −1) .Let v be the root of the tree. The same proof as in the irrati<strong>on</strong>al case can be used to establishthat there exists φ such thatS(n)α + φ − 1 ≤ h v (n) ≤ S(n)α + φ,17