Question

Use Prims algorithm (Algorithm 4.1) to find a minimum spanning tree for he following graph. Show the actions step by step. 3

4.1 MINIMUM SPANNING TREES 161 void prim (int n const number Wll set of.edges& F) index i, vnear; number min edge e; index ne

Please solve the problem in a clear word document not hand writing

Use Prim's algorithm (Algorithm 4.1) to find a minimum spanning tree for he following graph. Show the actions step by step. 32 17 45 18 10 28 4 25 07 59 V10 4 12
4.1 MINIMUM SPANNING TREES 161 void prim (int n const number Wll set of.edges& F) index i, vnear; number min edge e; index nearest [2.. n]; number distance [2.. n]; for (i= 2; i
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Prim's Algorithm: Consider all the vertices visited. Choose the least weighted edge to the vertex which is not visited. Repeat till all the vertices are visited.

32 2 71 17 10 18 u6 u5 4 ป๋า 4 12


 
Visited Least weighted
v1 v1-v4
v1 v4 v4-v5
v1 v4 v5 v4-v8
v1 v4 v5 v8 v8-v9
v1 v4 v5 v8 v9 v9-v10
v1 v4 v5 v8 v9 v10 v10-v6
v1 v4 v5 v6 v8 v9 v10 v4-v3
v1 v3 v4 v5 v6 v8 v9 v10 v3-v7
v1 v3 v4 v5 v6 v7 v8 v9 v10 v1-v2
v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
Add a comment
Know the answer?
Add Answer to:
Use Prim's algorithm (Algorithm 4.1) to find a minimum spanning tree for he following graph. Show...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT