Rooted Tree

DOWNLOAD Mathematica Notebook RootedTrees

A rooted tree is a tree in which a special ("labeled") node is singled out. This node is called the "root" or (less commonly) "eve" of the tree. Rooted trees are equivalent to oriented trees (Knuth 1997, pp. 385-399). A tree which is not rooted is sometimes called a free tree, although the unqualified term "tree" generally refers to a free tree.

A rooted tree in which the root vertex has vertex degree 1 is known as a planted tree.

The numbers of rooted trees on n nodes for n=1, 2, ... are 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, ... (OEIS A000081). Denote the number of rooted trees with n nodes by T_n, then the generating function is

T(x)=sum_(n=0)^(infty)T_nx^n
(1)
=x+x^2+2x^3+4x^4+9x^5+20x^6+48x^7+115x^8+286x^9+719x^(10)+....
(2)

This power series satisfies

T(x)=xexp[sum_(r=1)^(infty)1/rT(x^r)]
(3)
t(x)=T(x)-1/2[T^2(x)-T(x^2)],
(4)

where t(x) is the generating function for unrooted trees. A generating function for T_n can be written using a product involving the sequence itself as

 xproduct_(n=1)^infty1/((1-x^n)^(T_n))=sum_(n=1)^inftyT_nx^n.
(5)

The number of rooted trees can also be calculated from the recurrence relation

 T_(i+1)=1/isum_(j=1)^i(sum_(d|j)T_dd)T_(i-j+1),
(6)

with T_0=0 and T_1=1, where the second sum is over all d which divide j (Finch 2003).

As shown by Otter (1948),

alpha=lim_(n->infty)(T_n)/(T_(n-1))
(7)
=2.955765...
(8)

(OEIS A051491; Odlyzko 1995; Knuth 1997, p. 396), where alpha is given by the unique positive root of

 T(1/x)=1.
(9)

If T_n is the number of nonisomorphic rooted trees on n nodes, then an asymptotic series for T_n is given by

 T_n∼alpha^nn^(-3/2)(0.4399240125...+(0.0441699018...)/n+(0.2216928059...)/(n^2)+(0.8676554908...)/(n^3)+...),
(10)

where the constants can be computed in terms of partial derivatives of the function

 F(x,y)=xexp[y+sum_(k=2)^infty(T(x^k))/k]-y
(11)

(Plotkin and Rosenthal 1994; Finch 2003).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.