GATE CS 2022 Set 1 — Question 58
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.NAT+2 / -0HardTrees & Spanning TreesGraph Theory (Math)Engineering Mathematics
Engineering Mathematics → Graph Theory (Math) → Trees & Spanning Trees
Last updated
Question
Let
G(V, E) be a directed graph, where is the set of vertices and is the set of directed edges, as defined by the following adjacency matrix . indicates a directed edge from node to node . A directed spanning tree of , rooted at , is defined as a subgraph of such that the undirected version of is a tree, and contains a directed path from to every other vertex in . The number of such directed spanning trees rooted at vertex 5 is _____________.Correct answer
24 to 24
Solution
The problem asks for the number of directed spanning trees (arborescences) rooted at vertex 5. A directed spanning tree rooted at requires that every vertex has exactly one incoming edge, and there are no cycles.The adjacency matrix is given by . This means there is a directed edge if and only if . Since self-loops () cannot be part of a spanning tree, valid edges for the tree must satisfy . This implies that edges always go from a higher index to a lower index, so the graph is a Directed Acyclic Graph (DAG) (ignoring self-loops). Consequently, any selection of one parent for each node (except the root) will not form a cycle.We need to choose a parent (source node) for each vertex such that the parent satisfies (since the edge is ).
- For vertex 4: Possible parents are (since ). 1 choice.
- For vertex 3: Possible parents are (since ). 2 choices.
- For vertex 2: Possible parents are (since ). 3 choices.
- For vertex 1: Possible parents are (since ). 4 choices.
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Graph Theory (Math)
2026 Set 2 Q3A day can only be cloudy or sunny. The probability of a day being cloudy is , independent of…2026 Set 2 Q5‘When it is raining, peacocks dance.’ Based only on this sentence, which one of the following…2026 Set 2 Q8Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the…2026 Set 1 Q10An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice…2026 Set 2 Q10An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice…