Question: ( 5 bonus pts . ) In Lecture 1 1 we showed that in order to obtain a special order to run DFS to identify
bonus pts In Lecture we showed that in order to obtain a special order to run DFS to identify all connected components in a directed graph we need to build the reverse graph of and then run DFSwithtiming on to get the resulting postlist termed polistlistR which is the special order. You might wonder if running DFS on to obtain the postlist followed by reversing it would also result in a correct special order. Show that this approach does not work by giving an example. You need to draw a directed graph the example show all connected components of show the postlist after running DFSwithtiming on show the visited array after runing DFS following the reverse of the postlist, and verify that it does not give the correct connected components.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
