Question

3. Consider the the following graphs for each of the two subproblems. Each subproblem can be answered (or blank) independentl
0 0
Add a comment Improve this question Transcribed image text
Answer #1

solution question 3) Using Prim's Algorithm for MST starting vertex a: we keep on adding vertices with minimum edge weights with result set.

For figure on left: 1) picking set={a}. 2) adding edge ab with weight 3 set={a, b}. 3) adding edge bf with weight 2 set={a, b, f}. 4) Now about to add vertex g with edge fg weight 3 from minheap of edges.

For figure on right: 1) picking set={a}. 2) adding edge ab with weight 2 set={a, b}. 3) adding edge bf with weight 3 set={a, b, f}. 4) Now about to add vertex g with edge fg weight 1 from minheap of edges.

Kruskal's MST algorithm: order edges in non-decreasing weights. Pick an edge in order if it doesnot form a cycle or loop:

For figure in right:

1) adding edge fg with weight 1

2) adding edge ab with weight 2

3) adding edge bf with weight 3. Here graph is formed with edges {ab, bf, fg}

4)Now about to add edge ae with weight 4. After adding graph is formed with edges {ea, ab, bf, fg}

Add a comment
Know the answer?
Add Answer to:
3. Consider the the following graphs for each of the two subproblems. Each subproblem can be answ...
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