#sudhakaratchala #daavideos #daaplaylist
Let G=(V,E) be a directed graph with n vertices.
where V is set of vertices and E is set of edges
Let ‘cost’ be a cost of Adjacency matrix for G.such that

cost(i,j)= 0 if (i==j)
Cij if (i,j) ϵ E(G)
ꝏ if (i,j) ϵ E(G)

cost(i,j) is the length or cost of an edge (i,j)
The main objective of the all pairs shortest path problem is to determine the matrix ‘A’ such that A[i,j] is the shortest path from ‘i’ to ‘j’.