Question: The directed version of the BFS algorithm classifies nontree edges as being either back edges or cross edges, but it does not distinguish between these
The directed version of the BFS algorithm classifies nontree edges as being either back edges or cross edges, but it does not distinguish between these two types. Given a BFS spanning tree, T, for a directed graph, G , and a set of nontree edges, E , describe an algorithm that can correctly label each edge in E as being either a back edge or cross edge. Your algorithm should run in O(n + m) time, where n is the number of vertices and m is the number of edges.
Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
Construct an Euler tour P of T which visits each vertex first ... View full answer
Get step-by-step solutions from verified subject matter experts
