Does minimum spanning tree exist with a non-connected graph?

511 Views Asked by At

I was thinking that Prim's algorithm won't work with a disjointed graph. But maybe it doesn't have to.

When we're asking to find the minimum spanning tree of a graph, is it implicit that the graph will always be connected?

1

There are 1 best solutions below

0
On

Ya , you have to assume that because it is a minimum spanning tree. A Tree is directed, acyclic and connected graph. So if there are separate components in graph. You can form a forest(Collection of trees) of minimum spanning tree but it cannot be called as a single MST.