next up previous
Next: Graceful Labeling Up: Generation Previous: Special Trees

General Trees

General trees are more difficult computationally, and are enumerated by systematic augmentation, and then removal of duplicates, the test of duplicity being $\mathit{gequal}$.

While general generation is computationally more difficult, it is conceptually simple, and easy to define in terms of several short algorithms.


\begin{algorithm}
% latex2html id marker 140
[ht!]
\caption{$\mathit{Augmentati...
...ert $\mathit{Augment}(v,G)$\ into $S$
\ENDFOR
\end{algorithmic}\end{algorithm}


\begin{algorithm}
% latex2html id marker 149
[ht!]
\caption{$\mathit{AugmentSet...
...cup \mathit{AugmentationsOfGraph}(g)$
\ENDFOR
\end{algorithmic}\end{algorithm}

With these two building blocks, it is now easy to generate all trees of any given order.


\begin{algorithm}
% latex2html id marker 158
[ht!]
\caption{$\mathit{Generate}(...
...tSetOfGraphs}(\mathit{Generate}(n-1))$
\ENDIF
\end{algorithmic}\end{algorithm}



Joshua Taylor 2005-04-27