0
$\begingroup$

Given a tree that has three nodes each level I want to find the formula that predicts the number of all nodes with a given tree height.

enter image description here

I fitted the data into Numbers with an exponential function and it gave me a numeric formula:

enter image description here

But I'd like to know how to derive a non-numeric (calculus type) formula for this. What I did was finding out the growth formula

y(t) = a * e^(kt)

where

a = initial value
y = value after time/steps 
k = growth factor
t = time (or step)

But fitting my data into this formula doesn't give right predictions. For example:

a = 1
t = 4
y(t) = 40

Solving for k in step 4 (t=4):

(1) 40 = 1 * e^(4k)
(2) ln(40) = 4k
(3) k = ln(40) / 4 = 0.9222

Predicting number of all nodes in step 5 (t=5):

(4) y(5) = e^(0.9222*5) = 12.53

The answer is wrong because the tree has at 5th step already 121 nodes.

What am I doing wrong? What is the correct way to calculate this?

Thanks. Pom.

$\endgroup$

2 Answers 2

0
$\begingroup$

The following equation is suitable for growth $$\frac{3^k-1}{2}$$ where $k$ is the number of the steps.

$\endgroup$
2
0
$\begingroup$

You are wrong choosing such kind of formula as desired one. However correct form is $y(t) = a\cdot e^{kt} + b$, but your way of getting formula by doing computation experiment in this case seems to be bad idea. It would be better to read about geometric progression.

$\endgroup$
1
  • $\begingroup$ Good tip, thanks a lot. $\endgroup$
    – Pompair
    Oct 12, 2013 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .