Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE IT 2006 | Question 11

  • Last Updated : 28 Jun, 2021

If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a

 
(A) Hamiltonian cycle
(B) grid
(C) hypercube
(D) tree


Answer: (D)

Explanation:  

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

As here we want subset of edges that connects all the vertices and has minimum total weight i.e. Minimum Spanning Tree
Option A – includes cycle, so may or may not connect all edges.
Option B – has no relevance to this question.
Option C – includes cycle, so may or may not connect all edges.



Related:
https://www.geeksforgeeks.org/greedy-algorithms-set-2-kruskals-minimum-spanning-tree-mst/
https://www.geeksforgeeks.org/greedy-algorithms-set-5-prims-minimum-spanning-tree-mst-2/

This solution is contributed by Mohit Gupta.

 

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :