Jump to content

Distance (graph theory)

From Wikipedia, the free encyclopedia

In themathematicalfield ofgraph theory,thedistancebetween twoverticesin agraphis the number of edges in ashortest path(also called agraph geodesic) connecting them. This is also known as thegeodesic distanceorshortest-path distance.[1]Notice that there may be more than one shortest path between two vertices.[2]If there is nopathconnecting the two vertices, i.e., if they belong to differentconnected components,then conventionally the distance is defined as infinite.

In the case of adirected graphthe distanced(u,v)between two verticesuandvis defined as the length of a shortest directed path fromutovconsisting of arcs, provided at least one such path exists.[3]Notice that, in contrast with the case of undirected graphs,d(u,v)does not necessarily coincide withd(v,u)—so it is just aquasi-metric,and it might be the case that one is defined while the other is not.

[edit]

Ametric spacedefined over a set of points in terms of distances in a graph defined over the set is called agraph metric. The vertex set (of an undirected graph) and the distance function form a metric space, if and only if the graph isconnected.

Theeccentricityϵ(v)of a vertexvis the greatest distance betweenvand any other vertex; in symbols,

It can be thought of as how far a node is from the node most distant from it in the graph.

Theradiusrof a graph is the minimum eccentricity of any vertex or, in symbols,

Thediameterdof a graph is the maximum eccentricity of any vertex in the graph. That is,dis the greatest distance between any pair of vertices or, alternatively,

To find the diameter of a graph, first find theshortest pathbetween each pair ofvertices.The greatest length of any of these paths is the diameter of the graph.

Acentral vertexin a graph of radiusris one whose eccentricity isr—that is, a vertex whose distance from its furthest vertex is equal to the radius, equivalently, a vertexvsuch thatϵ(v) =r.

Aperipheral vertexin a graph of diameterdis one whose eccentricity isd—that is, a vertex whose distance from its furthest vertex is equal to the diameter. Formally,vis peripheral ifϵ(v) =d.

Apseudo-peripheral vertexvhas the property that, for any vertexu,ifuis as far away fromvas possible, thenvis as far away fromuas possible. Formally, a vertexvis pseudo-peripheral if, for each vertexuwithd(u,v) =ϵ(v),it holds thatϵ(u) =ϵ(v).

Alevel structureof the graph, given a starting vertex, is apartitionof the graph's vertices into subsets by their distances from the starting vertex.

Ageodetic graphis one for which every pair of vertices has a unique shortest path connecting them. For example, alltreesare geodetic.[4]

Theweighted shortest-path distancegeneralises the geodesic distance toweighted graphs.In this case it is assumed that the weight of an edge represents its length or, forcomplex networksthecostof the interaction, and the weighted shortest-path distancedW(u,v)is the minimum sum of weights across all thepathsconnectinguandv.See theshortest path problemfor more details and algorithms.

Algorithm for finding pseudo-peripheral vertices

[edit]

Often peripheralsparse matrixalgorithms need a starting vertex with a high eccentricity. A peripheral vertex would be perfect, but is often hard to calculate. In most circumstances a pseudo-peripheral vertex can be used. A pseudo-peripheral vertex can easily be found with the following algorithm:

  1. Choose a vertex.
  2. Among all the vertices that are as far fromas possible, letbe one with minimaldegree.
  3. Ifthen setand repeat with step 2, elseis a pseudo-peripheral vertex.

See also

[edit]

Notes

[edit]
  1. ^Bouttier, Jérémie; Di Francesco, P.; Guitter, E. (July 2003). "Geodesic distance in planar graphs".Nuclear Physics B.663(3): 535–567.arXiv:cond-mat/0303272.Bibcode:2003NuPhB.663..535B.doi:10.1016/S0550-3213(03)00355-9.S2CID119594729.By distance we mean here geodesic distance along the graph, namely the length of any shortest path between say two given faces
  2. ^Weisstein, Eric W."Graph Geodesic".MathWorld--A Wolfram Web Resource.Wolfram Research.Archivedfrom the original on 2008-04-23.Retrieved2008-04-23.The length of the graph geodesic between these points d(u,v) is called the graph distance between u and v
  3. ^F. Harary, Graph Theory, Addison-Wesley, 1969, p.199.
  4. ^Øystein Ore,Theory of graphs [3rd ed., 1967], Colloquium Publications, American Mathematical Society, p. 104