title: Algorithms: Difference of output tree as subgraph from DFS and BFS
body: <p>I am an undergrad reading Cormen Intro. to Algorithms 3rd Ed and preparing for finals.</p>
  
  <p>In Chapter 22 (page 603), it talks about how DFS produces a predecessor subgraph as a forest and how BFS produces a predecessor subgraph as a tree. I just don't understand.</p>
  
  <p>My thought:</p>
  
  <p>If vertex v is reachable from a source vertex s, on which one starts the search, would not the vertex v have some predecessor (may be distinct, but exist) regardless of DFS or BFS is run on the input graph? That is, it will be reachable by both DFS and BFS.</p>
  
  <p>If so, how come DFS can produce a forest out of it, while BFS produce only one tree?</p>
  
  <p>Thanks in advance!</p>