MeanGraphDistance

MeanGraphDistance[g]
gives the mean distance between all pairs of vertices in the graph g.

Details and OptionsDetails and Options

  • MeanGraphDistance[g] is the average length of all shortest paths between vertices of g.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Find the mean distance between vertices in a graph:

In[3]:=
Click for copyable input
Out[3]=

Mean graph distance of the Watts-Strogatz model as a function of rewiring probability:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »