Question: Question 8 (a) Run depth-first search on the following digraph, starting at vertex 0. For nodes that have more than one outgoing edge, visit the

Question 8 (a) Run depth-first search on the following digraph, starting at vertex 0. For nodes that have more than one outgoing edge, visit the nodes in numerical order. List the vertices in preorder and postorder. preorder:postorder:0611 (b) Consider two vertices x and y that are simultaneously on the function-call stack at some point during the execution of depth-first search from vertex s in a digraph. (That is, dfs (x) is called during the execution of dfs (y), or vice versa. In addition, the initial call is dfs (s).) Which of the following must be true? For each sub-problem, indicate your answer by circling the appropriate response. I. There is both a directed path from s to x and a directed patk from s to y. Must be true May be false II. If there is not a directed path from x to y, then there must be a directed path from y to x. Must be true May be false III. There is both a directed path from x to y and a directed path from y to x. Must be true May be false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
