It may be the case that "Kruskal's Algorithm may not maintain connectivity while Prim's algorithm always does that" ?
Any example which favours this ?
Try kruskal and Prim's on above graph. Source
I think both are meant for connected graphs only. Because in disconnect graphs What does even a Spanning tree mean? [spanning tree connects every vertex]
And when applying kruskal on a connected graph, we may get forests in intermediate steps, but finally we always get a tree.
Maybe u r right .
Check these threads http://stackoverflow.com/questions/1195872/kruskal-vs-prim and http://stackoverflow.com/questions/13826846/when-to-use-kruskals-algorithm-vs-prims
Even Wikipedia says same::
Because MST contains all vertices.
kruskal algorithms always pick one by one minimum edge weight from the graph add to spanning tree so that it produce the disconnect graph while prims algorithm always pick the minimum adjacent edge weight to add spanning tree so that it produce connected graph