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
Questions 36–40 of 40
The edge e must definitely belong to:
Answer: (A)
The others can fail:
Let , , , , . The crossing edges are AC (1) and AB (4), so .
(B) The shortest path from A to B is the direct edge AB (4); the other path A-C-D-B costs 6. It does not contain AC.
(C) The path AB is a path from s to t without AC.
(D) Take a triangle with , , . Then , but the longest path s-u-t (weight 5) does not contain it.
Answer: (A)
(i) diagonal elements are 0's and
(ii) non-diagonal elements are 1's.
which one of the following is TRUE?
Answer: (C)
The given graph is a complete graph, and every edge has weight . An MST has edges. So the weight of the MST is .
The graph has more than one MST. In fact, every spanning tree of this graph is also an MST, because all the edge weights are equal.
Answer: (C)
Using Prim's algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?
Answer: (D)
Prim's algorithm grows one tree from A. At each step it adds the lightest edge with exactly one end in the tree.
1. Tree {A}: edges AB 10, AC 22, AD 7. Add (A,D).
2. Tree {A,D}: AB 10, AC 22, DC 26, DF 22. Add (A,B).
3. Tree {A,D,B}: AC 22, DF 22, DC 26, BC 30, BE 49. AC and DF tie at 22, so either is allowed. Add (D,F).
4. Tree {A,B,D,F}: CF 4, FG 5, AC 22. Add (F,C).
5. FG 5, CE 10, AC 22. Add (F,G).
6. GE 2, CE 10. Add (G,E).
This gives (A,D), (A,B), (D,F), (F,C), (F,G), (G,E), which is (D).
(A) starts with (E,G), which does not touch A.
(B) has (G,E) before the tree has reached G or E, so the edge is not connected to the tree.
(C) starts with (A,B) of weight 10, but (A,D) of weight 7 is lighter and must come first.
Answer: (D)
Answer: (B)
Use Prim's algorithm and begin at vertex . At each step add the cheapest edge that joins a new vertex to the tree.
, , , , , , , , . Where two edges tie ( and at 2; and at 8; and at 4), either choice gives the same total weight.
The tree has edges for vertices. Total weight .
Answer: (B)
Answer: (C)
(D) True. Distinct weights give a unique MST.
(A) True. is the lightest edge of G, so it is the lightest edge across any cut it crosses. By the cut property it is in the MST.
(B) True. If were on a cycle, it would be the heaviest edge of that cycle, and the heaviest edge of a cycle is in no MST. So if it is in the MST, it is on no cycle, and removing it disconnects G.
(C) False. If is a bridge (for example, G is a tree), every spanning tree must include it. So an MST can contain .
Answer: (C)
Keep practising