Answered step by step
Verified Expert Solution
Question
1 Approved Answer
BFS and DFS. Consider the following directed graph. (a) Draw the adjacency-list representation of G as in fig. 22.2, with each list sorted in increasing
BFS and DFS. Consider the following directed graph. (a) Draw the adjacency-list representation of G as in fig. 22.2, with each list sorted in increasing alphabetical order (b) Give the adjacency matrix of G (c) Draw the graph, the adjacency-list representation (with each list sorted in increasing alphabetical order), and the adjacency matrix for the transpose graph G^T (d) Do depth-first search in G, considering vertices in increasing alphabetical order. Show the final result, with vertices labeled with their starting and finishing times, and edges labeled with their type (T/B/F/C) as in fig. 22.5 (a) (e) Based on your results, proceed to run the algorithm in p. 617 to find the strongly connected components of G (show the result of the DFS in G^T, with vertices labeled with their starting and finishing times). (f) Draw the component graph G^SCC of G (g) Find a topological sort of G^SCC using the algorithm in p. 613 (label each vertex with its DFS finishing time). (h) Run BFS with B as starting vertex. Show the tree edges produced by BFS along with v.d of each vertex v as in Fig 22.3. You must draw the current tree edges in each iteration together with the queue status as in Fig 22.3. More precisley, run BFS in p. 595 with B as starting point assuming that each adjacency list is sorted in increasing alphabetical order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started