[Math] How many labellings are there for a tree on 7 vertices

graph theorytrees

I know that Cayleys formula tells us there are $7^5=16807$ unique labelled trees. I also know the 11 trees that form these 16807 different variations.

What I can't calculate is how many of each type of tree there are. If we have a tree where every vertex has order 1 except one vertex which has order 6, then clearly we can only have 7 unique possible labelled trees for this tree.

However when I investigate the tree which has degree sequence $\{1,1,1,1,1,2,5\}$ I do not know how to calculate how many labelled trees this has.

Best Answer

Any graph on $n$ vertices with $k$ automorphisms – ways its vertices can be mapped onto themselves to preserve the edges – has $\frac{n!}k$ labellings. Applying this to the trees on seven vertices (the image below taken from Peter Steinbach's Field Guide to Simple Graphs, available on the OEIS under the links at A000055):

we see that the trees from left to right have the following numbers of automorphisms: $$2,2,1,6,8,2,6,4,12,24,720$$ Dividing $7!=5040$ by each number gives the number of labellings of each of these trees: $$2520,2520,5040,840,630,2520,840,1260,420,210,7$$ As expected, they add up to $7^5=16807$.


Finding the order of the automorphism group of a tree
As an example, take the second tree from the left. There is only one order-3 vertex, so it must stay fixed in any automorphism. Three paths radiate from this vertex – one of length 4 that must also stay fixed, and two of length 1 that can be swapped. Multiplying the numbers together gives two automorphisms.

For the rightmost star, while the central hub must stay fixed, the six spokes can be permuted in any order, yielding $6!=720$ automorphisms.