About Fibonacci trees. II -- generalized Fibonacci trees
aa r X i v : . [ c s . D M ] J u l About Fibonacci trees. − II − :generalized Fibonacci trees Maurice M argenstern
July 11, 2019
Abstract
In this second paper, we look at the following question: are the prop-erties of the trees associated to the tilings { p , } of the hyperbolic plane stilltrue if we consider a finitely generated tree by the same rules but rooted ata black node? The direct answer is no, but new properties arise, no morecomplex than in the case of a tree rooted at a white node, and worth ofinterest. The present paper is an extension of the previous paper [5]. The existence of a tree generating the pentagrid, i.e. the tiling { , } of thehyperbolic plane generalizes to the tilings { p , } in the same plane. This papercan be seen as an extension of the previous paper [5] which investigated thefollowing question: are the properties of the Fibonacci tree of the pentagrid stilltrue if we consider a tree rooted at a black node? As in [5], we shall see thatpreferred son property is no more true but that new properties, sightly morecomplex ones, arise in their place.In this new setting, we generalize what we called the golden sequence in [5]to what could be called a generalized Fibonacci sequence but which we shall callthe metallic sequences which we define in section 2: the Fibonacci sequenceis connected with the golden number which is the root of a polynomial whoseform is a particular case of the polynomials we shall meet in the paper. Inthat section too, we remind the reader some properties about infinite trees andnumbers connected with the rules which defines those trees. We shall definetwo kinds of them. One kind is studied in Section 3, the other in Section 4where we investigate the properties of a black metallic tree. In Subsections 4.1and 4.4 we indicate the connection of those trees with two infinite families oftilings of the hyperbolic plane. In Section 5, we compare the properties studiedin Sections 3 and 4, giving an explanation to the di ff erences we observed.Section 5 concludes the paper. 1 The metallic trees
In Subsection 2.1, we remind the reader with general definitions about infinitetrees with finite branching. Then, in Subsection 2.2 we introduce the definitionof the metallic trees and then of the metallic sequences we associate to them. Inthat section too, in Subsection 2.3 we look at the metallic representation of thepositive numbers as sums of terms of the metallic sequence and the connectionsof those numbers with the trees. We define addition and subtraction on therepresentations of metallic numbers in Subsection 2.4, which will help us toestablish the properties investigated in Sections 3 and 4.
Consider an infinite tree T with finite branching at each node. Number thenodes from the root which receives 1, then, level by level and, on each level,from left to right with the conditions that for each node, the numbers of itssons are consecutive numbers. We then say that T is numbered or that itis endowed with its natural numbering . In what follows, we shall considernumbered trees only. Clearly, a sub-tree S of T can also be numbered in the justabove described way but it can also be numbered by the numbers of its nodesin T . In that case, a node ν may receive two numbers: n S , the number definedin S as a numbered tree and n T , its number as a node of T . A node may haveno son, it is then called a leaf . A path from µ to ν is a finite sequence of nodes { λ i } i ∈ [0 .. k ] , if it exists, such that λ = µ , λ k = ν and, for all i with i ∈ [0 .. k − λ i + isa son of λ i . A branch of T is a maximal finite or infinite sequence of paths { π i } from the root of T to nodes of that tree such that for all i , j , π i ⊆ π j or π j ⊆ π i .Accordingly, a branch connects the root to a leaf or it is infinite. It is clear thatfor any node, they are connected to the root by a unique path. The length ofthe path from a node to one of its son is always 1. If the length of a path from µ to ν is k , the length of the path from µ to any son of ν , assuming that ν is nota leaf, is k +
1. The length of the path leading from the root to a node ν of T is called the distance of ν to the root ρ and it is denoted by dist { ρ, ν } . We alsodefine dist { ρ, ρ } =
0. The level k of T is the set of its nodes which are at thedistance k from its root. Denote it by L k , T . Define T n as the set of levels k of T with k ≤ n . Say that the height of T n is n . By definition, T n is a sub-tree of T .For each node ν of T , λ T ( ν ) is its level in T , i.e. its distance from the root, and σ T ( ν ) is the number of its sons. Clearly, if ν ∈ T n and if λ T ( ν ) = n , then σ ( ν ) = S is a sub-tree of T , denote it by S ⊳ T , and if ν ∈ S , then λ S ( ν ) ≤ λ T ( ν ) andthe numbers may be not equal.Consider two infinite numbered trees T and T . Say that T and T are isomorphic if there is a bijection β from T onto T such that: f ( n T ) = n T for any n ∈ N . λ T ( f ( n T )) = λ T ( n ). σ T ( f ( n T )) = σ T ( n ). (0)2 .2 Metallic trees and metallic numbers We call metallic tree a finitely generated tree with two kinds of nodes, black nodes and white ones whose generating rules are: B → BW p − and W → BW p − . (1)with p ≥ status .We shall mainly investigate two kinds of infinite metallic trees. When theroot of the tree is a white, black node, we call such a metallic tree a white , blackmetallic tree respectively. We denote the infinite white metallic tree by W andwe endow it with its natural numbering. We do the same with the infinite blackmetallic tree B . Note that we can construct a bijective morphism between B and a part B of W as follows. The morphism is the identity on B and we fixthe following conditions: σ B (1) = σ W (1) − σ B ( n ) = σ W ( n ), for all positive integer n .Moreover, the nodes numbered by n ∈ [1 .. p −
2] in W also belong to B andreceive the same numbers in the natural numbering of B . This morphismallows us to identify B with B , so that in our sequel, we shall speak of B only. From what we just said, it is plain that for a node ν ∈ B , if ν B > p − ν B < ν W . We shall look closer to the connection between ν B and ν W inSection 5.Before turning to the properties of W and B separately, we shall study theconnection of the numbering with respect to properties which are associatedwith the rules (1).To that purpose let m n , b n be the number of nodes on L n , W and L n , B re-spectively. We also define M n , and B n as the number of nodes of W n and B n respectively.The connection with the metallic sequence first appear when we count thenumber of nodes which lay at the same level of the tree. For a white metallictree, we have the following property:T heorem [2] Consider the numbers m n defined as the number of nodes on L n , W ,where W is the white metallic tree. The numbers m n satisfy the following inductionequation: m n + = ( p − m n + − m n with m = and m − = . (2) We call white metallic sequence the sequence { m n } n ∈ N . Proof. Note that each node gives rise to p − p − m n is the number of nodes on the level n , we have that m n + = ( p − m n + − m n as the number of black nodes on the level n + m n from what was just saidand as in considering ( p − m n + , we count twice the black nodes yielded by theblack nodes of the level n + (cid:3)
3s the black metallic tree is defined by the same rules, we may concludethat the same equation rules the sequence { b n } n ∈ N :T heorem The sequence { b n } n ∈ N of the number of nodes on L n , B satisfies the equation:b n + = ( p − b n + − b n with b = p − and b = . (3) We call black metallic sequence the sequence { b n } n ∈ N . Note that we could define the white metallic sequence by the initial con-ditions m = p − m =
1. In our sequel we shall say metallic sequence instead of white metallic sequence for a reason which will be made more clearin a while.Before turning to the properties of the integers with respect to the metallicnumbers, we have to consider the numbers M n and B n already introduced withrespect to the finite trees W n and B n .T heorem [3] On the level k of W , with non-negative k, the rightmost node has thenumber M k , so that the leftmost node on the level k + has the number M k + .On the level k of B with non-negative k, the rightmost node has the number m k , sothat the leftmost node on the level k + has the number m k + .The sequence { M n } n ∈ N satisfies the following induction equation:M n + = ( p − M n + − M n + , (4) with the initial conditions M = and M − = , while the sequence { B n } n ∈ N satisfythe equation (2) with the same initial conditions, which means that B n = m n for anynon-negative n. We also have:M n + = B n + + M n and m n + = b n + + m n (5)Proof. Consider the numbers M n . We can write: M n + = n + X i = m i = n X i = m i + + m + m = n X i = m i + + p − = ( p − n X i = m i + − n X i = m i + p − = ( p − M n + − M ) − M n + p − b + b = p − p − n X i = b i + = ( p − B n + − B ), sothat the sequence satisfies (2) with the same initial conditions. Another way tosee that is to observe that from the decomposition of W = B ∪ C with
B ∩ C = ∅ we can see that W n + = B n + ∪ C n . Indeed, C is isomorphic to W if we takeinto account that the image of the root of C is the rightmost son of L , W , so that M n + = B n + + M n . Taking the trace of the decomposition W n + = B n + ∪ C n on L n + , W , we get that m n + = b n + + m n . Accordingly, B n is the di ff erence of twoterms of the sequence defined by (4), so that the equation satisfied by B n isobtained from (4) by cancelling the term +
1. So that B n satisfies (2) with thesame conditions and so, B n = m n for any n in N . (cid:3) .3 Metallic representation of the natural numbers and metal-lic codes for the nodes of the metallic trees . Let us go back to the sequence { m n } n ∈ N of metallic numbers. It is clear thatthe sequence defined by (2) is increasing starting from m : from (2), we getthat m n + > ( p − m n + if we assume that m n < m n + . As p ≥
5, we get that thesequence is increasing starting from m . Now, as the sequence is increasing, itis known that any positive integer n can be written as a sum of distinct metallicnumbers whose terms are defined by Theorem 1: n = k X i = a i m i with a i ∈ { .. p − } . (6)The sum of a i m i ’s in (6) is called the metallic representation of n and the m i ’sin (6) are the metallic components of n .From now on, we use bold characters for the digits of a metallic representa-tion of a number. In particular, we define d to represent p − c to represent p − e to represent p − p >
5. Of course, , , and represent 0, 1, 2 and3 respectively.First, note that the representation (6) is not unique.L emma [6, 3] For any integers n and h with ≤ h ≤ n, we have: ( p − m n + + n X k = h + ( p − m k + ( p − m h = ( p − m n + + n X k = h + ( p − m k + ( p − m h + − m h + m h − (7)C orollary [6, 3] For any positive integer n, we have: ( p − m n + + n X k = ( p − m k + ( p − m = m n + (8)Proof. By induction on the starting index in the summing sign, Lemma 1 showsus that: ( p − m n + + n X k = h + ( p − m k + ( p − m h = m n + − m h − . (9)The corollary follows immediately from (9) by making h = m − = p − m h of the left-hand sideof (7) can be developed as follows:( p − m h = ( p − m h − m h = m h + − m h + m h − .Putting the right-hand side of that computation into the left-hand side memberof (7) we get its right-hand side member. (cid:3) a i ’s of (5) as a word a k ..a a which we call a metallicword for n as the digits a i which occur in (5) are not necessarily unique fora given n . They can be made unique by adding the following condition onthe corresponding metallic word for n : the pattern dc ∗ d is ruled out from thatword. It is called the forbidden pattern . Lemma 1 proves that property whichis also proved in [6, 3]. We reproduced it here for the reader’s convenience.When a metallic representation for n does not contain the forbidden patternit is called the metallic code of n which we denote by [ n ]. We shall write ν = ([ ν ]) when we wish to restore the number from its metallic code. Let us call signature of ν the rightmost digit of [ ν ] = a k .. a a and denote it by sg . Let σ , σ , ..., σ k with k = p − k = p − ν . We call sons signature of ν the word s ...s k , where s i = sg ( σ i ). We need to define additions and subtractions on metallic codes. For the addi-tion, we have the following algorithm:
Algorithm 1
Adding two codes: a k ...a and b k ...b . The digits are denoted by a ( i ) and b ( i ) , a and b being seen as tables. Also s is a table. We use global a ff ectationsto update a , b , s and the auxiliary table carry in order to shorten the writing of thealgorithm. carry : =
0; completed : = false ; test : = while not completed loop for i in [0.. k ] loop s ( i ) : = a ( i ) + b ( i ); if s ( i ) ≥ ( i +
1) : = carry ( i + + if i > then carry ( i −
1) : = carry ( i − + end if ; s ( i ) : = s ( i ) − ; end if ;test : = X carry ( i ); if test = then completed : = true ; else a : = s ; b : = carry ; carry : = end if ; end loop ; end loop ;Of course, if the forbidden pattern occurs, we convert if to the correct form:we replace the pattern by the same number of digits appending one to the6rst digit which is on the left-hand side of the pattern. Note that severalforbidden patterns may occur in the result of Algorithm 1. Now, that algorithmcan be used to eliminate the occurrences of forbidden patterns in the metallicrepresentation of a number.To that purpose, note that the equation (2) can be rewritten as follows:( )( k + ) = ( k ) (10)as far as ( ) = p − , [ m k ] = k and, by convention, ν = ( [ ν ] ). Accordingly,appending at some place k involves a carry 1 on two places: k + k − dc k d ) = ( k + )In fact, the relation (9) given in the proof of Lemma 1 can be rewritten as:( dc k d0 h ) = ( k + h − ) . (11)which means that if the pattern dc k d occurs with its right-hand side d at theplace a and its left-hand side one at the place a + k +
1, increasingly numbering theplaces from right to left, the pattern is replaced by k + ’s at the same place anda carry is put at the places a + k + h −
1. As a consequence, if a forbiddenpattern occurs among the metallic code of a number, we replace the pattern bythe needed number of ’s at the same places and we add to that new numberwith the help of Algorithm 1, the number whose representation is given in theright hand-side part of (11). From this, we can see that such an operation isrepeated until no forbidden pattern occurs.Now, we can turn to the subtraction of two numbers a and b performed ontheir metallic codes, which we may assume to be free of any forbidden pattern.We decompose the subtraction of b from a into three parts. First, we checkwhether a > b directly on [ a ] and [ b ] . If it is not the case, the subtractionis not possible unless a = b and the algorithm stops here. If it is the case,by appending possible leading ’s, we may assume that [ a ] and [ b ] have thesame length. Let us consider the codes [ a ] and [ b ] as tables. We denote by [ a ] ( i ), [ b ] ( i ) the digit of [ a ] , [ b ] respectively, which occurs at the place i , where i is the place of the digit which is the coe ffi cient of m i , the metallic compo-nent of a , b respectively. We assume to read the places from right to left,starting from place 0. The second operation consists in constructing in a ta-ble [ c ] , the complement to m k , i.e. where c is defined by c + b = m k , k beingthe length of [ b ] . Let us write a = α k m k + a and b = β k m k + b . We may assume α k > β k : otherwise, a − b is not changed if we remove from both numbersthe equal leading digits until we find the unequal ones, as we assume a > b .Then, a − b = ( α k − β k ) m k + a − b = (( α k − − β k ) m k + ( m k − b ) + a . Note that α k − ≥ β k . Accordingly, provided we may define the complement of b to m k ,we reduced the subtraction to three additions.First, we define the comparison algorithm, again, assuming that the num-bers are given in metallic representations which are free from forbidden pattern.7 lgorithm 2 Comparison of a and b from [ a ] and [ b ] . We assume that the lengths ofthe corresponding tables are equal. The answer is given by the variables bigger and smaller . bigger : = false ; smaller : = false ; for i in [0.. k ] in reverseloop if [ a ] ( i ) , [ b ]( i ) then if [ a ] ( i ) > [ b ]( i ) then bigger : = true ; else smaller : = true ; end if ; exit ; end if ; end loop ;In order to write the algorithm computing the complement to m k ,we intro-duce an additional convention. If [ a ] is the metallic code of a number, [ a ]( u .. v ) is a sub-word of [ a ] going from the place u to the place v , assuming that u ≤ v .In the algorithm, [ a ]( u .. v ) can be a value and it can be addressed a value by af-fectation or by an operation. The addition described by Algorithm 1 is denotedby ⊕ .The first idea is to take dc k − d instead of k in order to represent m k . Weagain denote dc k − d by [ a ] . We use this trick as far as for most digits [ b ] ( i ),they are not greater than c . But for a few of them, we may have [ b ] ( i ) > [ a ] ( i ).When it is the case, we say that we have an inversion at i . Note that i < k as [ a ] ( k ) = d . Assume that the first digit of [ b ] is less than d . In that case, wesplit [ a ] as follows: [ a ] (0 .. k ) = [ a ] ( i + .. k ) + [ a ] (0 .. i ), and we perform the followingtransformations. Taking an auxiliary table aux of size k + ’s, we define aux (0 .. i ) = [ a ] (0 .. i ), then we set [ a ] ( i +
1) to [ a ] ( i + − [ a ] (0 .. i ) = dc i − d . Call these changes the lifting . Note that a lifting leaves [ b ] unchanged but it changes the value of a by subtracting ([( a )] (0 .. i ) ) . It is thereason why we saved the replaced digits of [ a ] in aux . However, the result ofthe lifting will eventually put in [ a ] digits which are never less than those of [ b ] ,so that the subtraction can be performed digit by digit. Now, as we changedthe value of a , we have to add the value of the saved digits to the result wehave obtained. However, there may be several inversions in b . Moreover, thelifting may raise a new inversion. Nonetheless, the inversion will eventuallylead to a new value of [ a ] whose digits are not less than the corresponding digitsof [ b ] . Before turning to the situation of several liftings, note that after the firstlifting, we have to add the digits we have to save to the current value of aux :we should not forget the former values, as each lifting consists in subtracting avalue from [ a ] which must be added to the final subtracting digit by digit.8 lgorithm 3 We assume that [ a ] (0 .. k ) = dc k − d that the length of [ b ] is k + . Theresult is in [ c ] . aux(0 .. k ) : = k +
1; inversion : = false ; while not inversion loop for i in [0.. k ] in reverseloop if b ( i ) > a ( i ) then inversion : = true ; place : = i ; exit ; else inversion : = false ; end if ; end loop ; if inversion then aux(place + .. k ) : = aux ⊕ [ a ] (place + .. k ); [ a ] (place +
1) : = [ a ] (place + − [ a ] (0..place) : = dc place − d ; end if ; end loop ; for i in [0.. k ] loop [ c ] ( i ) : = [ a ] ( i ) − [ b ] ( i ); end loop ; [ c ] : = [ c ] ⊕ aux;Presently, let us look closer at the lifting of an inversion. We defined theplace i where the inversion occurs and acted on the digit at i + .. i ) of [ a ] . The change [ a ] ( i +
1) : = [ a ] ( i + − [ a ] ( i + = [ b ] ( i +
1) before the lifting. Remember that, by definition of theinversion, [ a ] ( i + ≥ [ b ] ( i +
1) before the lifting. In that case, a new inversionoccurs at i +
1. Now, we claim that to the left of the place of the first liftingand in between an occurrence of d in [ a ] to the next one to the right, we mayalways assume that there is an index j such that [ a ] ( j ) > [ b ] ( j ). It is plain for twooccurrences of d inside [ b ] as there is no forbidden pattern in [ b ] . Consider thecase of the first lifting. It may happen that [ a ] ( j ) = c for all j ∈ [ i + .. k ]. In thatcase, the first lifting raises an inversion at i +
1. A new lifting raises a new oneat i + i . This process is repeated until theinversion occurs at k −
1. Now, at k − d occurs now in k −
1. The inversion at i is still present, so that theprocess is repeated until the lifting occurs at k −
2, placing d at this place. Wecan see that the process is repeated until d is placed at i +
1. At that moment,the lifting replaces d by c , so that presently [ a ]( i + = [ b ] ( i + [ a ] and [ b ] from the place k to the place i + [ a ] ( i ) = d while [ b ] ( i ) = d too, so that those digits areequal too. The proof of the correctness of Algorithm 3 is completed. (cid:3) We conclude that subsection by looking at two additional algorithms: one9or incrementing the metallic code of a number and the other for decrementingit. For these operations, we need an algorithm which transforms a metallic rep-resentation of n into its metallic code [ n ] which does not contain any occurrenceof the forbidden patterns. We start with that algorithm: Algorithm 4
The representation is given in a , a ( i ) being its i th digit. warning : = false; i : = while i ≤ k loop if a ( i ) = dthen if not warning then warning : = true ; init : = i ; i : = i + else if a ( i ) = dthen final : = i ; for j in [init..final] loop a ( i ) : = end loop ; if init > then a (init −
1) : = a (init − + end if ; a (init +
1) : = a (init + + i : =
0; warning : = false ; exit; else if a ( i ) < cthen warning : = false ; end if ; i : = i + end if ; end if ; else if a ( i ) < cthen warning : = false ; end if ; i : = i + end if ; end loop ;Note that Algorithm 4 eliminates all forbidden pattern from the metallic repre-sentation of n .Thanks to that algorithm, we assume that we consider the metallic codeof n , i.e. the metallic representation of the number which is free of forbiddenpattern. Denoting Algorithm 1 by ⊕ and the subtraction by ⊖ , we might definethe operation of incrementing [ n ] by [ n ] ⊕ and the operation of decrementingthe same code by [ n ] ⊖ . However, for those particular operations, it is possibleto provide simpler algorithms, see Algorithm 5 and Algorithm 6, below.10 lgorithm 5 Algorithm for writing [ n + ] knowing a = [ ν ] . if a (0) = dthen a (0) : = a (1) : = a (1) + else if a (0) < cthen a (0) : = a (0) + else i : = while a ( i ) = cloop ( i ) : = i + end loop ; if a ( i ) < dthen a (0) = d ; else for j in [0.. i ] loop a ( j ) : = end loop ; a ( i +
1) : = a ( i + + end if ; end if ; end if ; Algorithm 6
Algorithm for writing [ n − ] knowing a = [ ν ] .i : = while a ( i ) = loop ( i ) : = i + end loop ; a ( i ) : = a ( i ) − for j in [0.. i − loop a ( j ) : = c ; end loop ; if i ≥ then a ( i − = d ; end if ;Note that a is supposed to be a metallic code and that, accordingly, the resultis a metallic code too. From these algorithms, we can see that successivelyincrementing [ n ] , the change behaves as if [ n ] were written in basis p − dc ∗ d occurs as a su ffi x of [ n + m ] . Then, the pattern is replaced bythe same number of ’s as its length and by adding a carry 1 to the rest of therepresentation. We shall also use that property in the proofs of the propertieswhich will be reported in Sections 3 and 4. After defining the basic operations on the metallic code we shall use in thissection and in the next ones, we look at the metallic codes of the numbers wemet about the metallic trees, namely m n , b n , M n and B n . From Theorem 3 and11he relations (5), we have:L emma In the white metallic tree, the number of nodes on the level n is m n and [ m n ] = k . The rightmost node on that level is M n and [ M n ] = k + .In the black metallic code, the number of nodes on the level n is b n and [ b n ] = c n − d .As B n = m n , we conclude that [ B n ] = k . Proof. The metallic codes of m n , hence for B n are trivially computed. For [ b n ] ,we apply the proof of the correctness of Algorithm 3. Indeed, it appears from b n + = m n + − m n that [ b n + ] is the complement to m n + of m n . Writing [ b n + ] as dc n − d and [ m n ] as n , we immediately get that [ b n + ] = c n d , as far as all digitsof [ m n ] or not greater than the corresponding ones of dc n − d . (cid:3) Consider the white metallic tree W . We can prove the following result:L emma Denote by B , n , W , n , ..., W d , n , W , n and W , n the metallic sub-treesof W of height n rooted at the nodes , , ..., d , and the sons of the root . Denoteby ρ , n , ρ , n , ..., ρ d , n and ρ , n and ρ , n the rightmost node of the respective sub-treeson the level n + of W . We get that: [ ρ , n ] = n − , [ ρ , n ] = n − ,..., [ ρ d , n ] = d01 n − , [ ρ , n ] = n , [ ρ , n ] = n + , (12)Proof. From Lemma 2, we know that the rightmost son of L n , W is M n andthat [ M n ] = n + . We also know that [ b n ] = c n − d . Accordingly, we obtain that [ ρ , n ] = n + ⊕ c n − d , which can be computed by Algorithm 1. The computationgives rise to: ... ... cd1d ... d0 ... d01 11d ... ... ...
111 120 ... which prove the result for ρ , n . Now, for the following nodes, we simply append m n at each step and, as [ m n ] = n , we get the result of the lemma up to ρ d , n beingincluded. For the two rightmost sub-tree, we have that [ ρ , n ] = [ ρ d , n ] ⊕ m n andthat [ ρ , n ] = [ ρ , n ] ⊕ m n , i.e. : ... ... ... ... ... ... The proof of the lemma is completed. (cid:3)
We can now state the following property:T heorem In a white metallic tree, for any node ν we have that among its sons asingle one has [ ν ]0 as its metallic code, which is called the preferred son of ν . Inorder to find out which son of ν is its preferred one, we distinguish two kinds of white odes : w ℓ and w r . In a black node and in a w ℓ -node, its preferred son is its last one.In a w r -node, its preferred son is its penultimate one. Moreover, the nodes obey thefollowing rules : b → bw p − ℓ w r , w ℓ → bw p − ℓ w r , w r → bw p − ℓ w r w r . (13) Denote p − by d , p − by c , p − by e and by a any digit in [ .. d ] . We also have thefollowing rules on the signatures where type and signature are associated on the lefthand-side of the rule: b1 , b2 → b2 ( wa ) p − w0 , wa → b1 ( wa ) p − w0 , w0 → b1 ( wa ) p − wcw0w1 , w1 → b2 ( wa ) p − wdw0w1 , (14) so that wa is a w ℓ -node while w0 and w1 are w r -nodes. At last, for any non-negativeinteger k, m k + is the preferred son of m k . Proof. Figure 1 illustrates the properties stated in the theorem. In the figure, p = w ℓ -nodes, in green for w r -nodes. Moreover, green nodes which are also preferred sons of their father arerepresented by a green disc with a red border. d c1 c2 cd d0 d1 d2 dc dc1 dc2 dcc d Figure 1
The white metallic tree. Partial representation of the first three levels ofthe tree when p = with the conventions mentioned in the text. The figure is intended to help us to perform the proof of Theorem 4.In our proof and later on, we denote by W ν the white metallic tree rooted atthe white node ν , and by B β the black metallic tree rooted at the black node β .Later, in the index, the occurrence of n will indicate that we consider the sub-treeof height n issued from the same root.First, note that although Lemma 3 seems to give global information andalthough it is precise on the extremal branches of each sub-tree only, it can be13sed for more local information, provided we know the distance of a node ν from the borders of the sub-tree containing ν we consider.As an example, consider the location of the nodes m n . We have seen thatLemma 3 proved that [ ρ , n ] = n + and that [ m n ] = n . Let us look at what itmeans on levels 1, 2 and 3. On level 1, [ m ] = , so that it is the penultimate sonof the root 1. On level 2, [ m ] = , so that its distance from M , the rightmostnode of level 2 is which can be split into m + m . Now, m is the distancefrom ρ , to ρ , , so that m = m to ρ , : indeed, thelevel 1 of W is on the level 2 of W . Accordingly, m is the penultimate son ofthe root m of W . The same decomposition for M − m shows us that inside W at which we arrive thanks to m which is the distance from ρ , to ρ , .Define π to be ρ , , the root of W . Then, define π to be the root of thesub-tree of W rooted at m +
1. By m , we arrive from the rightmost node of L W π , to a node π on the level 2 of W which is at the distance m from m .Accordingly, m ∈ W m and m is the penultimate son of m .By induction, denote π n the node of the level n of W which is in between m n and M n at the distance m from m n . Also, assume that the distance of m n from ρ , n − is m n − as already known allows us to cross the sub-trees W π ,..., W π n whose heights are n −
1, ..., 0 respectively. On the level n + W ,when we go from ρ , n to m n + , the level of the crossed nodes is n in W π , ...,1 in W π n respectively and the number of nodes which are crossed is m n , ..., m respectively. Accordingly, after crossing n X i = m i nodes from ρ , n , we arriveto the rightmost son of π n : it is the level 1 of W m n . It is π n + and we remainwith the crossing of that node in order to reach m n + , consuming m , so that wecrossed M n + − m n = M n nodes. This proves that m n + is the penultimate sonof m n and we proved the induction hypothesis. Accordingly, the last propertystated in Theorem 4 is proved.Let us prove the other assertions of the theorem. Applying Algorithms 5and 6, we assume that those properties are true for all nodes whose number isat most ν : it means that it is true for all nodes of W n , where n + ν and, on the level n + µ is less than ν . Thecomputations of Lemma 3 show us that the relations (13) and (14) are true forthe nodes of level 1: they are immediate consequences of (12).Assume that ν is the leftmost node on the level n +
1. Its number is M n + [ ν ] = n as deduced from Lemma 3. Let σ be the leftmost node of ν .From the same lemma, [ σ ] = n + , so that the repetition of Algorithm 5 showsus that the son signature of ν is so that we have the rule → .. d0 .Next, we display the proof in Table 2 which concentrates the computationsperformed by the iterated application of Algorithm 5. Denote by σ ℓ ( ν ), σ r ( ν ) theleftmost, rightmost son respectively of ν . From the definitions we easily get: σ ℓ ( ν + = σ r ( ν ) + sg ( σ ℓ ( ν + = sg ( ν ) ⊕ . (15)To better understand the construction of the table, we make use of Table 1 whichgive the possible sons signatures of a node assuming the signature of its leftmost14on. By induction hypothesis, we assume that we have sg ( σ ℓ ( ν )) ∈ { , } for thenode ν , wheter it is black or white. Tables 1 and 2 also take into account thata black node has ( d ) sons and that a white one has ( ) of them. Note that c isfollowed by if and only if a su ffi x dc ∗ occurs in [ ν − . When going from thesons of the node ν to those of the node ν +
1, we shall use the following remark:we also shall consider π r ( ν ) the penultimate son of ν . Table 1
Auxiliary table for the computations of the sons signature in a white metallictree. We remind the reader that e satisfies e − + = c . The bullet • indicates the part ofthe table used by a black node. ... c d • ... e c d ... e c 0 ... c d 0 ∗ ... c 0 1 ∗ ... d 0 1 ∗ ... Table 1 indicates the possible sons signatures according to the signature ofthe leftmost son of a node. The nodes are mentioned by their position as sonsof the node, from up to d for a black node, up to for a white one. For theson , we indicated the signatures , and , the last two ones only occurringin the relations (14). The signature for a black node does not occur in a whitemetallic tree: we shall prove that property. Table 2
Computation of the sons signatures in the white metallic tree. To left, ν whichis supposed to observe the relations (14) . To right, the node ν + . Ca Ca ⊕ b Ca − ... Ca − d Ca0w Ca − ... Ca − c Ca − d Ca0 w Ca1 ... Cac Cad Ca + C0 − C + wd Cc1 ... Ccc Ccd Cd0 w0 Cd1 ...
Cdc C +
00 C + − ... Cc − c Cc − d Cc0 w0 Cc1 ... Ccc C +
00 C + C + + w0 Cd1 ... Cdc C +
00 C +
01 b1 C + ... C +
0d C + + ... C +
0d C +
10 C + C01 C02 w1 C + ... C +
0d C +
10 C +
11 b2 C + ... C +
0d C + Using (15) and Table 1, Table 2 computes the transition from ν to ν + [ ν ] as Ca , with a = sg ( ν ). In the table, a − is the digit defined by a − = a ⊖ and a + = sg ( a ⊕ ). We can see that when a = c , we have a + = d and we have a + = only if C contains a su ffi x of the form dc ∗ .15n part of Table 2, we have in the left-hand side as ν either a black node or a wa -node, with a , and a , . The node ν + wa -node in the case when ν isblack. It is also the case for a wa -node, provided that a + , . The computationdirectly proceeds from Table 1: line applies here.In part , we have that sg ( ν + = . We have two cases: the case when C has not a su ffi x of the form dc ∗ , the first line of part , and the case when it doeshave it: the second line. In the first line, as C does not end with dc ∗ , we canwrite Ccd and then, for the rightmost son,
Cd0 . In the second line, we can write Cc − d as far as cc ∗ d is a permitted pattern. In the right-hand side of the sameline, we arrive to Cc ∗ c for the son c , but Cc ∗ d is a forbidden pattern so that weget C + , where C + = C ⊕ . Note that line of Table 1 applies here in both casesand in both cases too, the rightmost son of ν + w1 -node, a node which wedid not meet yet.In part , we deal with the case when ν is a w0 -node. Up to now, we haveseen two such cases: The case when such a node is the rightmost node of ablack node or of a wa -node. In that case, ν + . We also met the case when ν is the penultimatenode of a w0 -node. The situation is given in the second line of the right-handside of part , an application of the line of Table 1.At last, in part , we have that ν is a w1 -node, a node which appeared in theright-hand side of part . As it is the rightmost node of a white node, ν + of Table 1 again applies but we need only the sons upto d .The table show us that we always used the lines , and of Table 1 andthat the other lines never appear in the new configurations. Accordingly, (14)is proved for ν + (cid:3) Before turning to the next subsection, we go back to a property we noticedwith the proof of (12) in Lemma 3. We have seen that m k + is the preferred sonof m k and that it is the penultimate son of that latter node. So that from theroot of W , we have a branch whose nodes have that additional property thatthe root excepted, all nodes are preferred sons of the previous node accordingto the son-father order. In fact many branches do possess a similar property.Consider a node ν and let T ν be the sub-tree of W rooted at ν . We call the branch of T whose nodes, the root possibly excepted, have thesignature , so that they are the preferred son of the previous node. We caninfer that property from the recursive application of the rule applied to w0 -nodes, namely the rule w0 → b1 ... wcw0w1 which is applied to the penultimatenode in the right-hand side of the rule. The computations which we performedin Lemma 3 can be applied to the nodes ρ a , n for a ∈ { .. d , } . For such a node ν , which is of the form M n − km n , with k ∈ { .. p − } , and whose metallic code is a01 n − . A node at the level h from ν belonging to the -branch issued from ν ,is at the distance M h from ρ a , n + h . The computation gives the same result as theiterated application of the above rule: a01 n − h .16 Properties of the black metallic tree
As defined in Subsection 2.2, the black metallic tree B is defined by the samerules as the white one, the di ff erence being that the root of B is a black node.We know that the number of nodes on the level n of B is b n which satisfies (3).We also know that B n = m n . Accordingly, the nodes of the rightmost branch of B are numbered by m n and their metallic code is n .We can formulate an analogous version of Lemma 3.L emma Let B be the black metallic tree dotted with its natural numbering. As forLemma , denote by B , n , W , n , ..., W d , n and W , n the metallic sub-trees of B ofheight n rooted at the nodes , , ..., d and the sons of the root . Denote by ϕ , n , ϕ , n , ..., ϕ d , n and ϕ , n the rightmost node of the respective sub-trees on the level n + of B . We get that: [ ϕ , n ] = n − d , [ ϕ , n ] = n − d ,..., [ ϕ d , n ] = c n d , [ ϕ , n ] = n + . (16)Proof. The proof is the same as for Lemma 3: we subtract m n from ϕ , n andwe repeat until we reach ϕ , n . At each step, we apply the subtraction usingAlgorithms 2, 3, 1 and 4. (cid:3) We shall see that the properties of the sons signatures of the nodes in theblack metallic tree are di ff erent from those we have noted in the white one.Figure 2 illustrates the black metallic tree for p = W and B . We shall goback to that comparison in Section 5, illustrated by Figure 6 in that section. d c0 c1 cc cd d0 d1 dc cc0 ccd cd0 cdc d00 dc0 dcc Figure 2
The black metallic tree. The same convention about colours of the nodesand of the edges between nodes as in Figure is used. We can see that the preferredson property as stated in Theorem is not true in the present setting. Figure 2 shows us that the preferred is no more true. The leftmost son ofa level, a black node, has no son whose signature is . All other nodes havea son whose signature is , and among them, the last node of a level has two17ons whose signature is . Now, for a node ν which has a unique son whosesignature is , the metallic code of that node is not [ ν ]0 but it is [ µ ]0 , where µ = ν −
1. Call successor of the node ν , the node whose metallic code is [ ν ]0 . Wecan state:T heorem Define types for the nodes of a black metallic tree as follows: b0 , b1 for ablack node whose signature is , respectively, w0 for a white node whose signatureis and wa for a white node whose signature is not . We have the following rules onthe types of the nodes and the signatures : b0 → b0 ( wa ) p − , b1 → b1 ( wa ) p − , wa → b0 ( wa ) p − , w0 → b0 ( wa ) p − w0 . (17) For any node ν which is not the rightmost one on a level, the successor of ν isthe leftmost node of ν + . For the rightmost node on the level n, its successor is therightmost node on the level n + . We also have that the type b1 occurs for the leftmostnode of a level only and that the type w0 occurs for the rightmost node of a level only. Proof. We again use Table 1. But this time, the lines and of the table will beused by all the nodes and the other lines of the table will not be used. Table 3
Computation of the sons signatures in the black metallic tree. To left, ν whichis supposed to observe the relations (17) . To right, the node ν + . In the table, a ≤ c if C does not contain the su ffi x dc ∗ and the value a = c is ruled out if C contains that su ffi x. C1 C2 b1 C01 ...
C0c C0d w2 C10 ...
C1c − C1c C1d2
Ca Ca + wa Ca − ... ... Cc − c Cc − d wa + Ca0 ...
Cac − Cac Cad3
Cd C + wd Cc0 ... ... Ccc Ccd b0 Cd0 ...
Cdc − Cdcw0 Cd0 ...
Cdc − Cdc C + Cc C + wc Cc − ... ... Cc − c Cc − d b0 Cc0 ... Ccc − Cccw0 Cc0 ...
Ccc − Ccc C + C0 C1 b0 C − c0 ... ... C − ccb0 C − d0 ... ... C − dcw0 C − c0 ... ˙.. C − cc C00w0 C − d0 ... ˙.. C − dc C00 w1 C00 ... C0c − C0c C0db1 C01 ...
C0c C0d
We can see that under the assumptions of (17) applied to the left-hand side ofthe table, the right hand-side also observes the rules of (17). Table 3 also showsthat the position of the successor is that which is indicated in the statement ofthe theorem. We can also see that what is said in that statement for the b1 -nodesand for the w0 -ones is observed. Accordingly, Theorem 5 is proved. (cid:3) m k + is the preferredson of m k . { p , } and { p + , } of the hyperbolic plane As mentioned in the introduction, the white metallic tree is connected withthe tilings { p , } and { p + , } of the hyperbolic plane with p ≥
5. Those tilingsare generated by the reflection of a basic polygon in its sides and the recursivereflections of the images in their sides. The basic polygon is the regular convexpolygon with p , p + π π { p , } , { p + , } respectively. Figure 3
The tilings generated by the white metallic tree with p = . To left, thethe tiling { , } to right, the tiling { , } Figure 4
How the white metallic tree generates the tilings { , } and { , } : thesectors are delimited by colours, each sector being associated with three colours whichare attached to the status of the nodes. Each sector in the above figures is spannedby the white metallic tree. { , } , left hand side, and the tiling { , } , righthand side, associated to p = sector , can be put in bijection with thenodes of the tree. In the case of the tiling { p , } , such a sector is a quarter ofthe plane: it is delimited by two perpendicular half-lines stemming from thesame vertex V of a tile τ and passing through the other ends of the edges of τ sharing V . The definition of the sector is more delicate in the case of the tiling { p + , } . The sector is also defined by half-lines which are, this time, issued fromthe mid-point of an edge η and those half-lines pass through the mid-pointsof two consecutive sides of a tile sharing V as a vertex, V being also an endof η . The reader is referred to [3] for proofs of the just mentioned properties.Accordingly, as shown on the figure illustrating the case when p =
7, sevensectors allow us to locate tiles in the tiling { p , } and nine sectors allow us toperform the same thing in the tiling { p + , } . From now on, we call tile ν thetile attached to the node ν of such a white metallic tree we assume to be fixedonce and for all. We also say that [ ν ] is the code of the tile ν .In Sub-section 4.3, we shall prove that the preferred son property allowsus to compute in linear time with respect to the code of a node ν the codes ofthe nodes attached to the tiles which share a side with the tile ν . Such tilesare called the neighbours of ν . We shall also see that Theorem 4 allows us tocompute in linear time with respect to [ ν ] a shortest path in the tiling, leadingfrom the tile ν to tile 1. { p , } Consider a tile τ in the tiling { p , } . Fix a central tile which will be numbered by 0and fix p sectors around tile 0. Another tile is a neighbour of τ if and only of itshares a side of τ . In order to identify the neighbours of τ , we number its sidesas follows: side 1 is the side shared with the father of τ in the white metallictree which spans the sector to which τ belongs. By definition, the father of theleading tile of a sector is tile 0. Tile 0 has no father but we number its side byfixing its side 1 once and for all. Now that the side 1 of each tile is defined, wenumber the other sides while counterclockwise turning around the tile, givingthe number n + n . Accordingly, the p neighbours of τ are numbered from 1 up to p . The tile which shares with τ its side i is called the neighbour i of τ and we denote it by τ i . Accordingly, τ is the father of τ , except when τ =
0. Thanks to Theorem 4, we indicate how tocompute the metallic code of τ i for each i . It will also help us to construct thepath from τ to tile 0.We shall identify a tile with its number in its sector and also by the metalliccode of its number. If τ is the tile, n ( τ ) is its number, [ τ ] is its metallic code and € n (cid:129) is the tile whose number is n . If τ is a white node numbered by ν , itssons are τ i with i ∈ [2 .. p − τ p is the leftmost sonof ν +
1. We can write: τ p = € n ( τ ) + (cid:129) α , with α = , + τ is a black node, τ = € n ( τ ) − (cid:129) , itssons are τ i for i ∈ [3 .. p −
1] and τ p is again the leftmost son of ν +
1, so that wehave τ p = € n ( τ ) + (cid:129) as ν + τ from [ τ ] . Note that if [ τ ] = a k .. a and [ τ − ] = b k .. b , we have:L emma Let τ be a node and let [ τ ] = a k .. a . Let [ τ ] ⊖ = b k .. b . Then, if τ is a wa -node: [ τ ] = b k .. b , [ τ i ] = b k .. b [ i − ] , i ∈ [2 .. p − , [ τ p − ] = a k .. a [ τ p ] = a k .. a if τ is a b -node: [ τ ] = b k .. b , [ τ ] = b k .. b ⊖ [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p − , [ τ p − ] = a k .. a
0, [ τ p ] = a k .. a if τ is a w α -node, α ∈ [ , ]: [ τ ] = a k .. a , [ τ i ] = b k .. b [ i − + α ] , i ∈ [2 .. p − , [ τ p − ] = a k .. a
0, [ τ p − ] = a k .. a τ p ] = a k .. a (18)Proof: the proof is a direct application of the relation (14). (cid:3) We can conclude from (18) the following algorithm to compute [ τ ] from [ τ ] : Algorithm 7
Computation of the father of τ from [ τ ] . We assume that [ τ ] = a k .. a and that ( τ ) i = a i , with i ∈ { .. k } . if ( τ ) ∈ { .. d } then [ τ ] : = a k .. a ⊕ ; else if ( τ ) = τ ] : = a k .. a ; else i : = while ( τ ) i = i > k loop i : = i + end loop ; if i > k orelse ( τ ) i = τ ] : = a k .. a ; else [ τ ] : = a k .. a ⊕ ; end if ; end if ; end if ;The first condition in the algorithm comes from the examination of the rulesgiving the sons signatures. It is clear when sg ( τ ) ∈ { .. d } . When sg ( τ ) = ,whether the node is black or white, it is the leftmost son of τ or its secondson respectively. And so, as the successor of τ is its rightmost son, we haveto perform what the algorithm indicates. When sg ( τ ) = , it is clear that [ τ ] isobtained as indicated in the algorithm. We remain with the case when sg ( τ ) = .21t is either a black node, in which case the father is given by a k .. a ⊕ , or it iswhite but in that case the father is a k .. a . The di ff erence of the situation isdefined by the digits which is to the left of a . As long as we meet while goingto the left, we cannot distinguish between the two cases. When we meet a i with a i , , we know that we are in the case of a black node. If a i = , we are in thecase of a white node: it is a corollary of what was proved in Lemma 3 and ofthe remarks we made after the proof of Theorem 4. This completes the proof ofthe algorithm. (cid:3) Algorithm 7 is the key for devising an algorithm to compute a path from atile τ to the leading tile of the sector where it lies. We cannot use the functiondefined by the algorithm as is. If we do that, in case the metallic code containsa large pattern ∗ , we have to repeat the while loop each time we meet whichleads to a quadratic time. The idea is to fix the choice of the definition of thefather once is detected. Once we find the non -digit of highest rank withrespect to those -digits, we fix the choice accordingly until the pattern ∗ isdealt with.Here is the algorithm: Algorithm 8
Computation of the sequence of tiles which constitutes the path, along abranch of the W from a given tile τ to the leading tile of the sector which contains τ .We assume that [ τ ] = a k .. a . list : = [ τ ] ; r : =
0; fixed : = false ; node : = a k .. a ; for i in [0.. k ] loopif (node)( i ) ∈ { .. d } then node : = a k .. a i + ⊕ ; else if (node)( i ) = node : = a k .. a i + ; else i : = if not fixed then r : = i ; while (node)(r) = r > k loop r : = r + end loop ; if r > k orelse (node)(r) = node : = a k .. a i + ; fixed : = true ; else node : = a k .. a i + ⊕ ; fixed : = false ; end if ; else node : = a k .. a i + ; end if ; end if ; end if ;list : = node & list; end loop ; 22ote that this algorithm allows us to compute the path as a sequence ofnodes. The computation of each node requires at most k + k + [ τ ] . The for -loop has k + α. ( k + . The space complexity is also α. ( k + : the length of a digit is constant and we have also to take into accounta separator. { p + , } After Subsection 4.2, we deal with the same question in the tiling { p + , } .Note that there is no change for what concerns the spanning tree. We alreadymentioned in Subsection 4.1 that the white metallic tree spans the sectors inboth tilings { p , } and { p + , } . The di ff erence, from the point of view of the treeslies in the number of sectors: p in the tiling { p , } , p + { p + , } .That di ff erence comes from a deeper one: the number of tiles around avertex: 4 of them in { p , } while there are 3 of them in { p + , } . That di ff erence inthe number of tiles around a vertex has a consequence on the neighbourhoodof a tile. We keep the same definition as for the tiling { p , } : a neighbour of atile τ is a tile which shares a side with τ . Of course, a neighbour of τ also sharestwo vertices with τ : the ends of the common side. Now, in the tiling { p + , } , iftwo tiles share a vertex they also share a side. It is also the reason while the treefor { p , } is the same as the tree for { p + , } and not for { p , } which is completelydi ff erent. So, in { p + , } , a tile has p + τ has also two additional neighbours which lie onthe same level of the tree as τ . We adopt the same numbering of the sides of atile as in Subsection 4.2. Side 1 being the side of the father and τ being identifiedby its number, τ is € τ − (cid:129) , the sons are € τ i (cid:129) for i ∈ { .. p } for a whitenode, for i ∈ { .. p } for a black one, τ p + is the leftmost son of € τ + (cid:129) and τ p + is € τ + (cid:129) , the other tile which is on the same level of the tree as τ .This leads us to a modified version of Lemma 5:L emma Let τ be a node and let [ τ ] = a k .. a . Let [ τ ] ⊖ = b k .. b . Then, if τ is a wa -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p − , [ τ p ] = a k .. a , [ τ p + ] = a k .. a , [ τ p + ] = [ τ ] ⊕ . if τ is a b -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [4 .. p − , [ τ p ] = a k .. a
0, [ τ p + ] = a k .. a , [ τ p + ] = [ τ ] ⊕ . if τ is a w α -node, α ∈ [ , ]: [ τ ] = a k .. a , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − + α ] , i ∈ [3 .. p − ] , [ τ p − ] = a k .. a , [ τ p ] = a k .. a , [ τ p + ] = a k .. a . [ τ p + ] = [ τ ] ⊕ , (19)The lemma is not di ff erent from Lemma 5. It is the reason why we mayapply Algorithm 8 to the tilings { p + a , } without any change. However, we23ndicate here another algorithm which also work for the tilings { p , } . Note thatAlgorithm 8 is a bottom-up algorithm: it constructs the path from the tile tothe leading one by scrutinizing the digits of the metallic code from its weakestmetallic component up to its highest one. We constructed the path as a LIFO-stack. Here, we proceed in the reverse order: from the highest componentdown to the weakest one. Accordingly, the path will be constructed as a FIFO-stack. The first tile of the path is, of course, the leading one. Next, we look atthe highest digit: in most cases, it indicates in which sub-tree B or W a thetile belongs, where a ∈ { .. } . But in some cases, we might hesitate between W a and W a ⊕ or between W and B . As an example, k belongs to B while k belongs to W . That example indicates that the ambiguity can beraised by reading the last digit only. In order to raise the ambiguity, we choseboth sub-trees and we repeat that kind of choice at each step. Now, let us showthat no binary tree is raised in that process. Assume that we have a single path π = { π ..π k } and that reading the digit a , we hesitate between the sub-trees T µ and T µ ⊕ . We constitute two paths: π = { pi ..π k µ } and ω = { π ..π k µ + } , wherewe denote µ ⊕ by µ + . We have the condition 0 ≤ µ + − µ ≤
1. Now let b bethe next digit we read. Assume that starting from µ , we hesitate between twosub-trees rooted at two consecutive sons of µ , ν and ν + = ν ⊕
1. Similarly, b gives raise to the possible choices between consecutive sons of µ + , say ϕ and ϕ + = ϕ ⊕
1. Now, we can see that ( ab ) < ( a + ). It means that the tile cannot beboth in the sub-tree rooted at ν + and that rooted at ϕ + : in between them thereis the tree rooted at ϕ . A similar argument tells us that the tile cannot be bothin the sub-tree rooted at ν and that rooted at ϕ , the sub-tree rooted at ν + lyingin between them. So we may continue either by appending ν and ν + to π , orby appending ϕ and ϕ + to ω or by appending ν + to π and ϕ to ω . In all casesthe distance between two nodes belonging to each path with the same rankbeing 1, except at the initialisation step and at the end of the algorithm. Fromthat we get Algorithm 9.In order to better understand the algorithm, we indicate several of its fea-tures. The metallic code of the node for which we compute the path to theroot is represented as a table whose elements are the digits of the code. Thepath is represented by a table whose elements are digits and a letter, w or b ,indicating the status of the node. We start from the root which does not occurin the table. Recursively, the status indicated at the considered entry helps usto know which son is represented in the next case which indicates the signatureof that latter node. This is a di ff erence with Algorithm 8. In the bottom-upapproach, we do not know the status of the current node ν . If the signatureof ν is in , .. d , we know its status, otherwise it is not possible without furtherinformation.Let us look at what can be given by the top-down approach. Let µ be anode. The signature of a son ν of µ and the status of µ allows us to identify ν and to know its status, so that we can recursively continue the identification ofthe nodes on the path using the successive digits of [ ν ] . Let us look at the wayto do that precisely. We start from the root, and we compute two tables list − lgorithm 9 Computation of the sequence of tiles which constitutes the path, alonga branch of W from a given tile τ to the leading tile of the sector which contains τ .We assume that [ τ ] = a k .. a . The path is represented by a table whose elements are anumber, the signature of the considered node, together with its status. node : = a k .. a ;list − (1) : = a k w ; list + (1) : = ( a k ⊕ ) w ; if a k = list − (1) : = ; list + (1) : = ; end if ; ifa k = list − (1) : = ; end if ; ifa k = d then list + (1) : = ; end if ; j : =
1; first : = for i in [0.. k − in reverseloop status : = st(list − ( j )); if a i in { .. d } then for h in [first.. j ] loop list − (h) : = list + (h); end loop ;first : = j + − ( j +
1) : = a k w ; if ((status = w0 ) and ( a i = c )) or ( a i = d ) then list + ( j +
1) : = ; else list + ( j +
1) : = ( a i ⊕ ) w ; end if ; if a i = status in { w , b } then list − ( j +
1) : = ; end if ; end if ; if a i in { , } then if (( a i = ) and (status in { w0 , w1 } )) or (( a i = ) and (status not in { w , } )) then for h in [first.. j ] loop list + (h) : = list − (h); end loop ;first : = j + if a i = list − ( j +
1) : = ; else list − ( j +
1) : = ; end if ;list + ( j +
1) : = a i ⊕ ; else if a i = list − ( j +
1) : = ; list + ( j +
1) : = ; else list − ( j +
1) : = ; list + ( j +
1) : = ; end if ; end if ; end if ; j : = j + end loop ; 25nd list + step by step as follows. Let µ be the node identified by list − ( j ) and µ + + ( j ). When j = µ is identified as the son of the rootwhose signature is the highest digit of [ ν ] . We read the next digit a of [ ν ] . Thestatus of µ and a allow us to identify the node ω such that a occurs at the rightplace in the metallic code of nodes which belong to the tree T ω . More precisely,the concerned nodes lay to the right of the -branch issued from T ω and to theleft of the -branch issued from T ω + , that latter branch being included. We candecide which will be the next pair of nodes ω and ω + a is not , we know whether ω is in T µ or in T µ + . This depends on a andon the status of µ . Algorithm 9 carefully scrutinizes the required conditions.Let us stress the following feature: if ω ∈ T µ for instance, it may happen, thisis mostly the case, that ω + µ + + ( h ) = list − ( h ) for h ≤ j . We mayorganise the computation in such a way that we have not to perform that latteridentification from the root. It is enough to remember the last point wheresuch an identification was performed. This the role of the variable first in thealgorithm. To better understand what may happen, we can note that when a = or a = , it is not clear to which sub-tree ν belongs. If µ is a wa -node, ν may fall under the tree rooted at µ or in the one rooted at µ +
1. In some cases,that can be decided in the last digit only: it is the case if [ ν ] = k + f where f ∈ { , } . Outside such cases, the result of the computation is to be found inlist − , by construction. The interest of this way of computation is that [ ν ] is readonce, without repetition and that each execution of the body of the for -loop isbounded by a constant, except the updating of list − and list + . Also note that inan updating, the new path does not go to the left of the previous path recordedin list − . Now, thanks to the memorization of the last final place of the previousupdating, the cumulative e ff ect of the actualization process is equivalent to thereading of each table from its lowest index up to its highest one.As our argument is based on the digits of [ ν ] , the algorithm may also beapplied to the tiling { p , } without any change. Consequently we proved:T heorem Algorithm provides an algorithm to compute the path from the leadingtile of a sector to a given tile τ of the sector in the tiling { p , } or the tiling { p + , } which is linear in time with respect to the metallic code [ ν ] of the node. { p , } and { p + , } It is time to indicate which place a black metallic tree takes in the tilings { p , } and { p + , } .As illustrated by Figure 5, the sectors defined by Figure 4 in Sub section 4.1can be split with the help of regions of the tiling generated by the white metallictree and by the black one.In the figure, the sector is split into a tile, we call it the leading tile , anda complement which can be split into p − strip .26n both tilings, the strip appears as a region delimited by two lines ℓ and ℓ which are non-secant. It means that they never meet and that they also are notparallel, a property which is specific of the hyperbolic plane. There is a thirdline which supports the side of the tile τ which is associated with the root ofthe black metallic tree. That line is the common perpendicular to ℓ and ℓ . Thetile τ is called the leading tile of the strip. It is worth noticing that the waywe used to split the sector can be recursively repeated in each sector generatedby the process of splitting. We can note that the strip itself can be exactly splitinto a tile, a strip and p − Figure 5
The decomposition of a sector spanned by the white metallic tree into atile, then two copies of the same sector and a strip spanned by the black metallictree. To left: the decomposition in the tiling { p , } ; to right, the decomposition in thetiling { p + , } . In both cases, the dark blue colour indicates the black nodes whilethe white ones are indicated in dark yellow, in green and in purple. At this point, it can be noticed that there are several ways to split a sectorand a strip again into strips ans sectors. This can be associated with other rulesfor generating a tree which we again call a metallic tree. There are still twokinds of nodes, white and black ones. But the rules are di ff erent by the order inwhich the black son occurs among the sons of a node. There are p − p − p − p − p =
5. We refer the interested reader to that paper.But a sector can be split in another way which is illustrated by figure 5.Consider a sector S . Consider its leading tile T . That tile is associated withthe root of the white metallic tree. Assume that we associate it with the blackmetallic tree in such a way that in the association the leftmost son of T is againthe black son of the root in both trees. What remains in the sector? It remains anode which we can associate with the root of the white metallic tree. A simplecounting argument, taking into account that the levels are di ff erent by one stepfrom the white tree to the black one in that construction, shows us that in this27ay we define an exact splitting of the sector. And so, there is another way tosplit the sector: into a strip B and a sector again, S . Now, what was performedfor S can be repeated for S which generates a strip B and a new sector S .Accordingly, arguing by induction we proved:T heorem The sector associated to the white metallic tree can be split into a sequenceof pairwise adjacent strips B n , n ∈ N , associated to the black metallic tree. Equivalently,the white metallic tree can be split into the union of a sequence of copies of the blackmetallic tree. The leading tiles of the B n ’s are associated with the nodes M n of the whitemetallic tree, i.e. the nodes which are on the rightmost branch of the white metallic tree. Note that the proof is a bit easier if it is performed starting from the tree. Thedecomposition stated in the theorem is straightforward from the structure of therules. Let us remind ourselves that the rule for the white nodes is w → bw p − and that it is b → bw p − for a black node. The di ff erence on the sons is that the p − h + h + h whose root is considered as a son of the root of the blacktree of height h +
1. Clearly, for infinite trees as considered here, this splittinggives rise to the theorem. { p , } and { p + , } under the natural numbering of that tree Let us consider a tile of a sector which falls in the part of it which is spannedby B , the black metallic tree. As the metallic code defined with respect to thenumbering of that tree is di ff erent from the one considered in the relations (18)and (19), we have to compute appropriate relations.L emma Let τ be a node in the black metallic tree and let [ τ ] = a k .. a be its blackmetallic code. Let [ τ ] ⊖ = b k .. b . Then, the black metallic codes of the neighboursof τ are given by Table . In the left, right hand-side part of the table, the codes for theneighbours in the tiling { p , } , { p + , } respectively. Proof. The proof proceeds from the previous study of the sons signature in ablack metallic tree. We take into account that the numbering of the sides is thesame as in Subsections 4.2 and 4.3. We have to establish the correspondencebetween the number of a side and the signature of the corresponding neigh-bour. In the tiling { p , } , the sons of a white node τ are its i -neighbours, with i ∈ { .. p − } . As the leftmost son of τ is ( τ ) , the signature of the i -neighbour is [ i − ] , as the signature of the leftmost son is . As the signature of the leftmostson of a black node is too and as it is 3-neighbour of the node, we have that i ∈ { , p − } and the signature of the i -neighbour is [ i − ] . Table 4 gives the wholecomputations, for the tiling { p , } in its left hand-side part, for the tiling { p + , } in its right hand-side one. In the table, a ⋆ indicates that the correspondingneighbour(s) belong(s) to another strip.28 able 4 Black metallic codes for the neighbours of a node belonging to the black metallictree. in { p , } in { p + , } if τ is a wa -node: [ τ ] = b k .. b , [ τ i ] = b k .. b [ i − ] , i ∈ [2 .. p − , [ τ p ] = a k .. a , if τ is a w0 -node: [ τ ] = b k .. b , [ τ i ] = b k .. b [ i − ] , i ∈ [2 .. p − , [ τ p ] = [ τ + ] , ∗ if τ is a b0 -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p − , [ τ p ] = a k .. a if τ is a b1 -node: [ τ ] = b k .. b , [ τ ] = [ τ − ] , ∗ [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p − , [ τ p ] = a k .. a if τ is a wa -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p ] , [ τ p + ] = a k .. a , [ τ p + ] = [ τ ] ⊕ . if τ is a w0 -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [3 .. p − , [ τ p ] = a k .. a , [ τ p + ] = [ τ + ] , ∗ [ τ p + ] = ( [ τ + ] ) , ∗ if τ is a b0 -node: [ τ ] = b k .. b , [ τ ] = [ τ ] ⊖ , [ τ ] = [ τ ] ⊖ , [ τ i ] = b k .. b [ i − ] , i ∈ [4 .. p ] , [ τ p + ] = a k .. a , [ τ p + ] = [ τ ] ⊕ . if τ is a b1 -node: [ τ ] = a k .. a , [ τ ] = [ τ − ] , ∗ [ τ ] = [ ( τ − p ] , ∗ [ τ i ] = b k .. b [ i − ] , ii ∈ [4 .. p − ] , [ τ p + ] = a k .. a . [ τ p + ] = [ τ ] ⊕ , That latter point requires some attention. Let ν be a w0 -node belonging to B n as defined in Theorem 7, assuming that we are in the tiling { p , } . In thewhite metallic tree containing all trees B n , ν p ∈ B n + . It is not di ffi cult to see,from the construction of the B n ’s, that the level k in B n + is the level k in B n .From that observation, we can see that if τ is a w0 -node in B n , τ p = ( τ ) ◦ where29 ◦ is the same number as τ for a node in B n + . Note that τ p is a black node.Now, if σ = τ ◦ , we have that τ = ( σ ) † , where σ † indicates a node in B n whichhas the same number as the node σ of B n + . Such connections can be checkedon Figures 1 and 6. Algorithm 10
Computation of the path from the leading tile of a strip to the tilebelonging to the strip. The function st gives the status of a node. node : = a k .. a ;list − (1) : = a k w ; list + (1) : = a k w ; if a k = list − (1) : = ; list + (1) : = ; end if ; ifa k = d then list − (1) : = ; list + (1) : = ; end if ; ifa k not in { , d } then list − (1) : = ( a ⊕ ) w ; list + (1) : = list − (1); end if ; j : =
1; first : = j + for i in [0.. k − in reverseloop status : = st(list − ( j )); if (status , w0 ) or else ( a i , ) then if a i = dthen list − ( j +
1) : = ; list + ( j +
1) : = list − ( j + else list − ( j +
1) : = ( a i ⊕ ); list + ( j +
1) : = list − ( j + end if ; if first < j + then for h in [first.. j ] loop list − ( h ) : = list + ( h ); end loop ; else first : = j + end if ; else - - status = w0 and a i = list − ( j +
1) : = ; list + ( j +
1) : = ; if i = then if a i , h in [first.. j ] loop list − ( h ) : = list + ( h ); end loop ; end if ; end if ; end if ; j : = j + end loop ;If σ is the number of the sector where τ lies, the new sector is σ ⊕ w0 -nodes and it is σ ⊖ b1 -nodes. (cid:3) Table 4 shows us that the determination of the path in the black metallic treeis easier than in the case of the white tree. The reason of that simplification isthat if the digit a is not , the next digit exactly determines the sub-tree wherethe given node lies because the next digit is in which corresponds to the30ons of a wa -node. If the node to which we arrive is a black node, we are sure,from the structure of a black metallic tree, that the digit d was not read.If the digit arriving at a w0 -node ν is , that digit which occurs in the metalliccode at its position in the metallic code of τ also occurs in the metallic codesof nodes which belong to the sub-tree issued from ν + b1 -node. Aslong as -digits are read, the indetermination between those consecutive w0 -and b1 -nodes happens and it is raised by the first non -digit or by the fact thatall digits of [ τ ] were used. This leads us to Algorithm 10. (cid:3) We can state the following property:T heorem Algorithm provides us with an algorithm to compute the path from theleading tile of a strip to another tile τ of the strip which is linear in time with respectto [ τ ] . As Algorithm 10 is much simpler than Algorithm 9, Theorem 7 o ff ers analternative way to compute the path from a tile τ to the leading tile of the sectorwhich contains τ : we first compute the path from τ to the leading tile ρ of thestrip which contains τ and then we take the part of the rightmost branch of W which goes from the root of W to ρ . By numbering the strips B n givenby Theorem 7, we obtain an alternative linear algorithm to compute the pathfrom τ to the leading tile of its sector. The last remark which concludes the previous section invites us to comparethe properties stated by Theorems 4 and 5. The first comparison can be madebetween the rules (14) with the rules (17). For the convenience of the reader,we repeat them right now: b1 , b2 → b2 ( wa ) p − w0 , wa → b1 ( wa ) p − w0 , w0 → b1 ( wa ) p − wcw0w1 , w1 → b2 ( wa ) p − wdw0w1 , (14) b0 → b0 ( wa ) p − , b1 → b1 ( wa ) p − , wa → b0 ( wa ) p − , w0 → b0 ( wa ) p − w0 . (17)In both cases, we have two types for the white nodes but for the black nodes,we have a single type for the white metallic tree and two ones for the blacktree. The di ff erence comes from the fact that the white metallic tree possessesthe preferred son property while the black metallic tree does not. For the blackmetallic tree we gave up the term preferred son , replacing it by successor . Ofcourse, the definition of the successor also applies to the white metallic tree anda way to rephrase Theorem 4 consists in saying that in a white metallic tree,the successor of each node is its preferred son, where the preferred son, denoteit w p is given by the following rules: b → bw p − ℓ w p , w ℓ → bw p − ℓ w p , and w r → bw p − ℓ w p w r . (20)31e can say that the preferred son is always a w r -node. In a b -node and in a w ℓ -one it is necessarily the rightmost son, in a w r -one it is the penultimate son,starting from the leftmost son of the node. We remind the reader that in (5), weproved that m n + = b n + + m n . In the black metallic tree, we can also rephraseTheorem 5 as follows, denoting by st ( ν ) the status of ν and its successor by succ ( ν ): st ( ν ) = b or st ( ν ) = wa ⇒ ( succ ( ν ) = s ℓ ( ν + and (st( succ ( ν )) = b0 ), st ( ν ) = w0 ⇒ ( succ ( ν ) = s r ( ν )) and ( st ( succ ( ν ) = w0 ). (19)Let us look closer at the di ff erence of the rules by one additional white nodein the rightmost position. Remember that B is identified to the black metallictree and that it is dotted with its natural numbering. But the nodes of B mayreceive another numbering: the number they receive in a white metallic tree as W is such a tree. For any node ν ∈ B , denote by ν W , ν B the numbers receivedby ν in W , B , respectively in their respective natural numbering. We can seethat both numberings coincide for the root and for all nodes of level 1, therightmost one, σ , excepted which is the root of C , not in B , see Figure 6. Let ϕ k be the rightmost node of B on the level k and let λ k be the leftmost nodeon the same level. It is not di ffi cult to see that for any node ν of B and onlevel 2, ν W = ν B +
1. Indeed, we have ( λ ) B = ( ϕ ) B + λ ) W = M + ν of B , we have ν W = ν B + M . Say that the numbers in W are shifted by M with respect tothose in B . We noticed that on level 2 the shift was 1, so that the shift increasedby m from level 2 to level 3 and m is the number of nodes of W\B on level 2, i.e. the nodes of C on its level 1. d c1c0 c2c1 cdcc d0cd d1d0 d2d1 dcde dc1de0 dc2de1 dccdee Figure 6
Comparing the white metallic numbering, in blue in the figure, on theblack metallic tree with the natural numbering of that latter one, in red. Partialrepresentation of the first three levels of the tree when p = with the conventionsmentioned for Figures and . Accordingly, by induction on n , assume that on the level n , for any node ν of B we have ν W = ν B + M n − . Accordingly, ( ϕ n ) W = ( ϕ n ) B + M n − , so that wehave ( λ n + ) W = ( λ n + ) B + M n − + m n − , as the number of nodes of W\B on thelevel n is m n − , the number of nodes of C on its level n −
1. Now, from the32quality M n − + m n − = M n − which proves our claim, we can state:L emma For any node ν on the level n + of B , we have: ν W = ν B + M n − (19)As an application, let us look at the -branch of W and denote it β , W .The nodes of the rightmost branch of B have the metallic code n in W .Accordingly, β , W is contained in B . Accordingly, if π n is the node of β , W which lies on the level n of W , we have from (19) that π n B = π n W − M n − .Performing n − n − thanks to Algorithms 2, 3, 1 and 4 we get:C orollary Let π n denote the sequence of nodes defined by the following conditions: π is the root of W , π n + is the penultimate son of π n for all positive integer n. Wehave that [ π n W ] = n and [ π n B ] = d ( c − ) n − c . We already proved that in the black metallic tree, the rightmost node on thelevel n + m n + . It was proved by removing from M n + the numberof nodes in C . The number of the removed nodes is M n which repeats theargument used in the proof of Theorem 4 to show that π n + is the penultimateson of π n . This confirms the fact that β , W is not the rightmost branch of B as already mentioned. Note that the sub-tree of B whose root is the rightmostson of B on its level 2 is isomorphic to C . In terms of the sub-tilings generatedby the trees in the tiling { p , } or { p + , } that isomorphism corresponds to ashift. In W the leftmost black node puts the successor at its expected place inboth trees so that the white nodes, which have p − k replacing the forbidden dc k − d occurs at a right place with respect to the nodes of the previous level.And so, we have the explanation of the di ff erences we noticed on the rules(14) and (17). Conclusion
We can conclude the paper with several remarks.The first one is that the results of the paper are di ff erent from those of [6]as in that paper, the rules place the black son at a very di ff erent place from theplace defined by (20). Now, the existence of a linear algorithm constructingthe path from a node to the root of the tree was proved in [4] which takes thesetting of [6]. Accordingly, the result of the present paper confirms the resultof [4]. Now, neither in [6] nor in [3], nor in [4] the case of the black tree wasinvestigated for Fibonacci trees. There is a mention in [1] of the value of b n inthe case of the Fiboancci tree but no other property of its natural numbering,in particular no connection with the code associate to that latter numbering.Such properties were first studied by the author in [5] as mentioned in theIntroduction. 33he interest of the black metallic tree is confirmed by the general case inves-tigated in the present paper. We could conclude in [5] that the white Fibonaccitree is the best tree for navigation purpose in the pentagrid and in the heptagrid,those tessellation that live in the hyperbolic plane. Probably, it is still the casein the general setting considered in the present paper. However, the simplicityof Algorithm 10 a bit tempers the previous statement. For investigations in theblack metallic tree only, considering the natural numbering of that tree wouldperhaps be the best issue: there is no di ff erence between black and white nodesfor the determination of the successor of a node, except for the rightmost branchof the tree. Now, that rightmost branch is exceptional too in the white metal-lic tree. Worse, that exceptional situation is translated to the sub-trees of thewhite tree. It is not the case in the black metallic tree equipped with its naturalnumbering. Moreover, B covers a large part of W . Also note that a branchpassing through a given node is unique in a tree. Accordingly, the path joininga node placed in a B n tree with n > W to get connectedwith the root. In particular, the path defined in W passes through the samenodes of the rightmost branch of W as above mentioned. Those considerationsreinforce the interest of Algorithm 10. And so, in this context, the nice propertyof the preferred son which holds in the white metallic tree and which no moreholds for the black one, is replaced by a nice property too for the successor of anode.Up to a point, the present paper closes the problem for the tilings { p , } and { p + , } for what is the rules (1). As already noted in [2], other rules givingrise to the same number of branching for black and white nodes as in (1) couldbe investigated, we made hint to that feature in Sub-section 4.4. In that paper,we had 6 pairs of rules. Some of them could give rise to stronger distortionswith respect to the regularity shown in the present paper. Now, in [2], anotherquestion was considered: on each level of the tree, the rules applied to a black,white node is taken at random for the possible rules for that type of node. Littlewas indicated in [2] about that situation. In the situation investigated in thepresent paper, we have ( p − p −
2) possible pairs of rules, and so, if the rulesare taken at random, the number of possibilities is much higher than in thesituation considered in [2]. Accordingly, there are still open problems in thetopic considered in the present paper.
References [1] C. Iwamoto, T. Andou, K. Morita, K. Imai, Computational Complexityin the Hyperbolic Plane,
Lecture Notes in Computer Science , , (2002),Proceedings of MFCS’2002 , 365-374.[2] M. Margenstern, New Tools for Cellular Automata of the Hyperbolic Plane,
Journal of Universal Computer Science , (12), (2000), 1226–1252.343] M. Margenstern, Cellular Automata in Hyperbolic Spaces, vol. I, Theory , Collec-tion:
Advances in Unconventional Computing and Cellular Automata , Editor:Andrew Adamatzky, Old City Publishing, Philadelphia, (2007), 424p.[4] M. Margenstern,
Cellular Automata in Hyperbolic Spaces, vol. II, Implemen-tation and computations , Collection:
Advances in Unconventional Computingand Cellular Automata , Editor: Andrew Adamatzky, Old City Publishing,Philadelphia, (2008), 360p.[5] M. Margenstern, About Fibonacci trees − I − , arXiv :1904.12135, cs.DM.[6] M. Margenstern, G. Skordev, Fibonacci Type Coding for the Regular Rectan-gular Tilings of the Hyperbolic Plane, Journal of Universal Computer Science ,9