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 11–15 of 40
Let G be a connected undirected weighted graph. Consider the following two statements.
S1: There exists a minimum weight edge in G which is present in every minimum spanning tree of G.
S2: If every edge in G has distinct weight, then G has a unique minimum spanning tree.
Which one of the following options is correct?
S1: There exists a minimum weight edge in G which is present in every minimum spanning tree of G.
S2: If every edge in G has distinct weight, then G has a unique minimum spanning tree.
Which one of the following options is correct?
Answer: (C)
- S1 is false. Take a triangle with all weights 1. Every MST has 2 of the 3 edges, so each minimum weight edge is left out by some MST. So no minimum weight edge is present in every MST.
- S2 is true. Suppose two different MSTs and exist. Let e be the lightest edge that is in exactly one of them, say in . Adding e to makes a cycle. This cycle has an edge f that is not in (as has no cycle), so f is in exactly one tree and . Then is a spanning tree lighter than , which is impossible.
So S1 is false and S2 is true.
Answer: (C)
- S2 is true. Suppose two different MSTs and exist. Let e be the lightest edge that is in exactly one of them, say in . Adding e to makes a cycle. This cycle has an edge f that is not in (as has no cycle), so f is in exactly one tree and . Then is a spanning tree lighter than , which is impossible.
So S1 is false and S2 is true.
Answer: (C)
Let be a weighted undirected graph and let T be a Minimum Spanning Tree (MST) of G maintained using adjacency lists. Suppose a new weighed edge is added to G. The worst case time complexity of determining if T is still an MST of the resultant graph is
Answer: (D)
When the edge (u, v) is added to T, it forms exactly one cycle. That cycle is the tree path from u to v plus the new edge.
T remains an MST unless the new edge weighs less than the heaviest edge on that path. To find the path in the tree (using DFS/BFS on T) and its heaviest edge, the time needed is .
Answer:
T remains an MST unless the new edge weighs less than the heaviest edge on that path. To find the path in the tree (using DFS/BFS on T) and its heaviest edge, the time needed is .
Answer:
Consider a graph , where , , and weight of the edge . The weight of minimum spanning tree of G is _________
Answer: 99
The weight of an edge is |i j| . Weight 1 occurs only between neighbouring vertices. The 99 edges make a spanning tree (a path), each of weight 1.
Every spanning tree has 99 edges, each of weight at least 1. So this tree is minimum: 99.
Answer: 99
Every spanning tree has 99 edges, each of weight at least 1. So this tree is minimum: 99.
Answer: 99
Let G be any connection, weighted, undirected graph:
I. G has a unique minimum spanning tree if no two edges of G have the same weight.
II. G has a unique minimum spanning tree if, for every cut of G, there is a unique minimum weight edge crossing the cut.
Which of the above two statements is/are TRUE?
I. G has a unique minimum spanning tree if no two edges of G have the same weight.
II. G has a unique minimum spanning tree if, for every cut of G, there is a unique minimum weight edge crossing the cut.
Which of the above two statements is/are TRUE?
Answer: (C)
II is true. Let T be any MST and e an edge of T. Removing e from T splits the vertices into two sets, which is a cut. Let g be the unique lightest edge crossing this cut. If , then and is a lighter spanning tree, which is impossible. So e is the unique lightest edge across this cut.
Now let be two MSTs and e an edge of . Suppose e is not in . Adding e to makes a cycle, and this cycle crosses the cut above at another edge g. Then and is lighter than , which is impossible. So every edge of is in , and .
I is true. If no two edges have the same weight, then every cut has a unique lightest crossing edge. So the condition in II holds, and the MST is unique.
Answer: (C)
Now let be two MSTs and e an edge of . Suppose e is not in . Adding e to makes a cycle, and this cycle crosses the cut above at another edge g. Then and is lighter than , which is impossible. So every edge of is in , and .
I is true. If no two edges have the same weight, then every cut has a unique lightest crossing edge. So the condition in II holds, and the MST is unique.
Answer: (C)
Consider the following undirected graph G:
Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is ______.
Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is ______.
Answer: 4
Call the vertices T (top), L (left), R (right), P (bottom-left) and Q (bottom-right). The edges are: T-L 4, L-P 4, T-P 1, T-Q 3, T-R x, R-Q 5, P-Q 4. An MST has 4 edges.
- T-P (1) and T-Q (3) are the lightest edges and do not form a cycle, so they are always in the MST.
- P-Q (4) would close a cycle with T-P and T-Q, so it is never used.
- L is joined by T-L (4) or L-P (4). Both cost the same and both connect L, so there are 2 choices.
- R is joined by T-R (x) or R-Q (5). If , the cheaper one is forced. If , both cost the same, so there are 2 choices. So gives the most MSTs.
Number of MSTs .
Answer: 4
- T-P (1) and T-Q (3) are the lightest edges and do not form a cycle, so they are always in the MST.
- P-Q (4) would close a cycle with T-P and T-Q, so it is never used.
- L is joined by T-L (4) or L-P (4). Both cost the same and both connect L, so there are 2 choices.
- R is joined by T-R (x) or R-Q (5). If , the cheaper one is forced. If , both cost the same, so there are 2 choices. So gives the most MSTs.
Number of MSTs .
Answer: 4
Keep practising