Symmetry as a Counting Tool
A graph may have many spanning trees, but its symmetries can make those trees fall into a small number of classes. Instead of listing every spanning tree separately, we can group trees that are carried into one another by a symmetry of the graph, count the members of each class, and add those counts. The essential caution is that different classes can have different sizes: counting classes alone does not count spanning trees.
All graphs in this tutorial are finite and simple unless a contraction is explicitly discussed. A spanning tree of a connected graph \(G\) is a subgraph with vertex set \(V(G)\) that is connected and has no cycles. Write \(t(G)\) for the number of spanning trees of \(G\). For a connected graph with one vertex, \(t(G)=1\), since the graph with that vertex and no edges is its only spanning tree.
Automorphisms preserve the properties that define a spanning tree: they preserve adjacency, connectivity, and cycles. Thus the action really does send a spanning-tree candidate to another spanning tree. If the automorphisms split the spanning trees into orbits \(O_1,\dots,O_r\), then each spanning tree belongs to exactly one orbit, so
Orbit Sizes and Edge Symmetry
Proof. Let \(\Gamma\) be the group and let \(\Gamma_x=\{\varphi\in\Gamma:\varphi(x)=x\}\) be the stabilizer of \(x\). Two group elements \(\varphi,\psi\) send \(x\) to the same object exactly when \(\psi^{-1}\varphi\in\Gamma_x\): applying \(\psi^{-1}\) to \(\varphi(x)=\psi(x)\) gives this condition, and reversing the steps proves the converse. Consequently, the group elements that send \(x\) to any one object in its orbit form a coset of \(\Gamma_x\), with \(|\Gamma_x|\) elements. These cosets partition \(\Gamma\), one for each object in the orbit. Therefore \(|\Gamma|=|O(x)|\,|\Gamma_x|\), giving \(|O(x)|=|\Gamma|/|\Gamma_x|\). \(\square\)
A graph is edge-transitive if, for every pair of edges, some automorphism sends one edge to the other. This property gives a useful count even when it does not directly give the total number of spanning trees.
Proof. For each edge \(e\), let \(a_e\) be the number of spanning trees containing \(e\). If an automorphism sends \(e\) to \(f\), applying it to each spanning tree gives a bijection between the trees containing \(e\) and those containing \(f\). Edge-transitivity therefore makes all the numbers \(a_e\) equal, say to \(a\). Count pairs \((T,e)\) where \(T\) is a spanning tree and \(e\) is one of its edges. Each spanning tree on \(n\) vertices has \(n-1\) edges, so there are \(t(G)(n-1)\) pairs. Counting instead by the edge gives \(ma\) pairs. Thus \(ma=t(G)(n-1)\), and \(a=t(G)(n-1)/m\). \(\square\)
The theorem uses the standard fact that a tree on \(n\) vertices has \(n-1\) edges, established in the earlier material on trees. The hypothesis \(n\ge2\) ensures that a connected graph has edges, so \(m\) is nonzero. Edge-transitivity equalizes the counts for individual edges; it does not by itself determine \(t(G)\).
Worked Example: Spanning Trees of a Five-Cycle
Let \(G=C_5\), with \(V=\{1,2,3,4,5\}\) and \(E=\{12,23,34,45,51\}\). A spanning tree must contain all five vertices and be connected without a cycle. If all five cycle edges are kept, there is a cycle, so at least one edge must be removed. Removing any one edge leaves a path through all five vertices, which is connected and has no cycle. Removing two or more edges leaves at most three edges, which cannot connect five vertices. Thus every spanning tree is obtained by omitting exactly one edge.
There are five choices of omitted edge, so \(t(G)=5\). Rotations of the cycle carry any edge to any other edge and carry the corresponding omitted-edge tree along with it; all five spanning trees form one orbit. The orbit has size \(5\).
Check: each listed tree has \(5-1=4\) edges, and there are five choices. The edge-transitivity count agrees: substituting \(t(G)=5\), \(n=5\), and \(m=5\) gives \(5(5-1)/5=4\) spanning trees containing each fixed edge. Directly, a fixed edge is present in all five trees except the one that omits it, so it belongs to \(5-1=4\).
Symmetry Does Not Mean One Orbit
The complete graph \(K_4\) has every permutation of its four vertices as an automorphism. That is a large amount of symmetry, but its spanning trees do not all lie in one orbit: a star and a path have different degree sequences, which an automorphism cannot change. The way to count is to classify the possible tree shapes and then count each orbit.
Worked Example: Spanning Trees of \(K_4\)
Let \(G=K_4\), with \(V=\{1,2,3,4\}\) and \(E=\{12,13,14,23,24,34\}\). A spanning tree has three edges. Its degrees sum to \(2\cdot3=6\), since each edge contributes one to the degree of each endpoint. Each of the four vertices has degree at least one, because the tree is connected.
If one vertex has degree three, the other three vertices must each have degree one. The tree is a star. There are four choices for its center, giving four stars, all in one orbit under vertex permutations.
Otherwise the maximum degree is at most two. A connected tree with maximum degree at most two is a path: starting at a degree-one endpoint and following the unused edge at each degree-two vertex must reach the other endpoint, and connectedness leaves no vertex outside this path. To count these paths, choose the two endpoints in \(\binom{4}{2}=6\) ways, then order the two remaining vertices in \(2\) ways between them. This gives \(6\cdot2=12\) paths. All are in one orbit, since a vertex permutation can send the ordered vertices of any path to those of any other path.
Consequently \(t(K_4)=4+12=16\). As a separate check on the orbit sizes, the automorphism group has \(4!=24\) elements. A star is fixed by the \(3!=6\) permutations of its leaves, so its orbit has \(24/6=4\) members. A path is fixed by exactly two permutations: the identity and the reversal of the path. Its orbit has \(24/2=12\) members. These are the same counts obtained by direct enumeration.
Check: the classification covers every spanning tree: its maximum degree is either three or at most two, and these cases give stars and paths respectively. The two classes are disjoint, and their counts sum to \(16\).
Classifying Trees in a Symmetric Bipartite Graph
For some graphs, a useful first step is to examine degrees within the spanning tree. Structural constraints can reduce the candidates to a few forms; symmetries then count how many choices realize each form.
Worked Example: Spanning Trees of \(K_{2,3}\)
Let \(G=K_{2,3}\), with parts \(A=\{a,b\}\) and \(B=\{x,y,z\}\). Its vertex set is \(A\cup B\), and its edge set is \(\{ax,ay,az,bx,by,bz\}\). A spanning tree on these five vertices has four edges. Each of \(x,y,z\) must have degree at least one in the tree, and the sum of their degrees is four because every edge has exactly one endpoint in \(B\). Their degrees must therefore be \(2,1,1\) in some order.
Choose the degree-two vertex of \(B\) in \(3\) ways. It must be joined to both \(a\) and \(b\). Each of the other two vertices in \(B\) has degree one, and so is joined to either \(a\) or \(b\). There are two structural cases:
- If both degree-one vertices attach to the same vertex of \(A\), there are \(2\) choices of that vertex. This gives \(3\cdot2=6\) trees. Their degrees on \(A\) are \(3\) and \(1\).
- If the degree-one vertices attach to different vertices of \(A\), there are \(2\) assignments. This gives \(3\cdot2=6\) trees. Their degrees on \(A\) are \(2\) and \(2\).
Each choice gives a connected graph: the degree-two vertex joins \(a\) to \(b\), and the remaining vertices attach to one of them. It has four edges on five vertices and is connected, hence is a tree. The two cases are distinct because their degree sequences on \(A\) differ. Within either case, permutations of \(a,b\) and of the vertices in \(B\) carry any choice to any other choice of that type. The two cases therefore give two symmetry orbits, each of size \(6\), and \(t(K_{2,3})=6+6=12\).
Check: the independent degree argument forces exactly one vertex of \(B\) to have degree two, so no additional form is omitted. The counts \(6+6=12\) agree with the direct choices: \(3\) choices for the central vertex, followed by \(2^2=4\) assignments for the other two vertices, giving \(3\cdot4=12\).
A Useful Reduction: Deletion and Contraction
Symmetry can also reduce a calculation by making several edge choices equivalent. The basic counting identity behind this approach separates spanning trees according to whether they contain a chosen edge. When contracting an edge, parallel edges are retained as distinct edges, and loops are discarded; this convention preserves the distinction between different edge choices in a spanning tree.
Proof. Partition the spanning trees of \(G\) into those that omit \(e\) and those that contain \(e\). A tree in the first class is exactly a spanning tree of \(G-e\), so that class has size \(t(G-e)\), including zero if \(G-e\) is disconnected. For a tree in the second class, contract \(e\). The result is connected and has no cycle: a cycle after contraction would expand to a cycle in the original tree. It is therefore a spanning tree of \(G/e\). Conversely, expanding the contracted vertex in a spanning tree of \(G/e\) and restoring \(e\) gives a spanning tree of \(G\) containing \(e\). These operations are inverse, with parallel edges distinguished so that each choice is retained. The second class has size \(t(G/e)\), proving the identity. \(\square\)
If several edges are equivalent under automorphisms, the deletion-and-contraction cases for those edges have matching counts. This can cut down repeated work. It does not justify replacing several distinct cases by one unless the cases are related by an automorphism, or have otherwise been shown to have equal counts.
Common Pitfall: Counting Orbits Instead of Trees
A symmetry class is not necessarily a single spanning tree. In the \(K_4\) example, there are two orbits, but their sizes are \(4\) and \(12\). Saying “there are two types, so there are two spanning trees” is incorrect. The correct count sums the sizes of the orbits. The orbit-stabilizer calculation provides one way to find each size; direct enumeration, as in the examples, provides another.
Likewise, symmetry of the original graph does not guarantee that every spanning tree can be transformed into every other spanning tree. In \(K_4\), an automorphism preserves vertex degrees, so it cannot carry a star to a path. Before using a single orbit count, verify that the relevant action is transitive on the objects being counted.
Check Your Understanding
For each question, identify the relevant symmetry or structural condition before counting.
- List the spanning trees of \(C_4\) by specifying the edge omitted, and describe their orbits under cycle rotations.
- Why can no automorphism of \(K_4\) send a star spanning tree to a path spanning tree?
- In a connected edge-transitive graph with \(n=6\), \(m=9\), and \(t(G)=12\), how many spanning trees contain a fixed edge?
- For \(K_{2,3}\), explain why the three vertices in the part of size three cannot have degree pattern \(3,1,0\) in a spanning tree.
- State what the deletion-and-contraction identity counts in each of its two terms.