Log In
0 votes
Can someone please explain what are the types of edges possible in BFS and DFS for DIRECTED as well as UNDIRECTED graphs?

Individual meaning of BACK, FRONT and CROSS edges is clear, but can’t decide which are present and which are not for Traversals.

an example would be of great help or any specific reference on this.
in Algorithms
closed by

In case of Directed graph, it can yield 4 types of edges; tree, forward, back and cross edges.

But in case of undirected graph forward and back edges are same only. And cross edges aren't possible in this case.

Related questions

0 votes
1 answer
Can BFS and DFS both work cyclic and acyclic graphs?! Kindly explain for each of 'em. Thank you!
asked Dec 9, 2017 in Algorithms iarnav 419 views
6 votes
1 answer
Consider the following statements: 1. Let T be the DFS tree resulting from DFS traversal on a connected directed graph the root of the tree is an articulation point, iff it has at least two children. 2. When BFS is carried out on a directed graph G, the edges of G will ... as tree edge, back edge, or cross edge and not forward edge as in the case of DFS. Find TRUE or FALSE for both the statements
asked Jan 27, 2018 in DS MIRIYALA JEEVAN KUMA 3.2k views
0 votes
1 answer
True or False , with reason. For a directed graph, the absence of back edges with respect to a BFS tree implies that the graph is acyclic? Answer is False Explanation: FALSE. It is true that the absence of back edges with respect to a DFS tree implies ... construct a cycle using such cross edges (which decrease the level) and using forward edges (which increase the level) Can someone explain it ?
asked Dec 25, 2018 in Algorithms Sandy Sharma 266 views
0 votes
0 answers
Please give an example i didn't get it The depth of any DFS tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.
asked Aug 2, 2018 in Algorithms Rishav Kumar Singh 177 views