I agree with the answer but only for this question...

coz "**tree**" in general does not touch all the vertices..ri8 ? Tree is a subgraph which has no cycle..not necessarily contains "ALL" vertices..

25 votes

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

- Hamiltonian cycle
- grid
- hypercube
- tree

45 votes

Best answer

**Hamiltonian cycle**$\Rightarrow$ This is a cycle. A cycle will not only connect all vertices, it will have $1$ extra edge than necessary. So I can just remove that edge & get better cost "subset of edges" which connect all vertices. So, this is FALSE.**grid**$\Rightarrow$ A grid graph has cycles and so this is FALSE for same reason as option A.**Hypercube**$\Rightarrow$ A hypercube graph also has cycles. So, this also is FALSE.**Tree**$\Rightarrow$ This is answer. We need to have Minimum spanning tree to be exact.

"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 Minimum Spanning Tree". !

**(D) is TRUE**.

8 votes

Target : Get a subset of edges such that weight is minimum and it connects all vertices.

Since, all weights are positive and we need a subset with minimum weight, then we should avoid cycles, coz we should have only a single path between any pair of vertices in the graph. Having a cycle will unnecessarily add up edge weight and will do no help in accomplishing the target.

This rules out all options A, B and C.

Hence, answer = **option D**

3 votes

A minimum spanning** tree **is a spanning tree of a connected, undirected graph. It connects all the vertices together with the minimal total weighting for its edges.

answer is **D**

0 votes

The correct answer is **Tree **as explained above.

Now some people may get confused regarding the correctness of this option as a tree may not necessarily connect all the vertices, which is true indeed. However, here we are not asked about the definition of tree. We are just given a scenario where we have a subset of edges that connects all the vertices and has minimum total weight. This is clearly a Minimum Spanning Tree and not any tree in general. However, an MST is still a tree (with some special properties) and so among the given options, Tree is correct.

Sometimes questions like this are given, where none of the options are 100% correct, so we have to choose the option which is closest to being correct.