Limiting probabilities for vertices of a given rank in 1-2 trees

We consider two varieties of labeled rooted trees, namely non-plane and plane 1-2 trees. In these tree varieties, we study the probability that a vertex chosen from all vertices of all trees of a given size uniformly at random has a given rank. We prove that this probability converges to a limit as the tree size goes to infinity. Mathematics Subject Classifications: 05A05, 05A15


Introduction
Various parameters of many models of random rooted trees are fairly well understood if they relate to a near-root part of the tree or to global tree structure.The first group includes, for instance, the numbers of vertices at given distances from the root, the immediate progeny sizes for vertices near the top, and so on.See [10] for a comprehensive treatment of these results.The tree height and width are parameters of global nature.A few important papers in that area are [16], [17], [18], [23], and [24].
Let T be a class of rooted labeled trees.If v is a vertex of a tree T ∈ T , then let the rank of v be the number of edges in the shortest path from v to a leaf of T that is a descendant of v.So leaves are of rank 0, neighbors of leaves are of rank 1, and so on.The rank of a vertex is fundamentally different from other well-studied statistics such as the height or the depth of a vertex, because it is more "local" in that it only depends on a smaller neighborhood of each vertex than those classic statistics.The rank of a vertex has been the subject of a significant number of research papers in the last decade, such as [3], [4], [6], [8], [9], [12], [14], [20], and [21].
For a fixed n, consider all vertices of all trees in T that have n vertices, and choose one vertex uniformly at random.Let a n,k be the probability that the chosen vertex is of rank k.It is then natural to ask whether the limiting probability For one tree variety, decreasing binary trees, it has been shown [3], [8] that these limits a k exist, and the values of a k were explicitly computed in [4] for k 6. Recursive trees are discussed in [14].However, the methods that were successful for these trees are often unsuccessful for other tree varieties if k > 1.This is because many of the relevant differential equations cannot be solved, or even, explicitly stated, caused by the fact that many of the relevant functions lack an elementary antiderivative.We will explain this phenomenon in Section 2.
This raises the intriguing question whether we can prove that a k exists for some of these tree varieties, even though we cannot explicitly compute its value.In this paper we will answer that question in the affirmative for the two labeled tree varieties that we consider.For non-plane 1-2 trees, this result is given in Theorem 15.These trees are related to many important objects in combinatorics, such as the ab-index and cd-index of partially ordered sets, min-max trees, set partitions, and alternating permutations.Richard Stanley devotes Section 1.6 of his book [26] to these questions.
For plane 1-2 trees, the proof is very similar, and the only step that is different is carried out in Propositions 20 and 21.The main result for such trees is given in Theorem 17.Note that for k = 0 and k = 1, we are able to compute the exact values of a k .These are given in Theorems 4 and 6 for non-plane 1-2 trees and in formulae ( 20) and ( 21) for plane 1-2 trees.
Results concerning these two kinds of trees are interesting for two reasons.One is that while their definitions are only somewhat different from decreasing binary trees [3,4,8], which are in bijection with permutations, the methods needed for their study are fundamentally different from the methods needed to deal with those trees.The two varieties of 1-2 trees that we study in this paper prove to be significantly more difficult from this perspective, even though some of the same results seem to hold.The other reason to study these trees is that they are equinumerous to a large collection of combinatorial objects, so any statistic evaluated for these trees is likely to have a meaning for those objects as well.See sequences A000111 and A080635 in [25] for lists of these objects.

Non-plane 1-trees
Our first example is the class of labeled non-plane 1-2 trees.These are rooted trees in which every non-leaf vertex has at most two children, the vertices are bijectively labeled with the elements of [n] = {1, 2, . . ., n} so that the label of each vertex is less than that of its parent, and the set of children of any given vertex is unordered.See Figure 1 for the five such trees on vertex set [4].In this section, when we write tree, we will always mean a labeled decreasing non-plane 1-2 tree on vertex set [n].It is well-known [10] that the number of labeled non-plane 1-2 trees on vertex set [n] is the nth Euler number E n , and that the identity holds, where we set E 0 = 1.The first values of E n are as follows: n 0 1 2 3 4 5 6 7 8 9 10 E n 1 1 1 2 5 16 61 272 1385 7936 50521 It follows from (1) that E(z) has two singularities of smallest modulus, at z = π/2 and at z = −π/2.Therefore, the exponential order of growth of the Euler numbers is 2/π.In order to find the growth rate of the Euler numbers more precisely, note that at both of these singularities, we can find the residue of E(z) by the following well-known formula (see for instance Theorem 83.2 in [7]).
Proposition 1.Let H(z) = f (z)/g(z) be a function so that f (z) and g(z) are analytic functions at z 0 , and f (z 0 ) = 0, while g(z) = 0 and g (z) = 0. Then We can apply Proposition 1 to E(z) if we note that Applying this observation to E(z) with a = π/2 and R = −2, we get that the dominant term of E(z) is of the form 4 π n 0 z n (2/π) n , so Here f n ∼ g n means that lim n→∞ f n /g n = 1.Formula (4) can be deduced in many ways; the reader may consult pages 268-269 of [10] for one of these.Now we proceed to determine a 0 and a 1 .For these small values of k, we can explicitly determine a k , but we will also see why the same approach fails for larger values of k.
Proof.Let (v, T ) be an ordered pair in which T is a non-plane 1-2 tree on vertex set [n] and v is a leaf of T .Then A 0 (z) is the exponential generating function counting such pairs.Let us first assume that n > 1, and let us remove the root of T .On the one hand, this leaves a structure that is counted by A 0 (z).On the other hand, this leaves an ordered pair consisting of a non-plane 1-2 tree with a leaf marked, and a non-plane 1-2 tree.By the Product formula of exponential generating functions (see [2,Theorem 8.21]), such ordered pairs are counted by the generating function A 0 (z)E(z).Finally, if n = 1, then no such ordered pair is formed, while A 0 (z) has constant term 1.This leads to the linear differential equation with the initial condition A 0 (0) = 0. Solving this equation we get formula (5) for A 0 (z).
In order to determine the growth rate of the numbers A 0,n , we will need the following lemma, which is an enhanced version of Proposition 1.It can easily be proved using basic facts in complex analysis (see Theorem 1 in [7]).
g(z) be a function so that f and g are analytic functions at z 0 , and f (z 0 ) = 0, while g(z 0 ) = g (z 0 ) = 0, and g (z) = 0. Then the Laurent series decomposition of H(z) is of the following form.
where h −1 and h 0 are constants.
the electronic journal of combinatorics 26(3) (2019), #P3.41 Theorem 4. The equality holds.In other words, for large n, the average number of leaves in a random non-plane 1-2 tree on vertex set Proof.We know from (5) that A 0 (z) has a unique singularity of smallest modulus, at z = π/2, hence the exponential growth rate of its coefficients is 2/π.Also note that at that point, the denominator of A 0 (z) has a double root.Therefore, Lemma 3 applies and we get that the coefficient of the (z − π/2) −2 term in the Laurent series of Now observe that for any constant D, Applying this to the dominant term of A 0 (z) with D = π − 2 and a = π/2, we get that The proof of our claim is now immediate by comparing formulas ( 7) and (4).
It is worth pointing out that A 0 (z) = 1 − (1 − z)(tan z + sec z), which implies the identity A 0,n = (n + 1)E n − E n+1 .See sequence A034428 in the Online Encyclopedia of Integer Sequences [25], where a different interpretation is given (the number of permutations of descent pattern up-up-down-up-down. . .).Our result leads to the following natural question.Question 5. Is there a natural bijection from the set of all vertices of non-plane 1-2 trees on vertex set [n + 1] in which the root has only one child to the union of the set of all leaves of all non-plane 1-2 trees on vertex set [n] and the set of all non-plane 1-2 trees on vertex set [n + 1]?

Vertices of rank 1
Let A 1,n be the total number of vertices in all non-plane 1-2 trees on vertex set [n] that are of rank 1.Note that such vertices are neighbors of a leaf.If n > 1, then each leaf has exactly one rank-1 vertex as a neighbor, while some rank-1 vertices have not only one, but two leaves as neighbors.
The first few members of the sequence Theorem 6.The equality ) be an ordered pair in which T is a non-plane 1-2 tree on vertex set [n] and v is a vertex of T that is of rank 1.If v is not the root of T , then removing the root of T decomposes (v, T ) into two structures, one of which is again a non-plane 1-2 tree with a vertex of rank 1 marked, and the other one of which is simply a non-plane 1-2 tree.If n > 1, and v is the root of T , then removing v, we get two structures, one of which is a leaf, and the other one is a non-plane 1-2 tree.These two structures are distinguishable unless the original tree had three vertices, and its root had two children.That tree contributed z 3 /6 to the generating function A 1 (z), but that contribution was counted twice.This leads to the linear differential equation with the initial condition A 1 (0) = 0. Solving this equation we get The above formula for A 1 (z) shows that A 1 (z) has a unique singularity of smallest modulus, at z = π/2.Therefore, the exponential growth rate of the coefficients of A 1 (z) is 2/π.At z = π/2, the power series A 1 (z) has a pole of order two, since the denominator has a double root at that point, while the numerator is non-zero there.Therefore, we can apply Lemma 3 with f (z) = 12z sin z + 12 cos z − 12 − 3z 2 cos z − z 3 and g(z) = 6(1 − sin z).Then f (π/2) = 6π − π 3 8 − 12, while g (π/2) = 6.Hence Lemma 3 shows that the dominant term of Comparing this to (4), we obtain the statement of the theorem.
Remark 7. Note that it directly follows from the argument we used to prove (8) that if R 1 (z) is the exponential generating function for the number of non-plane 1-2 trees on vertex set [n] whose root is of rank 1, then the electronic journal of combinatorics 26(3) (2019), #P3.41 Unfortunately, this closed form for R 1 (z) does not lead to an expression for R 1 (z) in terms of elementary functions, since the integral z tan z dz is known to be non-elementary [5, p. 163].

Vertices of rank 2
The methods that we used to enumerate vertices of rank 0 and rank 1 will fail for vertices of higher rank, because we are not able to obtain, let alone, solve the linear differential equations analogous to (8) in a closed form, since the relevant functions have no elementary antiderivatives.Remark 7 shows how early these kinds of problems start occurring; we are not even able to state the equation analogous to (8) in an explicit form.Therefore, we apply a new method to prove that the limit a k = lim n→∞ a n,k exists.We will then be able to approximate a k from above and below.Our first simple notion is the following.Each vertex of a tree is the root of a unique subtree, which we will call the subtree of the vertex.In other words, the subtree of a vertex v consists of all descendants of v, including v itself.The subtrees of leaves consist of one vertex only.
For a fixed positive integer r, let V n,r be the probability that a randomly selected vertex in a random non-plane 1-2 tree of size n is the root of a subtree of size exactly r.For instance, if n = 3, then V n,1 = 1/2, V n,2 = 1/6, and V n,3 = 1/3.Indeed, there are two non-plane 1-2 tree of size three, (a path and a wedge) with a total of six vertices.Three of those vertices are leaves, hence V 3,1 = 3 6 = 1 2 , on of them (the middle vertex of the path) has one proper descendant, so V 3,2 = 1 6 , while the remaining two vertices are the two roots, yielding V 3,3 = 2 6 = 1 3 .Vertices of a given subtree size are much easier to enumerate than vertices of a given rank, because the number of ways in which a vertex can have a subtree of size r is a fixed number, namely the Euler number E r , once the set of labels in that subtree is selected.Proposition 8.For all positive integers r, the limit Then by the Product formula, we have where f r (z) is the generating function for the number of trees in which the root has a "subtree" of size r.That is, f r (z) = E r z r /r!, so f r (z) = E r z r−1 /(r − 1)!, and the last displayed equation becomes This is a first order linear differential equation with initial condition V r (0) = 0. Its solution is the electronic journal of combinatorics 26(3) (2019), #P3.41 where L r (z) is the function that satisfies L r (z) = z r (1 − sin z) and has a constant term so that V r (0) = 0 holds.The integral in the numerator can be explicitly computed using the well-known formula This means that V r (z) has a unique singularity of smallest modulus (a double pole) at z 0 = π/2.The rest of the argument uses Lemma 3 at z 0 = π/2 to determine v r , in the same way as we did in the proofs of Theorems 4 and 6.
Remark 9. Note that we are able to explicitly solve the linear differential equation ( 10) because its correction term, that is, the summand that does not contain V r (z) or V r (z), is a polynomial.The same argument used here would work for any polynomial instead of f r (z) = E r z r−1 /(r − 1)!.
Proposition 8 shows that the limit v r exists for every fixed positive integer r.As the v r are all positive real numbers, and r v r 1, the sum ∞ r=1 v r is convergent.However, what is the value of that sum?The exact formulas we obtain for each v r from Proposition 8 are too complicated to be useful for the computation of that sum.Note that it is not true in every tree variety that the analogously defined sum is equal to 1.A simple counterexample is the family of rooted trees in which every non-leaf vertex has exactly one child.In that case, there is only one tree of each size, but v r = 0 for all r, since V n,r = 1 n for r n.Therefore, ∞ r=1 v r = 0 for that tree variety.However, for our non-plane 1-2 trees, the sum turns out to be 1, although not in a trivial way.This is the content of the following theorem that has been conjectured by the present authors, and has recently been proved by Svante Janson [15].In order to prove Theorem 10, we first need the following fact.
Proposition 11.For all n, the expected number of leaves in a random non-plane 1-2 tree on vertex set [n] is at least n/4.
Note that in Theorem 4, we proved that much more is true for large n.However, the statement of Proposition 11 is true for every n.With a little bit of additional work, it is possible to prove that in fact, the expected number of leaves is at least n/3 for every n, but the weaker claim of Proposition 11 suffices for our purposes.
Proof.(of Proposition 11.) Every such tree contains exactly one more leaves than vertices with two children.Therefore, it suffices to show that the expected number of vertices with one child is not more than n/2.We prove this by induction on n.Let M n be the expected number of vertices with one child in a random tree on vertex set [n].Then M 1 = 0, M 2 = 1, and M 3 = 1, so the statement holds if n 3. Now let us assume that n > 3. Let p n be the probability of the event P n that the root of a non-plane 1-2 tree on [n] has exactly one child.Furthermore, let M m,A denote the expected number of vertices with one child in a random non-plane 1-2 tree of size m given that event A occurs.Now let A be the event that the root of such a random tree has one child, and let Ā denote the event that that root has 0 or 2 children.Then by Bayes' theorem for expectations, So, by our induction hypothesis, The last inequality follows, since p n = E n−1 /E n , the ratio of two consecutive Euler numbers, and the Euler numbers are known to be log-convex [19].So the sequence of the numbers p n is decreasing.As p 3 = 1/2, it follows that p n 1/2 if n 3.
Let Z n be a random variable defined on the set of all vertices of all non-plane 1-2 trees on vertex set [n], so that Z n (v) is the size of the subtree rooted at v. Lemma 12. Let v be a vertex of a nonplane 1-2 tree chosen uniformly at random.Then for all n, the inequality E( √ Z n ) 100 holds.
Proof.We will use strong induction to prove the stronger inequality This inequality clearly holds for n = 1.Now let us assume that it holds for all positive integers r < n and prove it for n.
Let T be a tree of size n, selected uniformly at random.Let v be a vertex of T , selected in the same way.
Then by Proposition 11, there is an at least 1/4 chance of v being a leaf.There is an 1/n chance of v being the root.There is a less than 3/4 chance of v being a vertex other than a leaf or the root, in which case the induction hypothesis applies to the subtree of v, with some r < n playing the role of n.Therefore, where the last estimate holds as n 1.
Now we are ready to prove Theorem 10.
Proof.(of Theorem 10) By Lemma 12 and by Markov's inequality, we know that for all positive constants C, and for all n, we have Let us now assume that ∞ k=1 v k = α < 1.That means that for all N , the inequality N k=1 v k < α holds.In other words, if n is large enough, then a random 1-2 tree on [n] has on average at least (1 − α)n/2 vertices whose subtree is of size more than N .That is, Now select C to be a positive integer so that 1/C < (1 − α)/2, then select N = 10000C 2 .Then inequality (12) forces for all n, while inequality ( 13) forces P r(Z n > N ) (1 − α)/2 for n sufficiently large, which is clearly a contradiction.
The following is an obvious corollary of Theorem 10 that we will need later.
Corollary 13.Let U n,r = 1 − r i=1 V n,i be the probability that a random vertex of a random non-plane 1-2 tree has a subtree of size larger than r.Then clearly, We now return to our main goal, that is, to proving that the limit a k = lim n→∞ a n,k exists.For the rest of this section, we fix the rank k of vertices we are studying, and, to alleviate notation, we do not add the index k to all parameters related to these vertices.
Our main idea is the following.The set R k of all vertices of all trees of size n contains the set ∪ r i=1 W n,i , where W n,i is the set of all vertices of all trees of size n that are of rank k and have a subtree of size i.On the other hand, R k is contained in the set (∪ r i=1 W n,i ) ∪ (∪ i>r V n,i ), where V n,i is the set of all vertices in all trees of size n whose subtree is of size i (but are of any rank).
Let W n,i be the probability that a random vertex of a random tree of size n is of rank k and is the root of a subtree of size i.
The limits w i exist, because the exponential generating functions of the numbers W n,i satisfy a linear differential equation like (10), and, as explained in Remark 9, we can explicitly solve those differential equations, since their "correction term" is a polynomial.Indeed, there are only a finite number of ways that a subtree of a vertex can be of rank k and have a subtree of size i, once the set of labels going into that subtree is selected.
As the w i are positive real numbers, and for all r, the inequality r i=1 w i 1 holds, the sum Now we are ready to state and prove our main theorem.
Theorem 15.For all nonnegative integers k, the limit Proof.First notice that for all n and r, the inequality holds, since the left-hand side is the probability of a random vertex having a more restrictive property (rank k, subtree size at most r) than the property represented on the right-hand side (rank k).Therefore, and so Now notice that for all n and r, the inequality holds.Indeed, the right-hand side is the probability of a random vertex being of rank k and having a subtree of size at most r, or simply having a subtree of size more than r (and any rank).A particular way of this occurring is when the random vertex is of rank k, which is the event whose probability is represented on the left-hand side.This implies that for all r, we have lim sup As r goes to infinity, the first sum on the right-hand side goes to w, while the second sum goes to 0, as we saw in Corollary 13.This proves that lim sup n→∞ a n,k w.
Comparing inequalities ( 16) and ( 18), we see that completing the proof of the theorem.
For numerical approximations, one can use the following corollary, which is an immediate consequence of Theorem 15 that we have just proved, and inequalities ( 15) and ( 17) that we have used in the proof of that theorem.
Corollary 16.For all r, the chain of inequalities

Plane 1-2 trees
The next tree class we study is the class of decreasing plane 1-2 trees on vertex set [n].These are similar to the trees of the previous section, except that now the order of the children of each vertex matters.See Figure 2 for an illustration.We denote the number of such trees on [n] by b n .
Our goal in this section is to show the following analogue of Theorem 15.Let us choose a vertex of the set of all vertices of all plane labeled trees on vertex set [n] uniformly at random.Let a n,k be the probability that the chosen vertex is of rank k, and let us keep all definitions of the previous section, just take them for plane 1-2 trees instead of non-plane ones.
Theorem 17.For all nonnegative integers k, the limit Proof.Most steps are similar to what we saw in Section 2, but there will be one step that requires a separate argument.In this section, if we simply say "tree", we always mean a decreasing plane 1-2 tree.
The first few values of the sequence b n , starting with b 1 , are 1, 1, 3, 9, and 39.These trees were studied in [1].Set b 0 = 1, and consider the exponential generating function Removing the root of such a tree results in a structure counted by B (z).On the other hand, if the tree had more than one vertex, then it results in a pair of such trees, except in the case when the root had only one child.This leads to the separable differential equation Solving this equation yields The power series form of B(z) leads to the asymptotic formula Just as it was the case for non-plane trees, we can determine the values of a 0 and a 1 for plane 1-2 trees as well.

Leaves
We can find the ratio of leaves among all vertices in a way that is analogous to that for non-plane 1-2 trees.
Theorem 18.The exponential generating function of the numbers of leaves in decreasing plane 1-2 trees is which satisfies the differential equation Proof.Just like in our proofs for analogous results in Section 2, we count ordered pairs (v, T ), where v is a leaf of the tree T .Let us remove the root of T .Then there are two cases, namely, either the removed root was v, or it was not.If v is not the root, and we got two trees, one with the marked vertex, then the Product formula yields the generating function 2B 0 (z)(B(z) − 1), as the order of the components matters.
If v is not the root, and the root has only one child, then removing the root, we get only one tree, with a marked vertex, which contributes the generating function B 0 (z).
Finally, if v is the root, the only possible tree is the one-point graph.The removal of that root leads to the empty graph, represented by 1 = z 1 and, by recalling (19),

Neighbors of leaves
This case is similar to that of leaves, with some subtle differences.Let b 1,n denote the number of all vertices of rank 1 in all trees on vertex set [n], and let B 1 (z) be the exponential generating function of these numbers.
Theorem 19.The generating function B 1 (z) satisfies the differential equation the electronic journal of combinatorics 26(3) (2019), #P3.41 Let us return to the proof of Proposition 20.Consider all E n non-plane trees on vertex set [n].Let s 1 , s 2 , • • • , s En denote the number of vertices with exactly one child in each of these trees, and let us order the set of these E n trees so that the sequence of the s i is non-decreasing, that is, s 1 s 2 • • • s En .Then the average number of vertices with one child in all non-plane 1-2 trees on [n] is On the other hand, if such a tree T has s i vertices with one child, then it has (n−1−s i )/2 vertices with two children, (and, though we will need this only later, T has (n + 1 − s i )/2 leaves).Therefore, there are exactly 2 (n−1−s i )/2 plane 1-2 trees on vertex set [n] that are identical to T as non-plane trees, and each of those trees has s i vertices with one child.This proves that the average number of vertices with exactly one child in all plane 1-2 trees on vertex set [n] is Finally, note that the sequences s 1 s 2 • • • s En and 2 (n−1−s 1 )/2 2 (n−1−s 2 )/2 • • • 2 (n−1−s En )/2 satisfy the requirements of Proposition 21, so M n m n holds.So the expected number of vertices with one child in a random non-plane 1-2 tree is at least as large as the expected number of vertices with one child in a random plane 1-2 tree of the same size.Therefore, the expected number of leaves in a plane 1-2 tree is at least as large as the expected number of leaves in a random non-plane 1-2 tree of the same size.The proof of our claim is now immediate, since we saw in Proposition 11 that the expected number of leaves in a random non-plane 1-2 tree on vertex set [n] is at least n/4.
All remaining steps of Theorem 15 can be carried out without any extra effort, showing that the limits a k exist for all k, for the variety of plane 1-2 trees as well.

Approximations
Corollary 16 makes numerical approximations of a k possible.As the upper bound provided by (17) was obtained by a rather crude estimate, it is reasonable to assume that the lower bound in that corollary is a better estimate for w than the upper bound.It follows from our methods that both the upper and the lower bounds will be of the form π −2 F (π), where F is a polynomial function with rational coefficients.For instance, selecting k = 2 and r = 12 leads to a lower bound of 0.188285 a 2 .On the other hand, less rigorous but more extensive computations carried out by Jay Pantone [22] suggest the approximate values a 2 ≈ 0.20278137, a 3 ≈ 0.0893474, and a 4 ≈ 0.0243854.

1 !
in the differential equation.By the generating function we can determine the first values of b 0,n :