How many vertices at each level in this tree?

635 Views Asked by At

Suppose we have a tree like on the picture below ( note that only part of the tree is pictured ), i.e. each time number of edges coming from vertex is increasing by 1 (from left to right).

enter image description here
Let us denote $A(n)$ as a number of vertices at level $n$. For example, the first $A(n)$ are $$A(0) = 1,\, A(1) = 1,\, A(2) = 2,\, A(3) = 7,\, A(4) =\ldots$$ Question is to

find the closed form for $A(n)$.

2

There are 2 best solutions below

0
On

We can find a recursion function for $A(n)$. Let $B(n)= \sum_{i=0}^{n-1} A(i)$. The numbers on level $n$ are the numbers from $B(n) + 1, \ldots, B(n) + A(n)$. Hence the sum of these numbers are the number of vertices at level $n+1$, which is $$\begin{split}\sum_{j=B(n)+1}^{B(n)+A(n)}j &=\sum_{j=1}^{B(n)+A(n)} j - \sum_{j=1}^{B(n)} j\\ &=\frac{(B(n)+A(n))(B(n)+A(n)+1)}{2}-\frac{B(n)(B(n)+1)}{2}\\ &= \frac{A(n)^2 + 2A(n)B(n)+A(n)}{2}\end{split}$$ Hence $2A(n+1)=A(n)^2 + 2A(n)\left(\sum_{i=0}^{n-1}A(i)\right) + A(n)$.

3
On

It is not an answer.


I have got recurrent relation for $A(n)$ too. But it slightly differs from @Simon's. Here how I made it.


It is easy to show that $$A(n) = A(n-1)X_n + \frac{A(n-1)(A(n-1)+1)}{2},$$ where $X_n$ is a number of vertices generated by the last (from right to left) vertex at level $n-1$. Next, one can show that $$X_n = \sum_0^{n-2}A(k).$$
So it seems like my answer is twice less than @Simon's.