edited by
2,518 views
1 votes
1 votes

Which of the following statement is true?

  1. For a directed graph, the absence of back edges in a DFS tree can have cycle.
  2. If all edge in a graph have distinct weight then the shortest path between two vertices is unique.
  3. The depth of any DFS (Depth First Search) tree rooted at a vertex is atleast as depth of any BFS tree rooted at the same vertex.
  4. Both (a) and (c)
edited by

2 Answers

3 votes
3 votes
I think the correct answer is option c.

Because if a DFS traversal graph consists of a back edge then it has a cycle. and option a is mentioning just the opposite.

And 2 paths can have the same length like 7+3=10 and 6+4=10.
1 votes
1 votes
1. A directed graph can have cycle only when it has back edge in DFS tree. So it is FALSE.

2. The distance between two vertices may be same using the different paths. Also, no of edges in those paths may vary. So this statement is also FALSE.

3. BFS distance from source is the minimum number of edges to reach the target node. In DFS, the depth of any node will surely be greater than or equal to minimum number of edges from the source. Hence, this statement is TRUE.

Related questions

0 votes
0 votes
0 answers
1
CHïntän ÞäTël asked Dec 25, 2018
344 views
According To Me Answer Should Be 6… Anyone Please Try Once!!! Given Is 5 With No Explaination !!!!like 11-12-12 then for second square 4 times 13 so c(4,2) any two of t...
2 votes
2 votes
1 answer
3
2 votes
2 votes
0 answers
4
jaig asked Jan 10, 2018
325 views
For a directed graph, the absence of back edges in a DFS tree can have cycle.true or fale.please explain with an example.