So first of all, in assuming if the graph is connected, that's obviously necessary for it to have any spanning trees. that said, Kruskal's algorithm actually extends in a really, just easy, elegant way to the case where G is disconnected. 