fakeac's blog

By fakeac, history, 8 years ago, In English

This problem appeared in one of my university assignments, but I only know of one algorithm which is to find Shortest Distance from each node node to every other node using Dijkstra's Algorithm and take the maximum of all distances found in each iteration. This is going to take time = O(V(E+V)log(V)) which is too large for the given data set.

I don't understand what does the approach — "Instead, randomly select pairs of vertices and evaluate minimum weight path (also referred to as shortest path) between them", mentioned in the 4th question mean. Please help.!Here is the problem statement. I need help for the 4th problem.

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by fakeac (previous revision, new revision, compare).

»
8 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

It is just a randomized algorithm for finding the diameter of a graph. Sometimes a path 'close enough' to the actual solution is preferred (in large graphs).

You are right; for a 100% precise answer you need an algorithm that solve the APSPP.