Top MCQs on Minimum Spanning Tree (MST) in Graphs with Answers

A minimum spanning tree (MST) is defined as a spanning tree that has the minimum weight among all the possible spanning trees
More on MST

Minimum Spanning Tree Quiz

Minimum Spanning Tree Quiz

Question 1
An undirected graph G(V, E) contains n ( n > 2 ) 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? (GATE CS 2011) gate_2011_4
Cross
1/12(11n^2 – 5n)
Tick
n^2 – n + 1
Cross
6n – 11
Cross
2n + 1


Question 1-Explanation: 
Question 2
The length of the path from v5 to v6 in the MST of previous question with n = 10 is
Cross
11
Cross
25
Tick
31
Cross
41


Question 2-Explanation: 
Question 3
Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in the matrix W below is the weight of the edge {i, j}. What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T? (GATE CS 2010)
2010
Cross
7
Cross
8
Cross
9
Tick
10


Question 3-Explanation: 
To get the minimum spanning tree with vertex 0 as leaf, first remove 0th row and 0th column and then get the minimum spanning tree (MST) of the remaining graph. Once we have MST of the remaining graph, connect the MST to vertex 0 with the edge with minimum weight (we have two options as there are two 1s in 0th row).
Question 4

In the graph given in above question, what is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?

Cross

7

Tick

8

Cross

9

Cross

10



Question 4-Explanation: 

Path: 1 -> 0 -> 4 -> 2 Weight: 1 + 4 + 3

Question 5

An undirected graph G has n nodes. Its adjacency matrix is given by an n × n square matrix whose (i) diagonal elements are 0‘s and (ii) non-diagonal elements are 1‘s. which one of the following is TRUE?

Cross

Graph G has no minimum spanning tree (MST)

Cross

Graph G has a unique MST of cost n-1

Tick

Graph G has multiple distinct MSTs, each of cost n-1

Cross

Graph G has multiple spanning trees of different costs



Question 5-Explanation: 

(A) Graph G has no minimum spanning tree (MST): This statement is not true. Every connected graph has at least one minimum spanning tree. Since the graph is complete, it is connected, and thus it must have a minimum spanning tree.

(B) Graph G has a unique MST of cost n-1: This statement is not true either. In a complete graph with n nodes, the total number of edges is given by n(n-1)/2. In this case, every edge has a weight of 1. Therefore, any spanning tree of the graph will have a total weight of n-1, but there can be multiple spanning trees with the same cost.

(C) Graph G has multiple distinct MSTs, each of cost n-1: This statement is true. In a complete graph, any spanning tree will have a total weight of n-1, as explained in option (B). Since the graph has n-1 edges, removing any edge will result in a different spanning tree with the same cost. Thus, there are multiple distinct MSTs, each with a cost of n-1.

(D) Graph G has multiple spanning trees of different costs: This statement is not true. Since all edges in the graph have a weight of 1, all spanning trees will have the same cost of n-1. There will not be multiple spanning trees with different costs.

Hence, the correct answer is (C) 

Question 6
Consider the following graph: gate_2006 Which one of the following cannot be the sequence of edges added, in that order, to a minimum spanning tree using Kruskal’s algorithm?
Cross
(a—b),(d—f),(b—f),(d—c),(d—e)
Cross
(a—b),(d—f),(d—c),(b—f),(d—e)
Cross
(d—f),(a—b),(d—c),(b—f),(d—e)
Tick
(d—f),(a—b),(b—f),(d—e),(d—c)


Question 6-Explanation: 
The edge (d-e) cannot be considered before (d-c) in Kruskal\'s minimum spanning tree algorithm because Kruskal’s algorithm picks the edge with minimum weight from the current set of edges at each step.
Question 7
Let G be an undirected connected graph with distinct edge weight. Let emax be the edge with maximum weight and emin the edge with minimum weight. Which of the following statements is false? (GATE CS 2000)
Cross
Every minimum spanning tree of G must contain emin
Cross
If emax is in a minimum spanning tree, then its removal must disconnect G
Tick
No minimum spanning tree contains emax
Cross
G has a unique minimum spanning tree


Question 7-Explanation: 
(a) and (b) are always true. (c) is false because (b) is true. (d) is true because all edge weights are distinct for G.
Question 8
Consider a weighted complete graph G on the vertex set {v1,v2 ,v} such that the weight of the edge (v,,v) is 2|i-j|. The weight of a minimum spanning tree of G is: (GATE CS 2006)
Cross
n — 1
Tick
2n — 2
Cross
nC2
Cross
2


Question 8-Explanation: 
Minimum spanning tree of such a graph is
v1
  \\
    v2
      \\
       v3
         \\
          v4
            .
              .
                .
                 vn
 
Weight of the minimum spanning tree = 2|2 - 1| + 2|3 - 2| + 2|4 - 3| + 2|5 - 4| .... + 2| n - (n-1) | = 2n - 2
Question 9
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?
Cross
T\' = T with total weight t\' = t2
Cross
T\' = T with total weight t\' < t2
Cross
T\' != T but total weight t\' = t2
Tick
None of the above


Question 9-Explanation: 
Squaring the weights of the edges in a weighted graph will not change the minimum spanning tree. Assume the opposite to obtain a contradiction. If the minimum spanning tree changes then at least one edge from the old graph G in the old minimum spanning tree T must be replaced by a new edge in tree T\' from the graph G\' with squared edge weights. The new edge from G\' must have a lower weight than the edge from G. This implies that there exists some weights C1 and C2 such that C1 < C2 and C12 >= C22. This is a contradiction. Source: http://www.cs.nyu.edu/courses/spring06/V22.0310-001/hw3.htm Sums of squares of two or more numbers is always smaller than square of sum. Example: 2^2 + 2^2 < (4)^2 But
there is one counter example when the graph has only one edge.  
         In that case, the two values are same. 
Question 10
Consider the following graph:
CSE_2009_38
Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal's algorithm?
Cross
(b,e)(e,f)(a,c)(b,c)(f,g)(c,d)
Cross
(b,e)(e,f)(a,c)(f,g)(b,c)(c,d)
Cross
(b,e)(a,c)(e,f)(b,c)(f,g)(c,d)
Tick
(b,e)(e,f)(b,c)(a,c)(f,g)(c,d)


Question 10-Explanation: 
In the sequence (b, e) (e, f) (b, c) (a, c) (f, g) (c, d) given option D, the edge (a, c) of weight 4 comes after (b, c) of weight 3. In Kruskal\'s Minimum Spanning Tree Algorithm, we first sort all edges, then consider edges in sorted order, so a higher weight edge cannot come before a lower weight edge.
There are 22 questions to complete.


  • Last Updated : 27 Sep, 2023

Share your thoughts in the comments
Similar Reads