Explore BrainMass
Share

Depth First Search

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Hi

I would appreciate if you could say if the statement below is TRUE or FALSE and explain why.

Given a graph G, we might start a DFS from two different vertices, u and v. Any back edge in the DFS starting from u is also a back edge in the DFS starting from v.

© BrainMass Inc. brainmass.com October 24, 2018, 6:38 pm ad1c9bdddf
https://brainmass.com/computer-science/trees/depth-first-search-45148

Solution Summary

Depth First Search is evaluated.

$2.19
See Also This Related BrainMass Solution

Graph to tree for breadth and depth first search tree

Hi. We have been asked to do the following with a given graph (will be uploaded "cgraph.jpg")

1. Depth first tree
2. Breath first tree

I know now do to a depth first search and breath first search, but not a tree (I don't even know what it is asking). I'm assuming we are to somehow put it in tree form.
(This is to be written on paper, not used in program).

These are my results from the
depth first search: ABCDEF
breath first search: ABFCDE

I didn't post my steps however I know depth first uses stack and breath first uses queue.
I just need to be shown how to make them "trees" (on paper).

View Full Posting Details