Where are back edges in a DFS tree?

Question Detail: 

As I understand it when doing a DFS run when every new node is discovered and edge is added to the DFS tree from the parent of the new node to the new node. If that's the case how are back edges are created?

Asked By : aviran
Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/14191

Answered By : Raphael

The terms forward, back and cross edges classify edges in the original graph with respect to the depth-first search, so they don't appear in the DFS tree itself. Different DFS runs may yield different classifications. They are useful in some algorithmic contexts.

You can read more on Wikipedia.

No comments

Powered by Blogger.