i didn't understood the algo given in the link, but as per me the classification which you did, is correct

0 votes

In BFS of a directed graph, we don't have forward edges.Only tree edge,cross edge or back edge.

Below is a sample graph I have taken and classified edge types.

Please verify guys whether it's correct.

The algorithm I have used is** the pseudocode given by "****redtuna****" i**n the selected answer here.

0

i didn't understood the algo given in the link, but as per me the classification which you did, is correct

0

Shaik Masthan plzz ellaborate ur line

mam, if it is a forward edge present , then it will recognize as tree edge at first step only

1

Recognition of forward edge requires say for a Edge A->B, B should have been visited before the edge A-B is discovered and this can happen only when B is visited via some other vertex using more than one edge.Since, BFS finds shortest path from source in terms of smaller number of edges, When Vertex A is enqueued, edge A-B will be discovered and marked a tree or cross edge.Hence forward edges never possible.