Spanning tree

Let G = (v,e) be a connected graph.A Spanning Tree of graph G is a subgraph of G with vertex set "v" and which is itself a Tree. i.e:- simple connected a cyclic graph. OR Given a undirected,unweighthed, connected graph G, Spanning tree of G is the subgraph that covers all the vertices without forming a loop. If the graph is not connected, it forms a spanning forest.

Prim's Algorithm