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.
I fitted the data into Numbers with an exponential function and it gave me a numeric formula:
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)
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?