[Solved] 2 Pairs Shortest Paths 32 Points Consider Weight Matrix D Predecessor Matrix Output Floyd Q37161971
![2. [All-Pairs Shortest Paths, 32 points] Consider the weight matrix D and the predecessor matrix П output by the Floyd- Warsh](https://media.cheggcdn.com/media%2F2a5%2F2a5af0ce-8ba3-40fa-95f9-53ecce163b92%2FphpZWH3HN.png)
2. [All-Pairs Shortest Paths, 32 points] Consider the weight matrix D and the predecessor matrix П output by the Floyd- Warshall algorithm. What is the most efficient way, and required runtime to use this to: a. Detect a negative-weight cycle b. Determine the diameter (the length of the “longest shortest path”, counted as the sum of the edges weights) of the graph. Find a set of central vertices of the graph. That is, the set of all vertices A where the greatest distance D(A,B) to other vertices B is minimal. Determine the connected components of the graph c. d. Show transcribed image text 2. [All-Pairs Shortest Paths, 32 points] Consider the weight matrix D and the predecessor matrix П output by the Floyd- Warshall algorithm. What is the most efficient way, and required runtime to use this to: a. Detect a negative-weight cycle b. Determine the diameter (the length of the “longest shortest path”, counted as the sum of the edges weights) of the graph. Find a set of central vertices of the graph. That is, the set of all vertices A where the greatest distance D(A,B) to other vertices B is minimal. Determine the connected components of the graph c. d.
Expert Answer
Answer to 2. [All-Pairs Shortest Paths, 32 points] Consider the weight matrix D and the predecessor matrix П output by the Floyd-… . . .
OR

