retagged by
1,360 views
1 votes
1 votes

Caption

retagged by

1 Answer

2 votes
2 votes

a) If a topological sort exists for the vertices in a directed graph, then a DFS on the graph will produce no back edges. 

True because both parts of the statement hold if and only if the graph is acyclic.

b) traversing DFS algorithm on a directed graph G. if we removed all back edges from graph G then resulting graph is the acyclic graph.

True, For example, in graph G = (V, E) = ({a, b, c}, {(a, b),(b, c),(b, a),(c, a)}), there are two cycles ([a, b, a] and [a, b, c, a]) and a DFS from a in G returns two back edges ((b, a) and (c, a)), but a removal of  both back edges can disrupt both cycles, making the resulting graph acyclic.

Related questions

0 votes
0 votes
1 answer
2
3 votes
3 votes
5 answers
3
0 votes
0 votes
1 answer
4
Rishav Kumar Singh asked Aug 26, 2018
1,319 views
If we apply Topological and DFS traversal.Is there any intersection of ordering? Please explain.