Skip to main content
http -> https (the question was bumped anyway)
Source Link
Martin Sleziak
  • 4.7k
  • 4
  • 35
  • 40

To state more directly what Joseph said, if we know the distance between any two vertices, it is straightforward to first find the eccentricity of $v$, i.e. the maximum distance from $v$ to another vertex. Having done this we simply mark the vertices of lowest eccentricity as being central.

To find the distance between every pair of vertices, one can apply the Floyd-Warshall algorithm for all-pairs shortest path, which runs in $O(n^3)$ time.

http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithmhttps://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm

To state more directly what Joseph said, if we know the distance between any two vertices, it is straightforward to first find the eccentricity of $v$, i.e. the maximum distance from $v$ to another vertex. Having done this we simply mark the vertices of lowest eccentricity as being central.

To find the distance between every pair of vertices, one can apply the Floyd-Warshall algorithm for all-pairs shortest path, which runs in $O(n^3)$ time.

http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm

To state more directly what Joseph said, if we know the distance between any two vertices, it is straightforward to first find the eccentricity of $v$, i.e. the maximum distance from $v$ to another vertex. Having done this we simply mark the vertices of lowest eccentricity as being central.

To find the distance between every pair of vertices, one can apply the Floyd-Warshall algorithm for all-pairs shortest path, which runs in $O(n^3)$ time.

https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm

Source Link
Andrew D. King
  • 1.8k
  • 2
  • 17
  • 18

To state more directly what Joseph said, if we know the distance between any two vertices, it is straightforward to first find the eccentricity of $v$, i.e. the maximum distance from $v$ to another vertex. Having done this we simply mark the vertices of lowest eccentricity as being central.

To find the distance between every pair of vertices, one can apply the Floyd-Warshall algorithm for all-pairs shortest path, which runs in $O(n^3)$ time.

http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm