Question: Graph traversal. please only do Question number 2 only. please notice that the graph Ga is undircted and Gb is directed AISU I) you have

 Graph traversal. please only do Question number 2 only. please notice

Graph traversal.

please only do Question number 2 only.

please notice that the graph Ga is undircted and Gb is directed

AISU I) you have two options for merging, merge with left sibling. H , */ 2. Use the graphs shown above to answer each of the following [1 x 3 = 3 Marks): (a) For both Ga and GB, list the vertices in the order they will be visited using Depth-first traversal, starting from vertex A. (Ignore the weights on the graph) (b) For both Ga and GB, list the vertices in the order they will be visited using Breadth-first traversal, starting from vertex A. (Ignore the weights on the graph) (C) For graph GB, List the vertices in the order they will be visited using Topological order traversal. (Ignore the weights on the graph) Note: In the traversals, if at any point there is more than one possible vertex to visit, visit them alphabetically. 3. Use the graphs shown above to answer each of the following [1.5 + 0.5 = 2 marks] (a) Use the graph Gg above to trace the execution of Dijkstra's algorithm as it solves the shortest path problem starting from vertex A, Draw the resulting vertex-weighted graph. (b) Use the graph G, above to trace the execution of Kruskal's algorithm as it finds the minimum spanning tree for the graph. Draw the resulting spanning tree and write down the minimum cost

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!