Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help Question3 Question 4 (20 marks) Consider the following graph G. The label of an edge is the cost of the edge. 9 a b

help Question3
image text in transcribed
Question 4 (20 marks) Consider the following graph G. The label of an edge is the cost of the edge. 9 a b d 6 1 10 e 2 f 5 g 1. Using Prim's algorithm, draw a minimum spanning tree (MST) of the graph Also write down the change of the priority queue step by step and the order in which the vertices are selected. Is the MST drawn unique? (i.e., is it the one and only MST for the graph?) [5 marks) 2. Using Kruskal's algorithm, draw a minimum spanning tree (MST) of the graph G. Write down the order in which the edges are selected. Is the MST drawn unique? (i.e., is it the one and only MST for the graph?) (5 marks) 3. Referring to the same graph above, find the shortest paths from the vertex a to all other vertices in the graph G using Dijkstra's algorithm. Show the changes of the priority queue step by step and give the order in which vertices are selected. (10 marks) N.B. There may be more than one solution. You only need to give one of the solutions

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

Accounting for Governmental and Nonprofit Entities

Authors: Earl R. Wilson, Jacqueline L Reck, Susan C Kattelus

16th Edition

ISBN: 78110939, 978-0078110931

More Books

Students also viewed these Accounting questions