For the following graph:   a) Running DFS on the above grap…

Questions

Fоr the fоllоwing grаph:   а) Running DFS on the аbove graph with the starting node being 331, and feel free to make your choice on later starting nodes if necessary. Showing the discovering time and finishing time for each node. b) Based on your DFS results, show the topological order of the nodes. c) List the forward, backward and cross edges in your resulted DFS forest. d) Assuming that you have stored the resulted DFS forest in a new graph. Write a simple algorithm to identify the courses that are prereq to other courses but do not have any prereq. Analyze the computing complexity of the algorithm.