• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

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

Question 11

The number of distinct minimum spanning trees for the weighted graph below is ____

  • 4
  • 5
  • 6
  • 7

Question 12

Let s and t be two vertices in a undirected graph G + (V, E) having distinct positive edge weights. Let [X, Y] be a partition of V such that s ∈ X and t ∈ Y. Consider the edge e having the minimum weight amongst all those edges that have one vertex in X and one vertex in Y The edge e must definitely belong to:

  • the minimum weighted spanning tree of G

  • the weighted shortest path from s to t

  • each path from s to t

  • the weighted longest path from s to t

Question 13

Consider the following dynamic programming code snippet for solving the 0/1 Knapsack problem:

Python
def knapsack(values, weights, capacity, n):
    if n == 0 or capacity == 0:
        return 0
    if weights[n-1] > capacity:
        return knapsack(values, weights, capacity, n-1)
    else:
        return max(values[n-1] + knapsack(values, weights, capacity-weights[n-1], n-1),
                   knapsack(values, weights, capacity, n-1))

Given the values [60, 100, 120] and weights [10, 20, 30], what would be the output of calling knapsack(values, weights, 50, 3)?

  • 180

  • 220

  • 280

  • 300

Question 14

Consider the following graph:

[caption width="800"]Graph[/caption]

Which edges would be included in the minimum spanning tree using Prim's algorithm starting from vertex A?

Options: a)  b)  c)  d) 

  • AB, BD, DE, EF, FC

  • AC, CD, DE, EB, BF

  • AB, BD, DE, EC, CF

  • AC, CD, DE, EB, FE

Question 15

Let G be a connected undirected graph with n vertices and m edges. Which of the following statements is true regarding the minimum number of edges required to create a cycle in G?
 

  • The minimum number of edges required to create a cycle is n.

  • The minimum number of edges required to create a cycle is n - 1.

  • The minimum number of edges required to create a cycle is m - n + 1.

  • The minimum number of edges required to create a cycle is m - n + 2.

Question 16

Let G be 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 ________.
  • 1000
  • 995
  • 2000
  • 1995

Question 17

Given the intervals [(1, 4), (3, 6), (5, 7), (8, 9)], what would be the output of calling a function that solves the Job Scheduling Algorithm?

  • [(1, 4), (5, 7), (8, 9)]

  •  [(1, 4), (3, 6), (8, 9)]

  •  [(1, 4), (3, 6)]

  •  [(1, 4), (3, 6), (5, 7)]

Question 18

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 have is.

  • 6

  • 7

  • 8

  • 9

Question 19

G = (V, E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of 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 only

  • II only

  • both I and II

  • neither I nor II

Question 20

What is the largest integer m such that every simple connected graph with n vertices and n edges contains at least m different spanning trees?
  • 1
  • 2
  • 3
  • n

There are 22 questions to complete.

Last Updated :
Take a part in the ongoing discussion