<<

towers, Catalan numbers and Strahler distribution

(extended abstract)

dedicated to my friend Adriano Garsia for his 75th birthday

Xavier Viennot LaBRI, CNRS and Université Bordeaux 1, 33405 Talence, France viennot (à) labri.fr abstract We introduce a new class of combinatorial objects called “Kepler towers”, counted by Catalan numbers. This objects are related to the combinatorics of Strahler numbers of binary trees and to the theory of heaps of pieces. résumé Nous introduisons une nouvelle classe d’objets combinatoires appelés “Tours de Kepler” et dénombrée par les nombres de Catalan. Ces objets sont liés à la combinatoire des nombres de Strahler des arbres binaires et à la théorie des empilements de pièces.

Some historical background Another title for this talk could have been “From Kepler to computer graphics of trees”. Adriano loved synthetic images of trees and landscapes we have produced some years ago with D.Arques, G.Eyrolles and N.Janey, see [11]. These images, such as the one displayed on Figure 1, are given by some algorithms based on some extensions of the so-called Strahler analysis of binary trees.

Figure 1. Synthetic images of trees ASIA 1989

1 In fact Strahler was an hydrogeologist and, together with Horton, was studying the morphology of rivers networks. They indroduced in [5], [7] the notion of order of a river in a river network. Each river takes birth with an order 0. When two rivers of order i and j meet, they form a river of order max(i, j) whenever i ≠ j ; if i = j , then the resulting river has order i+1.

In the same way, this notion can also be defined for any complete binary tree. A complete binary tree has n internal vertices and n+1 external vertices (or leaves). Each internal vertices has€ two sons: a left and€ a right son.€ Starting with each leaf labeled 0, one can recursively label the vertices with the same rule: a father is labeled max(i, j) (resp. i+1) whenever the two sons are labeled i and j with i ≠ j (resp. i = j ). The so-called Strahler number of the binary tree is the label of its root (which is also the largest label of its vertices). This defines a parameter on the set of binary trees . The distribution of this parameter among all trees with n internal vertices (counted by Catalan numbers) is called the Strahler€ distribution. This distribution has some very nice and deep properties.€ €

Figure 2. Strahler number of a binary tree

Strahler analysis and combinatorics of Strahler numbers appear in many completely different contexts such as theoretical computer science (minimum number of registers needed to compute an arithmetical expression) [3], molecular biology (secondary structure of RNA molecules [9]), analysis of fractal patterns in physics [8] with application to radiology (digital mammography) [2], visualisation of information (see for example [1] and references therein). A survey paper (in 1990) is [12]. One may ask the question: what is doing Kepler in this Catalan-Strahler story ?

Kepler’s During my stay in Mittag-Leffler Institute in January-February 2005, under passionate and fruitful discussions with Don Knuth, I introduced the concept of “Kepler towers”. Why such a reference to Kepler ? is well known for his three laws describing the elliptic movement of planets around the sun, published in his 1609 and Harmonice mundi 1619. Since the very beginning of his scientific life, Kepler adopted Copernic model of the solar system described in De revolutionibis 1543, and he was looking for an explanation of the distribution of the speed and distance of the planets to the Sun. He was also looking for an explanation of the number of planets (6 at that time). In his first book, the Mysterium cosmographicum, published in 1596, Kepler invented a model of the solar system, where the orbit of each planet is represented by a sphere and where the five regular 3D polyhedrons (known since centuries as platonic solids) would be embedded between each sphere in a certain precise way. Of course nowadays this model seems absurd, together with the question of finding an explanation for the number of planets. But let’s go back to original ideas and tentatives of Kepler: at the beginning he was considering 2D embedding of circles into regular polygons. This is our starting point for defining Kepler towers.

2 Figure 3. Kepler’s model from Mysterium cosmographicum

Kepler towers Let’s consider an infinite sequences of regular polygons, starting with a polygon with only 2 edges, then with 4 edges (a square), 8 edges (octogon), ...., each polygon is centered in the th n n+1 origin and the n polygon Pn has 2 edges and is embedded in the polygon Pn+1 having 2 edges, see Figure 4.

€ € € € €

Figure 4. Polygons P2 , P4 , P8

3 € € € Now we refer to the theory of heaps of pieces introduced in [10]. For each polygon Pn , we can define the set of heaps of dimers over this polygon. The polygon Pn is considered to be at

level 0. Above the polygon Pn , we imagine a cylinder or tower, i.e. a sequence of the same polygon, each polygon of the sequence being placed at level 1, 2, ..., k, .. etc. € € €

Figure 5. A system of Kepler towers with 22 dimers and 3 towers

A heap of dimers above Pn is a finite set of disjoint edges (or dimers) choosen in the sequence of polygons above Pn (including Pn itself) satifying the following condition: - if a dimer is at level i > 0, then there exist a dimer at level i-1 such that their projections on the “ground floor” (i.e. polygon Pn at level 0) intersects. Recall that a dimer€ is a set of two consecutive vertices in the polygon. They are

visualized on Figure€ 5 by red edges.€ Suppose we color alternatively the edges of each polygon Pn black and white. € € Definition 1. A system of Kepler towers is a finite sequence of heaps of dimers H1,...,Hk , each th i heap Hi (called the i tower) is a heap of dimers above the polygon Pi (with 2 edges)€ satisfying the following condition: - at level 0, each heap H , 1 ≤ i ≤ k , contains all the 2 i−1 black edges of the polygon P . i € i € € € Thus, for any system of Kepler towers with k towers, the€ total number of dimers is at least 1+ 2 + ...+ 2 k = 2k+1 −1. These dimers are visualized by the red edges displayed on Figure 4. € € € € Another love of Adriano are the mysterious (q,t)-Catalan numbers. We do not have (q,t), but at least we have here a remarkable fact. It is probably not obvious to recognize in these € Kepler towers another incarnation of the very classical Catalan numbers: Proposition 2. The number of system of Kepler towers having n dimers is the Catalan number 1  2n Cn =   . n +1 n  In fact, we have more:

€ 4 Proposition 3. The distribution of systems of Kepler towers according to the number of towers is the Strahler distribution, i.e. the number of systems of Kepler towers having n dimers and k towers is equal to the number of (complete) binary trees having n internal vertices and Strahler number equal to k.

We will give two proofs, bijective and analytic of this fact. Before that, let’s give another equivalent definition of Kepler towers, as considered by Don Knuth, by taking a 2D projection of

the 3D sequence of Kepler towers H1,...,Hk , and replacing each regular polygons Pi by circles (or rings) divided into 2 i segments of equal length.

Kepler towers viewed as circles and walls € € €

Figure 6. Kepler disk as a 2D projection of 3D Kepler towers

A Kepler disk (system of Kepler towers) is formed by a certain number of walls (towers) th W1,...,W k .The i wall of the Kepler disk consists of one or more rings (or circles) (the polygons i above each polygon Pi ) , where each ring is divided into 2 segments (edges) of equal length. Inside each ring, we choose certain segment called bricks. Each brick is slightly longer than the length of the segment. € € th i Brick positions in the rings of the €i wall are numbered 1, 2, ..., 2 , going counterclockwise€ and starting from the segment due east of the center. For example the Kepler disk of Figure 6 can be specified by the following segment-number sequences: 1; 2; 2; (first wall) 1,3 ; 4; 1,3; (second wall) € € 1,3,5,7; 1,4,7; 3,8; 2,4,7; 1,7 (third wall) This Kepler disk is the projection of the system of Kepler towers displayed on Figure 5.

With this point of view, the condition defining Kepler towers becomes the following conditions on rings and walls: (i) The positions of the bricks in the first ring (the innermost = level 0) of the ith wall are 1, 3, ..., 2 i -1 , for 1 ≤ i ≤ k .

5 € € € (ii) Bricks cannot occupy adjacent segments of a ring. (iii) Bricks in each non-innermost ring of a wall must be in contact with bricks in the ring just inside (=just below), that is if the brick is at position j, 1 ≤ j ≤ 2 i , then the ring just inside must contain at least one brick in position j-1, j or j+1 (modulo 2 i ).

Note that in his memoir Mysterium cosmographicum, Kepler was also considering the orbits of planets symbolized by circles, the sun€ being in the center of the circles. At that time (1595), Kepler was trying to relate the distances€ of planets with the sun with some constructions of triangles or regular polygons embedded or circumscribed in these circles. This may give another justification of our choice of terminology Kepler towers and Kepler disks. Note that this was the time of instruments called “proportion compass”. They were used in order to divide a circle into sectors being a sub-multiple of 360°, with the construction of regular polygons (up to 15 edges). In 1597, Galileo published a memoir called “the operations of the geometric and military compass” describing seven scales, including the scale called Figurarum regolarium.

The bijection We present a bijection Ψ between Dyck paths of length 2n and system of Kepler towers having n dimers (or Kepler disks having n bricks), thus proving proposition 2.

Figure 7. A Dyck path of length 10 and height 3

We define the logarithmic height lh(w) of a Dyck path w as to be the integer value of the logarithm (in base 2) of 1+h(w), where h(w) denotes the height of the Dyck path w. In other words, the Dyck path w has logarithmic height k iff h(w) satisfies the relations 2 k ≤1+ h(w) < 2k+1. Our bijection Ψ has the property that the number of towers of the system corresponding to w is exactly the logarithmic height lh(w) of the Dyck path w. With the well kown property that the distribution of the parameter lh(w) among Dyck paths of length 2n is the Strahler € distribution, we thus prove proposition 3. € The bijection Ψ is defined recursively, involving some constructions related to the theory of heaps of pieces, in particular the classical bijection between paths and heaps of pieces having some constraints about the maximal pieces, that is the pieces that can be removed from above the heaps whithout touching other pieces of the heaps. Also, we use the monoid structure of heaps of pieces€ (isomorphic to the so-called commutation monoids introduced by Cartier and Foata). We introduce some factorisations of heaps into heaps and pyramids (i.e. heaps having only one maximal piece). This bijection Ψ has been refined and implemented in a nice way by Don Knuth [6] under the name VIENNOT.

€ 6 We recall that Françon has given [4] a bijection Φ between Dyck paths and binary trees such that the Strahler number of the binary tree becomes the logarithmic height of the path. This

bijection is defined recursively as a sequence of bijections Φk. Each bijection relates Dyck paths

of logarithmic height k and binary trees with Strahler number k. The bijection Φk+1 is constructed € from the bijection Φk. In the same reference [6], Don Knuth, inspired from Françon’s bijection gave a “direct” and impressive bijection called FRANÇON. € Recall also that there exist a fourth incarnation of the Strahler€ distribution with planar (or ordered€ ) trees. The related parameter is the so-called pruning number of a tree (or “order”, coming from the related terminology of secondary structure of RNA’s type molecule). A bijection between binary trees and planar trees, sending the pruning number into the Strahler number, has been given by Zeilberger [14]. This bijection has also been improved by Don Knuth in [6] under the name ZEILBERGER . Finally, another bijection between planar trees and Dyck paths, sending the pruning number into the logarithmic heigth, has been given by Viennot in [13].

Generating function

We give an analytic proof of propositions 2 and 3. Let Sn,k (resp. Sn,≤k ) be the number of binary trees having n internal vertices and Strahler number k (resp. Strahler number ≤ k ). We th denote by Sk(t) and S≤ k(t) the corresponding generating functions. Let Un (t) be the n Tchebycheff polynmial of the second kind, that is the polynomial defined by € € sin(n +1)θ = (sinθ)Un (cosθ). 2 € We denote by F (t ) the reciprocal of the polynomial U (t / 2). These polynomials n n € (sometimes€ called€ Fibonacci polynomials) can also be defined by€ the classical three terms recurrence relation: €

€ Fn +1(t) = Fn (t) − tFn−1(t) ; with€ F0 = F1 =1.

€ €

Figure 8. The Fibonacci polynomial F3 (t) and trivial heaps of dimers on a segment

These Fibonacci polynomials can also be interpreted combinatorialy as the (alternating in sign) generating polynomial for trivial heaps of dimers on a segment, that is heap where all pieces are at level 0, see [10]. This is also€ the reciprocal (up to change of t2 into t) of the so-called matching polynomial of the segment graph. (see Figure 8).

Using Dyck paths and logarithmic height, some classical results about the generating function of Dyck paths having a bounded height, and Françon€ or Knuth bijection, one can derive the generating function for the Strahler distribution:

F2k+1 −2 (t) S≤ k(t) = . F2k +1 −1(t)

7 € Using identities about the Fibnacci polynomials coming from trigonometry (or proved

directly combinatorially using the above interpretation of the polynomials Fn (t)), one get the following generating function:

k t 2 −1 Sk(t) = . € F2k+1 −1(t)

Now, it can be proved (combinatorialy or using trigonometry) that the polynomial

k 1 can be factorized as a product of polynomials where each polynomial is the F2 + −1(t) Z1...Zk Zi (alternating in sign) generating€ polynomial of trivial heaps of dimers on the graph formed by a i i cycle of length 2 (i.e. regular polygon with 2 vertices). Denote by Ln (t) such polynomial in

the case of any cycle (or regular polygon) with n vertices, so that Z (t) = L i (t) . It is equivalent € € i 2 € to the matching polynomial of the graph formed by a cycle (up to a change of variable). An example is displayed on Figure 9. The sum of the (absolute value of the) coefficients of the € € polynomial Ln (t) is the Lucas number Ln (defined by the same€ recurrence as for the Fibonacci numbers, but with different initial conditions: L1 =1€, L2 = 3). We propose to call such polynomials the Lucas polynomials.

In the same way that the polynomials Fn (t) are related to the Tchebycheff polynomials of€ the second kind, the polynomials€ Ln (t) are related to the Tchebycheff polynomials of the first kind defined by the relation cosnθ =€T n (cosθ€) . € € €

Figure 9. The Lucas polynomial L4 (t) as trivial heap of dimers on a regular polygon of order 4

Using the classical formula giving the generating function for heaps of pieces over a graph, we obtained the generating function for systems€ of Kepler towers having k towers according to the number of dimers and thus rederive propositions 2 and 3.

Acknowledgements The author thanks A.Björner and R.Stanley, organizers of the spring session 2005 on Algebraic Combinatorics at the Mittag-Leffler Institute, Sweden, where this work was done. Many thanks also to Don Knuth. During my stay at this Institute, I benefit of many stimulating and fruitful discussions with him.

8 References

[1] D.Auber, M.Delest and Y.Chiricota, Strahler based graph clustering using convolution, 8th International Conference Information Visualisation, 13-16 July 2004, London, 44-52, Proc. IEEE.

[2] P.R.Bakic, M.Albert, D.Brzakovic and A.D.A.Maidment, Mammogram synthesis using a three-dimensional simulation. III. Modeling and evaluation of the breast ductal network, Medical Physics, 30 (2003), 1914-1925.

[3] P.Flajolet, J.C.Raoult, J.Vuillemin, The number of registers required for evaluating arithmetic expressions, Theoretical Computer Science, 9 (1979), 99-125.

[4] J.Françon, Sur le nombre de registres nécessaires pour l’évaluation d’une expression arithmétique, RAIRO Info. Théorique, 18 (1984), 355-364.

[5] R.E.Horton, Erosional development of systems and their basins, hydrophysical approach to quantitative morphology, Bull. Geol. Soc. America, 56 (1945), 275-370.

[6] D.Knuth, Three Catalan bijections, www-cs-faculty.stanford.edu/knuth/programs.html, downloadable program VIENNOT, see also preprint Mittag-Leffler Institute, spring 2005, n°04.

[7] A.N.Strahler, Hypsometric (area-altitude) analysis of erosianal topology, Bull. Geol. Soc. of America, 63 (1952), 117-142.

[8] J.Vannimenus and X.G.Viennot, Combinatorial analysis of physical ramified patterns, J.Stat. Phys., 54 (1989), 1529-1538.

[9] M.Vauchaussade de Chaumont and X.G.Viennot, Polynômes orthogonaux et problèmes d’énumération en biologie moléculaire, in Séminaire Lotharigien de Combinatoire, vol 8, B08l (1983), www.mat.univie.ac.at/slc.

[10] X.G.Viennot, Heaps of pieces, I : Basic definitions and combinatorial lemmas, in « Combinatoire énumérative », eds. G. Labelle et P. Leroux, , Lecture Notes in Maths. n° 1234, Springer-Verlag, Berlin, 1986, p. 321-325.

[11] X.G.Viennot, G.Eyrolles, N.Janey, D.Arquès, Combinatorial analysis of ramified patterns and computer imagery of trees, Proc. SIGGRAPH’89, Computer Graphics, 23 (1989), 31-40.

[12] X.G.Viennot, Trees everywhere, in Proc. 15th CAAP (Copenhagen, May 1990), Lecture Notes in Computer Science n°431, A.Arnold ed., Springer-Verlag, 1990, Berlin, 18-41. see also, X.G.Viennot, Trees, in “Mots”, mélanges offerts à M.P.Schützenberger, M.Lothaire ed., Hermès, Paris, 1990, p265-291.

[13] X.G.Viennot, A Strahler bijection between Dyck paths and planar trees, Discrete Maths., 246 (2002) 317-329.

[14] D.Zeilberger, A bijection from ordered trees to binary trees that sends the pruning order to the Strahler number, Discrete Maths., 82 (1990), 89-92.

9