I have a huge graph that I would like to process using many machines.
I had like to compute if the graph diameter is higher than 50.
How would I split the data and I would I write a parallel algorithm that can calculate it? (the return value is boolean)
The graph diameter is the greatest distance between any pair of vertices
To find the diameter of a graph, first find the shortest path between each pair of vertices. The greatest length of any of these paths is the diameter of the graph.
The diameter of a graph is the length of the shortest path between the most distanced nodes. d measures the extent of a graph and the topological length between two nodes.
The diameter of a graph is the largest distance between any pair of vertices, i.e. maxu,v d(u, v). The best known algorithm for finding the diameter exactly is by running an algorithm for APSP and returning the largest distance.
Diameter of a Graph Notation − d(G) − From all the eccentricities of the vertices in a graph, the diameter of the connected graph is the maximum of all those eccentricities. In the above graph, d(G) = 3; which is the maximum eccentricity.
The standard way to figure this out would be an all-pairs shortest path algorithm -- the Floyd-Warshall algorithm is a good place to start. Another option using Hadoop is located here.
Take a look at Parallel implementation of graph diameter algorithms
Also: Parallel Graph Algorithms
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With