Computer Science, asked by rajputdeeshu48, 5 months ago

Let G = (V,E) be an undirected, unweighted, connected, n-vertex graph, represented by an ad-jacency
matrix A[1..n, 1.n). In this problem, we will derive a sub-cubic algorithm to compute the nxn matrix
D[1..n, 1..n] of shortest-path distances in G using fast matrix multiplication. As- sume that we have a
subroutine MatrixMultiply that computes the standard product of two nxn matrices in O(nw) time, for
some constant 2 < W< 3.
(a) Let G2 denote the graph with the same vertices as G, where two vertices are connected by a edge
if and only if they are connected by a path of length at most 2 in G. Describe an algorithm to compute
the adjacency matrix of G2 using a single call to Matrix Multiply and O(n2) additional time.
(b) Suppose we discover that G2 is a complete graph. Describe an algorithm to compute the matrix D
of shortest path distances in G in O(n2) additional time.
(C) Suppose we recursively compute the matrix D2 of shortest-path distances in G2. Prove that the
shortest-path distance in G from node i to nodej is either 2 - D2[i, j] or 2 * D2[i, j] - 1.
(d) Now suppose G2 is not a complete graph. Let X = D2 x A, and let deg() denote the degree of
vertex j in the original graph G. Prove that the shortest-path distance from node ito nodej in G is
2D2[i, j] if and only if X[i, j] > D2[i, j]deg().
(e) Describe an algorithm to compute the matrix D of shortest-path distances in G in O(nw log n) time.​

Answers

Answered by Dheerajsaleandra
0

Answer:

idigo ai sl cl wel notification Kentucky kale ka el kz bjp isothermally ichindhi

Similar questions