GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 58

GATE CSE 2022 Q58

Discrete Mathematics · Trees & Connectivity · Full GATE CSE 2022 paper

GATE 2022, Q58 2 marks · NAT
Report issue

Trees & Connectivity

Question 58, GATE 2022: Directed graph on {1,2,3,4,5} has edge i→j exactly when 1≤j≤i≤5. Count directed spanning trees rooted at 5 with directed paths from 5 to every vertex and an undirected underlying tree.
Tap to enlarge
Answer & solution

Official answer: 24

An edge goes only from a larger label to a smaller label, apart from irrelevant self-loops. Every nonroot vertex j in an outward tree must choose exactly one incoming edge from a parent in {j+1,..., 5}. There are respectively 4, 3, 2, 1 choices for j=1, 2, 3, 4. Any such choices form a tree rooted at 5: following parents strictly increases the label and must end at 5, so there are no cycles and every vertex is reached. The total is 4*3*2*1=24.

Self-loops cannot be in a spanning tree. Each nonroot has indegree exactly one in an outward arborescence, so choosing its parent is necessary, not merely sufficient. Exactly four nonloop edges are selected; increasing parent labels ensure all parent chains terminate at the sole root 5 rather than another component.

Original paper, page 39 · Answer key