Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago