7

A graph can have multiple spanning trees and the spanning tree resulting from a depth-first search depends on the order in which edges are processed. Can every possible spanning tree of a given graph be produced from that graph if the edge processing order is determined appropriately?

schuelermine
  • 173
  • 4

1 Answers1

15

Consider a complete graph $K_n$. Then a depth-first search can only create a linear-path spanning tree, no matter what the edges processing order is.

Nathaniel
  • 18,309
  • 2
  • 30
  • 58