IAE Academy

GATE 2024 CS1 Q.34: solution and answer

GATE 2024 · CS1Q.34 · 1 mark · NAT

The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________

See the question in the paper

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)

  1. The graph is the complete graph on the labelled vertices . Each spanning tree has 4 vertices and therefore exactly 3 edges.

  2. Cayley's formula: the number of labelled trees on vertices, which equals the number of spanning trees of , is .

  3. For : .

  4. 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 .

  5. 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