On page two of this discussion of spanning trees there are two different tree structures shown, one labeled DFS tree starting from a as the root and the other labeled Spanning tree created by DFS. If I were to write this out on paper my spanning tree would have looked more like the former than the latter.

Are these distinguished here for convenience, one to show the tree structure of the algorithm vs one showing how the spanning tree fits within the original graph layout? Is this a standard convention, to show the spanning tree in the same layout as the original graph? Would it be wrong to diagram the spanning tree using the first layout?


1 Answer 1


Yes, the right one is shown for convenience. Whether it is a standard convention I do not know and I think it is not so important as both trees are the same, the right one is just formatted neatly so that it matches the structure of the original graph.

It is not wrong to use the first layout (as shown on the left). However, readers might prefer the right one.

  • $\begingroup$ That's what I was thinking but wasn't sure. Thanks for clearing it up. $\endgroup$
    – Dave
    Jul 11, 2016 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.