Question: =========================================== --------------------------------------------------------------------------- 1. (30 points) Modify FASTER-ALL-PAIRS-SHORTEST-PATHS so that it can determine whether the graph contains a negative-weight cycle. If the graph contains no negative-weight
===========================================
---------------------------------------------------------------------------

1. (30 points) Modify FASTER-ALL-PAIRS-SHORTEST-PATHS so that it can determine whether the graph contains a negative-weight cycle. If the graph contains no negative-weight cycle, the algorithm should report that and return the final L matrix, as usual. If the graph contains a negative-weight cycle, the algorithm should report the length (in terms of number of edges) of the smallest such cycle. As usual, argue your algorithm's correctness and analyze its time complexity. 1. (30 points) Modify FASTER-ALL-PAIRS-SHORTEST-PATHS so that it can determine whether the graph contains a negative-weight cycle. If the graph contains no negative-weight cycle, the algorithm should report that and return the final L matrix, as usual. If the graph contains a negative-weight cycle, the algorithm should report the length (in terms of number of edges) of the smallest such cycle. As usual, argue your algorithm's correctness and analyze its time complexity
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
