Open In App

GATE | GATE-CS-2005 | Question 6

Like Article
Like
Save
Share
Report

An undirected graph C 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 l\’s. Which one of the following is TRUE?

(A)

Graph G has no minimum spanning tree (MST)

(B)

Graph G has a unique MST of cost n-1

(C)

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

(D)

Graph G has multiple spanning trees of different costs



Answer: (C)

Explanation:

Explanation:

The correct answer is (C).

An MST is a tree that connects all the vertices of a graph with the minimum possible total edge weight. An MST does not contain any cycles.

The adjacency matrix of an undirected graph shows which vertices are connected by edges. In this case, the adjacency matrix is given by an n × n square matrix whose diagonal elements are 0’s and non-diagonal elements are 1’s. This means that every vertex is connected to every other vertex by an edge.

Since every vertex is connected to every other vertex, there are multiple MSTs for this graph. Each MST will have n-1 edges, because there are n vertices and an MST cannot have any cycles. The cost of each MST will be n-1, because the cost of an edge is 1.

Therefore, the answer is (C).

https://www.geeksforgeeks.org/data-structures-and-algorithms-set-22/

See Question 2 of

Quiz of this Question


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads