Show all-pairs shortest path reduces to single-source case
Analyze the show all-pairs shortest path reduces to single-source case.
Examples
Input:"test_input_1"
Output:"output_1"
Input:"test_input_2"
Output:"output_2"
Hints
Recall that the All-Pairs Shortest Path (APSP) problem can be solved by running a Single-Source Shortest Path (SSSP) algorithm from each vertex in the graph.
Consider the time complexity of running SSSP for each vertex—how does this relate to the overall complexity of APSP?
Think about how matrix multiplication can be used to optimize the APSP solution, reducing the time complexity from O(V^3) to O(V^2.81) using the Coppersmith-Winograd algorithm.
Show all-pairs shortest path reduces to single-source case
Analyze the show all-pairs shortest path reduces to single-source case.