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 16–20 of 40
Let G = (V, E) be any connected undirected edge-weighted graph. The weights of the edges in E are positive and distinct. Consider the following statements:
(I) Minimum spanning tree of G is always unique.
(II) Shortest path between any two vertices of G is always unique.
Which of the above statements is/are necessarily true?
(I) Minimum spanning tree of G is always unique.
(II) Shortest path between any two vertices of G is always unique.
Which of the above statements is/are necessarily true?
Answer: (A)
- (I) 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.
- (II) is false. Take a 4-cycle a-b-d-c with weights ab = 1, bd = 4, dc = 3, ca = 2. All weights are distinct and positive. From a to d, the path a-b-d costs and the path a-c-d costs . So there are two shortest paths.
Answer: (A)
- (II) is false. Take a 4-cycle a-b-d-c with weights ab = 1, bd = 4, dc = 3, ca = 2. All weights are distinct and positive. From a to d, the path a-b-d costs and the path a-c-d costs . So there are two shortest paths.
Answer: (A)
Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increasedby the same value ,then which of the following statements is/are TRUE?
P: Minimum spanning tree of G does not change
Q: Shortest path between any pair of vertices does not change
P: Minimum spanning tree of G does not change
Q: Shortest path between any pair of vertices does not change
Answer: (A)
P is true. Adding the same value to every edge keeps the order of the weights, so Kruskal's algorithm picks the same edges. Also every spanning tree has edges, so every tree's weight rises by the same amount and the minimum tree stays the same.
Q is false. A path with more edges gains more weight. Take a direct edge of weight 4 and a two-edge path with weights 1 and 2 (all distinct). The path is shorter: . Add 10 to every edge: the path becomes and the direct edge becomes 14. Now the direct edge is the shortest path, so shortest paths can change.
Answer: (A)
Q is false. A path with more edges gains more weight. Take a direct edge of weight 4 and a two-edge path with weights 1 and 2 (all distinct). The path is shorter: . Add 10 to every edge: the path becomes and the direct edge becomes 14. Now the direct edge is the shortest path, so shortest paths can change.
Answer: (A)
Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1,2,3,4,5, and 6. The maximum possible weight that a minimum weight spanning tree of G can haveis .
Answer: 7
A spanning tree on 4 vertices has 3 edges. Kruskal takes the edges 1 and 2 first, because two edges cannot form a cycle.
The third edge is at most 4. If edge 3 closes a cycle with 1 and 2, then edges 1, 2, 3 form a triangle on three vertices. Edge 4 cannot join two of these three vertices (all three possible edges there are already 1, 2, 3), so it has an endpoint at the fourth vertex and is taken. If edge 3 does not close a cycle, it is taken. So the third MST edge is 3 or 4, never more.
4 is possible. Place the edges 1, 2, 3 as a triangle. Then the MST is 1, 2 and 4.
Maximum MST weight .
Answer: 7
The third edge is at most 4. If edge 3 closes a cycle with 1 and 2, then edges 1, 2, 3 form a triangle on three vertices. Edge 4 cannot join two of these three vertices (all three possible edges there are already 1, 2, 3), so it has an endpoint at the fourth vertex and is taken. If edge 3 does not close a cycle, it is taken. So the third MST edge is 3 or 4, never more.
4 is possible. Place the edges 1, 2, 3 as a triangle. Then the MST is 1, 2 and 4.
Maximum MST weight .
Answer: 7
G = (V,E) is an undirected simple graph in which each edge has a distinct weight,and e is a particular edgeof G. Which of the following statements about the minimum spanning trees (MSTs) of G is/are TRUE?
I. If e is the lightest edge of some cycle in G, then every MST of G includes e
II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e
I. If e is the lightest edge of some cycle in G, then every MST of G includes e
II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e
Answer: (B)
- I is false. Take vertices a, b, c, d with edges ab = 5, bc = 6, ca = 7, ad = 1, bd = 2. The edge ab is the lightest edge of the cycle a-b-c. But Kruskal takes ad (1) and bd (2), then rejects ab (5) because it closes the cycle a-d-b, and then takes bc (6). The MST is {ad, bd, bc} and it does not include ab.
- II is true. Let e be the heaviest edge of a cycle C, and suppose an MST T contains e. Removing e from T splits it into two parts. The cycle C must cross between the two parts at another edge e'. Since the weights are distinct, , so is a lighter spanning tree. This is impossible, so no MST contains e.
Answer: (B)
- II is true. Let e be the heaviest edge of a cycle C, and suppose an MST T contains e. Removing e from T splits it into two parts. The cycle C must cross between the two parts at another edge e'. Since the weights are distinct, , so is a lighter spanning tree. This is impossible, so no MST contains e.
Answer: (B)
The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ___________.
Answer: 69
MST edge weights: AC = 9, BC = 2, BE = 15, EF = 4, DF = 6 (sum 36). Weights are distinct, so each non-MST edge must exceed the largest MST edge on its cycle.
- AB: cycle A-C-B, largest is 9 AB 10
- CD: path C-B-E-F-D, largest is 15 CD 16
- DE: path D-F-E, largest is 6 DE 7
Least total = 36 + 10 + 16 + 7 = 69
Answer: 69
- AB: cycle A-C-B, largest is 9 AB 10
- CD: path C-B-E-F-D, largest is 15 CD 16
- DE: path D-F-E, largest is 6 DE 7
Least total = 36 + 10 + 16 + 7 = 69
Answer: 69
Keep practising