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:
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.
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+0.00614944 (n vertices, y seconds)
2
n
3
n
y[[125]] =
y[[250]] =
y[[500]] =
y[[1000]] =
y[[2000]] =