emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ7] isolated vertices #177

Closed zche377 closed 3 years ago

zche377 commented 3 years ago

In minimum spanning tree, can we assume that there's no vertex with zero edge, since by definition "a spanning tree in a graph is a tree that contains all vertices in the graphs as its nodes"?

marvinquiet commented 3 years ago

Very good question. I think we need to assume all vertices are at least somehow connected, otherwise, the MST concept does not work.

zche377 commented 3 years ago

thank you!