Spanning tree

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.