Hi folks,
I would like to compute about 2 dozen shortest paths within weighted graphs with vertex counts of 125, 250, 500,1000, 2000. The paths mostly involve unique vertices. My edges currently look like this:
weightedEdges=Annotation[#[[1,1]]#[[1,2]],EdgeWeight#[[2]]]&/@distancePairs;
I have all the distances to compose complete graphs for each, and then apply FindShortestPath[]. However, direct computation of the complete graph
weG=Graph[weightedEdges];
is quite time consuming as shown below.
Questions:
1. Are there more time-efficient approaches to obtain the shortest paths?
2. Can the Graph[] objects be exported to disk, and then imported for reuse -- without incurring the initial computation time?
​
Here’s the result of a trial and a Fit[] to the data.
y[[n]] = -175.217+16.8013n-0.545297
2
n
+0.00614944
3
n
(n vertices, y seconds)
y[[125]] =
1.50425
h
y[[250]] =
18.3414
h
y[[500]] =
7.41414
days
y[[1000]] =
65.0552
days
y[[2000]] =
1.49188
yr