QuestionQuestion

1) Trace the Prim MST algorithm to determine a minimum spanning tree with V. as the root. The adjacency lists for G are given below. The weights are in parentheses.
Show
a) the order in which the edges are added to the tree &
b) the fringe list after each new vertex is added to the tree. Assume that the fringe list is maintained as an unordered linked list with insertions made ar the head
0: 2(12) -> 3(15) -> 4(7) -> 6(8)
1: 2(11) -> 3(2)
2: 0(12) -> 1(11) -> 4(9) -> 7(8)
3: 0(15) -> 1(2) -> 5(3)
4: 0(7) -> 2(9) -> 5(8) -> 8(5)
5: 3(3) 4(8)
6: 0(8) -> 7(6) -> 8(R)
7: 2(8) -> 6(6)
8: 4(5) -> 6(8)

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Prim's algorithm is a greedy algorithm, which always pick the available edge with the less weight. A common implementation is to assign a key to each vertex, set all the keys to infinite except the root, which is set to 0. Put the root into an empty list where the tree will be contained. Update the connected vertices keys to the connecting edges weigths. Choose the minimum weight edge, and put the connected vertex into...
$5.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Data Structures and Algorithms Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats