Define the average path length in a connected graph G as the sum of the lengths of the shortest path between pairs of nodes is divided by the total number of pairs of nodes. Denoting the sum of the shortest path lengths between all pairs of nodes in an n x M rectangular lattice, having n > 2 fixed rows and m:?: 2 variable rows by Sm, we derive a first order linear but non-homogeneous recurrence relation for Sm, from which a closed-form expression for Sm is obtained. Using this explicit expression for Sm, one can then show that the average path length within this graph must be asymptotic to D/3, where D is the diameter, that is, the longest shortest path.
↧