Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph Theory: Find the Jordan center?

I'm trying to find the set of vertices that minimizes their distance to other vertices on a weighted graph. Based on a cursory wikipedia search, I think that this is called the Jordan Center. What are some good algorithms for finding it?

Right now, my plan is to get a list of the weight for each branch emanating from a given vertex. The vertices whose weights have the smallest relative difference will be the central ones. Any other ideas?

I'm using Java, but helpful answers don't necessarily need to be Java specific.

like image 936
Nick Heiner Avatar asked Nov 27 '09 08:11

Nick Heiner


People also ask

How do you find the center of a graph in graph theory?

The center (or Jordan center) of a graph is the set of all vertices of minimum eccentricity, that is, the set of all vertices u where the greatest distance d(u,v) to other vertices v is minimal. Equivalently, it is the set of vertices with eccentricity equal to the graph's radius.

How do you find the center of a graph on a tree?

Calculating the center Note that the center is always the middle vertex or middle two vertices in every longest path along the tree. For example, the orange-coloured path in the above image is the longest path and the red node is considered to be the center among them.

What is the center of a graph called?

The point at the very middle of the graph is called the origin, and its coordinates are (0, 0), because it's 0 units away from the center of the graph in both directions.

How do you find the radius of a graph?

Radius of a Connected Graph The minimum eccentricity from all the vertices is considered as the radius of the Graph G. The minimum among all the maximum distances between a vertex to all other vertices is considered as the radius of the Graph G.


2 Answers

I woluld first use Dijkstra algorithm (it has to be run for each verticle) for computng shortest distances between all pairs of verticles - there are also some more efficient algorithms for that like Floyd-Warshall. Then for each verticle V you have to find Vm - the largest distance to any other verticles amongs the data retuirned form Dijkstra algorithm. Then, the verticles with the smallest Vm are the one in the graph center. Pseudocode:

int n = number of verticles;
int[][] D = RunDijkstraOrWarshall()
// D[a,b] = length of shortest path from a to b
int[] Vm = new int[n];
for(int i=0; i<n i++)
{
   Vm[i] = 0
   for(int j=0; j<n; j++) 
   {
     if (Vm[i] < D[i,j]) Vm[i] = D[i,j];
   }  
}

minVm = int.Max;
for(int i=0; i<n ;i++)
{
  if (minVm < Vm[i]) minVm = Vm[i];
}

for(int i=0; i<n ;i++)
{
  if (Vm[i] == minVm)
  {
     // graph center contans i
  }

}

like image 170
PanJanek Avatar answered Oct 04 '22 23:10

PanJanek


Three algorithms for graph center problem are presented in this MSc thesis: A distributed algorithm for the graph center problem.

like image 39
miku Avatar answered Oct 04 '22 22:10

miku