Question: 9. A digraph is called strongly connected if for any pair of two distinct vertices u and v, there exists a directed path from u

9. A digraph is called strongly connected if for any pair of two distinct vertices u and v, there exists a directed path from u to v and a directed path from v to u. In general, a digraph's vertices can be partitioned into disjoint maximal subsets of vertices that are mutually accessible via directed paths of the digraph; these subsets are called strongly connected components. There are two DFS-based algorithms for identifying strongly connected components. Here is the simpler (but somewhat less efficient) one of the two: Step 1 Do a DFS traversal of the digraph given and number its vertices in the order that they become dead ends. Step 2 Reverse the directions of all the edges of the digraph. Step 3 Do a DFS traversal of the new digraph by starting (and, if necessary, restarting) the traversal at the highest numbered vertex among still unvisited vertices. The strongly connected components are exactly the subsets of vertices in each DFS tree obtained during the last traversal. a. Apply this algorithm to the following digraph to determine its strongly connected components. b. What is the time efficiency class of this algorithm? Give separate answers for the adjacency matrix representation and adjacency list representation of an input graph. c. How many strongly connected components does a dag have
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
