Answer:A spanning tree of a graph is an undirected tree consisting of only those edges necessary to connect all the edges in the original graph. The particular spanning tree for a graph depends on the criteria used to generate it. If a depth first search is used, those edges traversed by the algorithm form the edges of the tree, referred to as a depth first spanning tree. If a breadth first search is used, the spanning tree is formed from those edges traversed during the search, referred to as a breadth first spanning tree.