The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
GATE 2024 CS1 Q.34: solution and answer
Answer and solution
ANSWER
The number of spanning trees of the labelled complete graph is 16.
Official answer: 16Source: Official answer key, GATE 2024 CS1 (IISc Bengaluru)
The graph is the complete graph on the labelled vertices . Each spanning tree has 4 vertices and therefore exactly 3 edges.
Cayley's formula: the number of labelled trees on vertices, which equals the number of spanning trees of , is .
For : .
Check by counting. A tree on 4 vertices is either a star or a path. Stars: the centre can be chosen in 4 ways, and the other three vertices attach to it, giving 4 trees. Paths: the 4 vertices can be listed in orders, and each path appears twice (once read in each direction), giving trees. No other tree shape exists on 4 vertices, so the total is .
Second check using edge counts. has 6 edges, so there are ways to choose 3 edges. Exactly 4 of these choices form a triangle (one for each triple of vertices), and a triangle leaves the fourth vertex isolated, so it is not a tree. Any other 3-edge choice has no cycle and is a spanning tree. That gives .
KEY IDEA
Spanning trees of are exactly the labelled trees on vertices, and Cayley's formula counts them as . For this gives .
WATCH OUT FOR
Counting trees only up to isomorphism gives 2 (a path and a star). The vertices are labelled, so each labelling counts separately: 4 stars and 12 paths.
From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 14 Graph theory questions, with notes
More Graph theory questions
- GATE 2024 CS2 Q.17 · MCQ · 1 markLet A be the adjacency matrix of a simple undirected graph G. Suppose A is its own inverse.
- GATE 2024 CS2 Q.60 · NAT · 2 marksThe chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph.
- GATE 2022 CS Q.30 · NAT · 1 markConsider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of…
- GATE 2022 CS Q.37 · MCQ · 2 marksConsider a simple undirected unweighted graph with at least three vertices.