Prüfer Code

Author

Eric W. Weisstein
June 3, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GraphTheory/PrueferCode.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PrueferCode.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Enumeration

Show[GraphicsArray[
Flatten[Partition[#,6,6,{1,1},{}]&/@Map[ShowLabeledGraph[RootedEmbedding[CodeToLabeledTree[#]],
VertexStyle->Disk[.14],
VertexColor->Red,
PlotLabel->TraditionalForm[#],
DisplayFunction->Identity,
PlotRange->All]&,
Table[Flatten[Outer[List,Sequence@@Table[Range[n],{n-2}]],n-3],
{n,3,4}],
{2}],
1],
GraphicsSpacing->.2
]]

Example

ShowLabeledGraph[RootedEmbedding[CodeToLabeledTree[{1,2,1,3,3,5}]]]