GATE 1991
November 25, 2023UGC NET CS 2018-DEC Paper-2
November 26, 2023Question 3739 – Algorithms
In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as x/y, where x is discovery time stamp and y is finishing time stamp.
It shows which of the following depth first forest?
Correct Answer: A
Question 270 Explanation:
A DFS starting at some vertex ‘v’ explores the graph by building up a tree that contains all vertices that are reachable from ‘v’ and all edges that are used to reach these vertices. We call this tree a DFS tree. A complete DFS exploring the full graph (and not only the part
reachable from a given vertex ‘v’) builds up a collection of trees, or forest, called a DFS forest.
Based on definition of DFS forest, option-A is correct.
reachable from a given vertex ‘v’) builds up a collection of trees, or forest, called a DFS forest.
Based on definition of DFS forest, option-A is correct.
{a, b, e} {c, d, f, g, h}
{a, b, e} {c, d, h} {f, g}
{a, b, e} {f, g} {c, d} {h}
{a, b, c, d} {e, f, g} {h}
Subscribe
Login
0 Comments