next up previous
Next: Experiments and Results Up: Graceful Labeling Previous: Special Labeling

General Labeling

The general trees are more difficult to label, but using the algorithm that we developed and refined, we are able to efficiently find graceful labelings for many trees. It is implemented as two procedures, $\mathit{Label(G)}$ and $\mathit{RecursiveLabel(G)}$.


\begin{algorithm}
% latex2html id marker 236
[ht!]
\caption{$\mathit{Label}(G)$...
...ng
\ELSE
\STATE unlabel $v$
\ENDIF
\ENDFOR
\end{algorithmic}\end{algorithm}


\begin{algorithm}
% latex2html id marker 244
[ht!]
\caption{$\mathit{RecursiveL...
...unlabel $q$
\ENDIF
\ENDFOR
\ENDFOR
\ENDFOR
\end{algorithmic}\end{algorithm}



Joshua Taylor 2005-04-27