Trees & Connectivity

Answer & solution
Official answer: 16
Approach: A spanning tree uses all vertices, is connected and has no cycle. Since the graph is complete, every labelled tree on these vertices is available.
1. Cayley's formula states that the complete graph Kn has nn−2 labelled spanning trees. Substituting n=4 gives 4²=16.
2. We can verify this without the formula by classifying four-vertex tree shapes. A tree has three edges. It is either a star with one vertex of degree 3 or a path with degrees 1,2,2,1.
3. There are four stars, one for each choice of centre. For a path, arrange all four labels in an order. Reversing the order describes the same undirected path, so there are 4!/2=12 paths.
4. These shapes are disjoint and exhaustive, giving 4+12=16.
Answer: 16. Counting arbitrary three-edge subsets would also include disconnected or cyclic selections, so not every such subset is a spanning tree.