Home / Expert Answers / Computer Science / q1-18-points-a-directed-graph-g-is-shown-in-figure-1-assume-that-the-adjacency-lists-are-pa961

(Solved): Q1 (18 points) A directed graph \( G \) is shown in Figure 1. Assume that the adjacency lists are ...



Q1 (18 points) A directed graph \( G \) is shown in Figure 1. Assume that the adjacency lists are in alphabetical order. Appl21: Read the instructions for question Q1 in the assignment document. For each of the three sub-questions, write your answer (c):
After the DFS on \( G \), th predecessors for vertices \( D, H, K \) are

Q1 (18 points) A directed graph \( G \) is shown in Figure 1. Assume that the adjacency lists are in alphabetical order. Apply depth-first search (DFS) on graph \( G \). In the main-loop of DFS, check the vertices in alphabetical order. Figure 1: Graph for Q1. (a) On the answer sheet, enter the discovery times of selected vertices computed by the DFS. (b) On the answer sheet, enter the finish times of selected vertices computed by the DFS. (c) On the answer sheet, enter the predecessors of selected vertices computed by the DFS. 21: Read the instructions for question Q1 in the assignment document. For each of the three sub-questions, write your answer to the question in the given space. (a): After the DFS on \( G \), the discovery times for vertices \( B, J, K \) are B. \( d= \) \( J . d= \) \( K . d= \) (b): After the DFS on \( G \), the finish times for vertices \( A, C, F \) are (c): After the DFS on \( G \), th predecessors for vertices \( D, H, K \) are


We have an Answer from Expert

View Expert Answer

Expert Answer


Q. 1) In this graph, F is considered as a root node. Stack result : FCBDAEGH a) Discovery time of vertex C is 2. Discovery time of vertex F is 1. Discovery time of vertex H is 12. b) Finish time for vertex B is 8
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe