The FASTER-ALL-PAIRS-SHORTEST-PATHS procedure, as written, requires us to store [lg(n – 1)]… 1 answer below »

1. The FASTER-ALL-PAIRS-SHORTEST-PATHS procedure, as written, requires us to store [lg(n – 1)] matrices, each with n2elements, for a total space requirement of Θ(n2 lg n). Modify the procedure to require only Θ(n2) space by using only two n x n matrices.

2. Modify FASTER-ALL-PAIRS-SHORTEST-PATHS so that it can determine whether the graph contains a negative-weight cycle.

3. Give an efficient algorithm to find the length (number of edges) of a minimum length negative-weight cycle in a graph.