next up previous
Next: Labeling Up: General Trees Previous: General Trees

Generation

There are at least two interesting behaviors that should be noted. The first is that the generation algorithm $\mathit{Generate}(n)$ depends on the results of $\mathit{Generate}(n-1)$. The second is that we cache these results. That is, while $\mathit{Generate}(12)$ may require 1m6s to run the first time, if we make the query again, the answer has been cached, and is returned immediately.

In the experiment, we ran $\mathit{Generate}(n)$ on increasing values of $n$, without clearing the cache. Furthermore, it means that when $\mathit{Generate}(12)$ made a call to $\mathit{Generate}(11)$, those results were cached, and returned immediately. Therefore, if no cache were present, then $G_w(n)$ would be (approximately) $\Sigma_{i=1}^{n} G_w(n)$ as $G_w(n)$ now appears in the table, and similarly for $G_s(n)$. This difference is significant.

There is some reason to believe that the times required for labelings are influenced more strongly by certain trees than by others. Certainly the time to label all the trees must increase as there are more trees to label, but by examining the labelings, we can show that certain trees require significantly more time than others.



Joshua Taylor 2005-04-27