MeanGraphDistance
gives the mean distance between all pairs of vertices in the graph g.
MeanGraphDistance[{vw,…}]
uses rules vw to specify the graph g.
Details and Options
- MeanGraphDistance is also known as the average path length.
- MeanGraphDistance[g] is the average length of all shortest paths between vertices of g.
Examples
open allclose allBasic Examples (2)
Scope (7)
MeanGraphDistance works with undirected graphs:
Use rules to specify the graph:
MeanGraphDistance works with large graphs:
Options (2)
Method (2)
By default, edge weights are used to determine graph distance:
Use Method->"UnitWeight" to ignore edge weights:
Applications (4)
A network of American football games between Division IA colleges during regular season fall 2000. The average number of games linking one team to another is about 2.5:
It takes a few more than five clicks on average to navigate from one symbol to another using the See Also links in the Wolfram Language documentation:
Distribution of the number of co-appearances linking two randomly selected actors in a small-size Kevin Bacon game:
Average number of co-appearances linking two actors:
Distribution of the average number of relations connecting two people in a WattsStrogatzGraphDistribution social network model:
Properties & Relations (5)
MeanGraphDistance gives the off-diagonal mean of GraphDistanceMatrix:
Compute the off-diagonal mean when the diagonal of GraphDistanceMatrix is 0:
The mean graph distance is greater than or equal to 1:
It can be less than 1 for weighted graphs:
The mean graph distance of g is 1 iff g is a complete graph:
Use CompleteGraphQ to test for complete graphs:
The mean graph distance of a disconnected graph is Infinity:
Use ConnectedGraphQ to test for connected graphs:
MeanGraphDistance can be used to find the GraphLinkEfficiency:
Text
Wolfram Research (2012), MeanGraphDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanGraphDistance.html (updated 2015).
CMS
Wolfram Language. 2012. "MeanGraphDistance." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/MeanGraphDistance.html.
APA
Wolfram Language. (2012). MeanGraphDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeanGraphDistance.html