DFS Spanning Tree (DST)

Given a graph ๐†ย = (๐•, ๐„)ย and given a node ๐‘‹1, a DFS spanningย tree ๐“ย of ๐†ย is generated by applying a depth-first-search traversal over the graph, yielding an ordering ๐‘‘ย = (๐‘‹1, โ€ฆ, ๐‘‹๐‘›). Theย DFS spanning tree ๐“ย of ๐†ย is defined as the tree rooted at the first node, ๐‘‹1, and which includes only the traversed edges of ๐†

DFS spanningย treeย ๐“ย = (๐•, ๐„โ€™)ย where:

  • ๐• = sameย ๐•
  • ๐„โ€™ =ย {(๐‘‹๐‘–, ๐‘‹๐‘—)ย |ย ๐‘‹๐‘—ย traversed from ๐‘‹๐‘–ย by DFS traversal}