The Stored Tree algorithm's runtime is bound by . This comes
from solving the recurrence relationship of the recursive algorithm as follows.
Is the recurrence relationship of Stored Tree.
Change of variable to n.
This shows that the running time is bound by .
Below is a plot of the above data I collected on the running time of Stored Tree. These test were done on waldrog using the systems time
command and reading off the real output. Plotted with the data points is
the curve of with k set to 8.7E-6. The plot's y axis is on
a logarithmic base 3 scale to show finer detail.
The curve of does not match the data points very well, I believe is
because of two things. When n is small (n<8)
does not account for
startup time of the program, loading into memory operating systems calls, and
ending time printing the data, and so on. When n is large (n>12) the tree
takes a LOT of virtual memory space, virtual memory is slow and probably could
account for the extra time on the running. Also the virtual memory plays
another role in this algorithm, for n>13 the program can not be solved on
waldrog because it runs out of virtual memory at about 150MB, any n greater
than 13 in my tests made the virtual memory fail.