-protected Vertices In Unlabeled Rooted Plane Trees
We find a simple, closed formula for the proportion of vertices which are k-protected in all unlabeled rooted plane trees on vertices. We also find that, as goes to infinity, the average rank of a random vertex in a tree of size approaches 0.727649, and the average rank of the root of a tree of size approaches 1.62297.
Mathematics Subject Classification 05A15 05A16 05C05
Key words and phrases:tree, enumeration, asymptotics
2010 Mathematics Subject Classification:Primary: 05A15, 05C05; Secondary: 05A16
Unlabeled rooted plane trees are one of the simplest tree structures. They are used to model any network with a point of origin. We will ask the question, if you start at a leaf and take only upward steps, how far might we expect to go to reach a vertex?
The modern world is full of different kinds of networks. In every network it could be advantageous or disadvantageous to have highly protected vertices. For example, in many online communities, people must be invited in order to participate. If we were to create a tree of users where each person is connected to the person who invited them, then each time a user adds a member they once again become 1-protected. Thus a high level of protection most likely indicates that someone is not regularly bringing in new members.
In a network that must remain secure, it is desirable to make it difficult to reach the root, so we would like for the root to be highly protected (another question we will address directly), but we also would like nodes in general to have a high level of protection. For example, in a computer network with different levels of access, even if the network is very tall (in other words, the lowest entry point is many steps from the root), if it has a leaf at a high level, the root will still be far more accessible than the height of the network would imply.
We will call a vertex k-protected if we must take at least downward steps to reach any leaf. In Figure 1, each vertex is labeled by the highest for which it is -protected (any vertex that is 4-protected is also 3-protected), this is also known as the rank. The number of -protected vertices was explored for this class of tree with by Cheon and Shapiro . The topic of protected vertices has been examined for random recursive trees by Mahmoud and Ward , -ary trees by Mansour , binary search trees by Bóna , random phylogenetic trees by Bóna and Flajolet , several types of random trees by Devroye and Janson , and digital search trees by Du and Prodinger .
Throughout this paper any reference to a tree will specifically mean an unlabeled rooted plane tree.
We will also freely use a few facts. The number of such trees on vertices, is the st Catalan number, and the ordinary generating function of the number of such trees on vertices is . The number of all vertices of trees of size , , is the st central binomial coefficient, and they have the ordinary generating function .
Grafting is a process in horticulture where a branch from one tree is removed and a branch from a different tree is inserted in its place. We will do something very similar with the following lemma.
Let be the ordinary generating function for , the number of rooted plane trees on vertices whose root is -protected. Let be the ordinary generating function for , the number of leaves in all rooted plane trees of size (or, equivalently, all rooted plane trees with edges). Let be the ordinary generating function for , the number of -protected vertices in all trees of size . Then .
Let We can count the number of -protected vertices on a tree with vertices by choosing a tree on vertices, removing a specific leaf, then replacing that leaf with a tree whose root is -protected. We can choose that leaf in one of ways and the tree in ways, so the result follows by the product formula. ∎
To apply this, of course, we need . Let where is the number of trees on vertices with leaves. We have that satisfies the functional equation , and solving for , we have . The function we want, , will be equal to . Thus
To find expressions for , we first observe that since a tree with a 1-protected root is simply a non-empty sequence of trees, we have where giving Further, this can be iterated since a root is -protected if and only if it is a non-empty sequence of trees whose roots are -protected. Thus we have the recursion .
For all ,
where and are polynomials defined as follows: for all , , and for all
For some numerical justification, this gives the series expansions and , each of which are accurate up to trees of size 6 by examination. To prove this theorem we will need some purely computational lemmas.
For all ,
We will proceed by induction on .
For the base case, if , then
For the induction step, we assume that the statement holds for , so from (2.2),
If , then
The expansion of splits nicely into 3 parts as follows:
The first two terms will be for all .
For all we will have a two copies of and copies of giving a net total of . This means there will be no term.
For all we will have no negative terms, and for each term we will have copies of giving us
of Theorem 1.
We once again proceed by induction on .
For the base case, if , then, after clearing denominators and multiplying by the conjugate of the denominator,
Now, assuming that the statement holds for , and after clearing denominators and multiplying by the conjugate of the denominator,
We will say that if .
Theorem 3.1 (Bender’s Lemma ).
Suppose that and are power series with radii of convergence , respectively. Suppose approaches a limit as approaches infinity. If , then , where .
For all , is never zero on the closed disk of radius .
Let . Then , , and
Observe that, for , . Now we have that
If , then , so that . Hence for all ∎
Let be the number of vertices which are -protected in all rooted plane trees of size of . Then .
Note that is the generating function for the number of all vertices of all trees of size . We have that
Since is non-zero on the closed disk of radius 4/15, it follows that the term on the right is asymptotically irrelevant and that has a radius of convergence larger than 1/4 for all . Thus we can apply Bender’s Lemma to the term on the left for any , giving
Since we have the recurrence and , we have . Applying Lemma 3 we have
so that . Thus
Let be the probability that a random vertex in a random rooted plane tree of size is -protected. Then .
To find the average, we divide by . ∎
This gives the sequence of values 1, 1/2, 1/6, 1/22, 1/86,…, and also shows that as we progress to a higher level of protection, we lose about 1/4 of the vertices each time. The result for agrees with the result by Cheon and Shapiro .
For numerical justification, we have, if ,
There are some other interesting questions which can be answered using . The height of a tree is defined as the longest path from the root to a leaf. The function enumerates instead by the shortest path from the root to a leaf.
Let be the number of trees on vertices whose root is -protected. Then
where denotes the st Catalan number.
We have that
The term on the right is once again asymptotically irrelevant, so we have
Thus we have
This gives the sequenced of values 1, 1, 4/9, 16/121, 64/1849, …, and once again shows that we lose about 1/4 of the trees each time we progress to a higher level of protection.
Recall that the rank of a vertex is the distance of the shortest downward path from a vertex to a leaf.
The number of vertices of rank in trees of size approaches the value .
It follows immediately from the definition that a vertex has rank if and only if it is -protected but not -protected, so by Theorem 3, the number of vertices of rank approaches
Let denote the expected value of the rank of the root of a tree of size n. Then
Let denote the expected value of the rank of a random vertex in a tree of size n. Then
Proof of Theorems 5.
Let where is the sum of the ranks of the roots of all trees of size . Clearly , since the trees with roots of rank one is counted once by , the trees with roots of rank two are counted once by and once by , and similarly the trees with roots of rank are counted once by each for . Since has no terms of degree lower than , their sum converges as a formal power series. It follows that
The sums and both converge absolutely on the closed disk of radius 1/4, so we can split the sum as follows:
Since the coefficient of and the double sum on the right both converge absolutely to bounded, analytic functions on the closed disk of radius 5/14, it follows that the term on the right remains asymptotically irrelevant, and that we may apply Bender’s Lemma to the term on the left, and the result follows.
Proof of Theorem 6.
The proof is similar to that of Theorem 5 with the role of replaced by . ∎
For numerical justification, we may compute the th coefficient using only the st partial sum, since there are no vertices or roots which are -protected in a tree of size . We have that
-  Edward Bender, Asymptotic methods in enumeration, SIAM Rev 16 (1974), 485 – 515.
-  Miklós Bóna, k-protected vertices in binary search trees, Adv Appl Math 53 (2014), 1–11.
-  Miklós Bóna and Philippe Flajolet, Isomorphism and symmetries in random phylogenetic trees, J Appl Probab 46 (2009), 1005–1019.
-  Gi-Sang Cheon and Louis W. Shapiro, Protected points in ordered trees, Appl Math Lett.
-  Luc Devroye and Svante Janson, Protected nodes and fringe subtrees in some random trees, Electron Commun Prob 19 (2014), 1–10.
-  Rosena R.X. Du and Helmut Prodinger, On protected nodes in digital search trees, Appl Math Lett 25 (2012), 1025–1028.
-  Hosam M. Mahmoud and Mark D. Ward, Asymptotic properties of protected nodes in random recursive trees, J Appl Probab 52 (2015), 290–297.
-  Toufik Mansour, Protected points in k-ary trees, Appl Math Lett 24 (2011), 478–480.