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 21–25 of 40
Let G be a connected undirected graph of 100 vertices and 300 edges. The weight of a minimum spanning tree of G is 500. When the weight of each edge of G is increased by five, the weight of a minimum spanning tree becomes ________.
Answer: 995
A spanning tree of this graph always has 99 edges. So when each edge gets 5 more, the weight of every spanning tree goes up by 99 5 = 495. The tree that was minimum before is still the minimum.
New weight: 500 + 495 = 995
Answer: 995
New weight: 500 + 495 = 995
Answer: 995
The number of distinct minimum spanning trees for the weighted graph below is
Answer: 6
Use Kruskal. The graph has a left group of 6 vertices and a triangle of 3 vertices, joined by the long bottom edge of weight 2.
Weight 1 edges. There are five and none forms a cycle, so all are taken. The components are:
- A: the top-left, centre, left and bottom vertices of the left group (joined through the centre),
- B: the top-right and right vertices of the left group,
- C: the top and bottom-right vertices of the triangle (joined by its weight 1 edge),
- D: the bottom-left vertex of the triangle, alone.
Three more edges of weight 2 are needed to join A, B, C, D.
- A and B: three weight 2 edges join them (the top edge, the top-right to centre edge, and the centre to right edge). Exactly one is taken, so 3 choices. The other two weight 2 edges inside the left group (top-left to left, and left to centre) join vertices already in A, so they form cycles and are rejected.
- A and D: the long bottom edge is the only link to the triangle, so it is forced (1 way).
- D and C: the triangle's two weight 2 edges each join D to C. Exactly one is taken, so 2 choices.
Number of MSTs .
Answer: 6
Weight 1 edges. There are five and none forms a cycle, so all are taken. The components are:
- A: the top-left, centre, left and bottom vertices of the left group (joined through the centre),
- B: the top-right and right vertices of the left group,
- C: the top and bottom-right vertices of the triangle (joined by its weight 1 edge),
- D: the bottom-left vertex of the triangle, alone.
Three more edges of weight 2 are needed to join A, B, C, D.
- A and B: three weight 2 edges join them (the top edge, the top-right to centre edge, and the centre to right edge). Exactly one is taken, so 3 choices. The other two weight 2 edges inside the left group (top-left to left, and left to centre) join vertices already in A, so they form cycles and are rejected.
- A and D: the long bottom edge is the only link to the triangle, so it is forced (1 way).
- D and C: the triangle's two weight 2 edges each join D to C. Exactly one is taken, so 2 choices.
Number of MSTs .
Answer: 6
Let G be a weighted graph with edge weights greater than one and G' be the graph constructed by squaring the weights of edges in G. Let T and T' be the minimum spanning trees of G and G', respectively, with total weights t and t'. Which of the following statements is TRUE?
Answer: (D)
If every weight is greater than 1, squaring does not change their order. So the same tree is still a minimum spanning tree. The total weight of the new tree is . It is not .
- The claim is not true in general.
- The claim does not hold when the tree has only one edge ().
- When some weights are equal, a graph can have more than one MST. So T' need not be the same as T.
No option is true in every case.
Answer: None of the above
- The claim is not true in general.
- The claim does not hold when the tree has only one edge ().
- When some weights are equal, a graph can have more than one MST. So T' need not be the same as T.
No option is true in every case.
Answer: None of the above
An undirected graph G(V, E) contains n (n2) nodes named v1 , v2 ,...,vn. Two nodes vi , vj are connected if and only if 0|i-j|2. Each edge (vi,vj ) is assigned a weight i+j. A sample graph with n=4 is shown below.
The length of the path from v5 to v6 in the MST of previous question with n = 10 is
The length of the path from v5 to v6 in the MST of previous question with n = 10 is
Answer: (C)
The edge has weight and the edge has weight .
MST by Kruskal. The edges in increasing order are
- and are taken. Then closes a cycle with them, so it is rejected.
- Each edge (weight ) brings in the new vertex , whose lightest edge it is, so it is taken.
- Each edge with (weight ) comes after both and are already joined to the tree through lighter edges, so it closes a cycle and is rejected.
So the MST has the odd vertices in one chain (), the even vertices in another chain (), and the edge joining the two chains.
Path from to : . Its length is .
Answer: (C)
MST by Kruskal. The edges in increasing order are
- and are taken. Then closes a cycle with them, so it is rejected.
- Each edge (weight ) brings in the new vertex , whose lightest edge it is, so it is taken.
- Each edge with (weight ) comes after both and are already joined to the tree through lighter edges, so it closes a cycle and is rejected.
So the MST has the odd vertices in one chain (), the even vertices in another chain (), and the edge joining the two chains.
Path from to : . Its length is .
Answer: (C)
An undirected graph G(V, E) contains n (n2) nodes named v1 , v2 ,...,vn. Two nodes vi , vj are connected if and only if 0|i-j|2. Each edge (vi,vj ) is assigned a weight i+j. A sample graph with n=4 is shown below.
What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?
What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?
Answer: (B)
The edge has cost and the edge has cost .
MST by Kruskal. Take (cost 3) and (cost 4). Then (cost 5) closes a cycle and is rejected. For each , the vertex is joined by its lightest edge , of cost . The edge (cost ) is rejected, because by then and are already connected through lighter edges.
Total cost:
Check with : the MST has 3, 4, 6, 8, so the cost is 21, and . For options (A), (B), (C) all give 13, but for (A) gives about 20.8 and (C) gives 19, so they are wrong.
Answer: (B)
MST by Kruskal. Take (cost 3) and (cost 4). Then (cost 5) closes a cycle and is rejected. For each , the vertex is joined by its lightest edge , of cost . The edge (cost ) is rejected, because by then and are already connected through lighter edges.
Total cost:
Check with : the MST has 3, 4, 6, 8, so the cost is 21, and . For options (A), (B), (C) all give 13, but for (A) gives about 20.8 and (C) gives 19, so they are wrong.
Answer: (B)
Keep practising