Minimum Spanning Tree · Algorithms
40 questions · asked in 23 of 27 years (2000–2026)
MCQ 26 · MSQ 3 · NAT 111-mark 16 · 2-mark 24
2000Questions per year2026
Questions 6–10 of 40
Let be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in has even weight. Which of the following statements is/are TRUE for every such graph ?
One or more options are correct.
Answer: (D)
Why (D) is true. Take any cycle C and two edges e, f on it. Removing f from C leaves a path that contains e. Extend this path to a spanning tree T. Then T contains e and not f. Now is also a spanning tree, because removing e splits T into two parts and f joins them again.
. Both trees have even weight, so this difference is even, so e and f have the same parity. This holds for every pair of edges on the cycle, so in each cycle all edges are even or all are odd.
Why the others are false.
- (A) and (C): take a triangle with all weights 1. Every spanning tree has 2 edges, so weight 2 (even). But the edges are odd, so (A) fails, and the cycle has odd edges, so (C) fails.
- (B): take a path with 3 edges of weights 1, 1, 2. It is its own only spanning tree, with weight 4 (even). But the edges are neither all even nor all odd.
Answer: (D)
. Both trees have even weight, so this difference is even, so e and f have the same parity. This holds for every pair of edges on the cycle, so in each cycle all edges are even or all are odd.
Why the others are false.
- (A) and (C): take a triangle with all weights 1. Every spanning tree has 2 edges, so weight 2 (even). But the edges are odd, so (A) fails, and the cycle has odd edges, so (C) fails.
- (B): take a path with 3 edges of weights 1, 1, 2. It is its own only spanning tree, with weight 4 (even). But the edges are neither all even nor all odd.
Answer: (D)
The number of distinct minimum-weight spanning trees of the following graph is _______
Answer: 9
Apply the idea of Kruskal's algorithm.
- The four edges of weight 1 (a-b, a-f, c-d, d-e) make no cycle, so every MST has them. This gives the components {a, b, f}, {c, d, e} and {g}.
- Next, g has to be joined to both components with edges of weight 2:
Joining g to {a, b, f}: g-a, g-b, g-f 3 choices
Joining g to {c, d, e}: g-c, g-d, g-e 3 choices
- Edges of weight 3 are not needed at all.
Count of MSTs: (each has weight 8).
Answer: 9
- The four edges of weight 1 (a-b, a-f, c-d, d-e) make no cycle, so every MST has them. This gives the components {a, b, f}, {c, d, e} and {g}.
- Next, g has to be joined to both components with edges of weight 2:
Joining g to {a, b, f}: g-a, g-b, g-f 3 choices
Joining g to {c, d, e}: g-c, g-d, g-e 3 choices
- Edges of weight 3 are not needed at all.
Count of MSTs: (each has weight 8).
Answer: 9
Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE?
One or more options are correct.
Answer: (A), (B), (C)
All edge weights are distinct, so the MST is unique.
- (A) True. Kruskal takes edges in increasing order. The two lightest edges cannot form a cycle (a cycle needs at least 3 edges), so the second smallest edge is always taken.
- (B) True. If the 3rd smallest edge is taken, we are done. If it is rejected, it closes a triangle with the two smallest edges, so those three edges use up all the edges among their 3 vertices. The 4th edge then has an endpoint outside these 3 vertices, so it cannot form a cycle with the two smallest edges, and it is taken.
- (C) True. This is the cut property: for any cut, the lightest edge crossing it is in every MST.
- (D) False. Distinct weights give a unique MST.
Answer: (A), (B), (C)
- (A) True. Kruskal takes edges in increasing order. The two lightest edges cannot form a cycle (a cycle needs at least 3 edges), so the second smallest edge is always taken.
- (B) True. If the 3rd smallest edge is taken, we are done. If it is rejected, it closes a triangle with the two smallest edges, so those three edges use up all the edges among their 3 vertices. The 4th edge then has an endpoint outside these 3 vertices, so it cannot form a cycle with the two smallest edges, and it is taken.
- (C) True. This is the cut property: for any cut, the lightest edge crossing it is in every MST.
- (D) False. Distinct weights give a unique MST.
Answer: (A), (B), (C)
Let 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 ____
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 ____
Answer: 24
An edge is present only when . So every edge goes from a larger vertex to a smaller one. Self-loops are of no use in a tree.
In a tree rooted at 5, every other vertex k needs exactly one parent. That parent must be a vertex larger than k:
- vertex 4: the parent is 5 1 choice
- vertex 3: the parent is 4 or 5 2 choices
- vertex 2: 3 choices
- vertex 1: 4 choices
The parent is always larger, so no cycle can form. Total number of trees
Answer: 24
In a tree rooted at 5, every other vertex k needs exactly one parent. That parent must be a vertex larger than k:
- vertex 4: the parent is 5 1 choice
- vertex 3: the parent is 4 or 5 2 choices
- vertex 2: 3 choices
- vertex 1: 4 choices
The parent is always larger, so no cycle can form. Total number of trees
Answer: 24
Consider the following undirected graph with edge weights as shown:
The number of minimum-weight spanning trees of the graph is __________
The number of minimum-weight spanning trees of the graph is __________
Answer: 3
Use Kruskal's method and pick all the 0.1 edges first. They make no cycle. They leave two separate trees: the top row with 3 vertices, and the bottom part with 6 vertices.
One 0.9 edge is needed to connect the two trees. The three vertical edges from the top row to the middle row each cost 0.9, so any one of them can be chosen.
Answer: 3
One 0.9 edge is needed to connect the two trees. The three vertical edges from the top row to the middle row each cost 0.9, so any one of them can be chosen.
Answer: 3
Keep practising