Question
All algorithms are in pseudocode Minimum spanning trees (MSTs). 3.1 (5p) The notion of a minimum spanning tree is applicable to a con- nected weighted
All algorithms are in pseudocode
Minimum spanning trees (MSTs). 3.1 (5p) The notion of a minimum spanning tree is applicable to a con- nected weighted graph. Do we have to check a graph's connectivity before applying Prim's algorithm or can the algorithm do it by itself? What is the result of Prim's algorithm on a disconnected graph? 3.2 (5p) What about Kruskal's algorithm ? Does it work on a disconnected graph ? How would you modify Kruskal's algorithm to nd a minimum spanning forest on a disconnected graph. 3.3 (5p) Does Prim's and Kruskal's algorithms always work correctly on graphs with negative edge weights? Find an easy way to prove your answer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started