Trivalent Tree

Author

Eric W. Weisstein
February 18, 2004

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

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

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

Enumeration

Degrees ≤ 3

Count[#,_?(Max[DegreeSequence[#]]≤3&)]&/@Trees/@Range[14]//Timing

ShowGraphArray[Flatten[Partition[#,6,6,{1,1},{}]&/@(Select[#,Max[DegreeSequence[#]]≤3&]&/@Trees/@Range[7]),1],VertexStyle->Disk[.12]]

Degrees 1 or 3

Count[#,_?(Complement[Union[DegreeSequence[#]],{1,3}]=={}&)]&/@Trees/@Range[14]//Timing

ShowGraphArray[Flatten[Partition[#,6,6,{1,1},{}]&/@(Select[#,Complement[Union[DegreeSequence[#]],{1,3}]=={}&]&/@Trees/@Range[14]),1],VertexStyle->Disk[.1]]