TOPICS
Search

Detour Matrix


The detour matrix Delta, sometimes also called the maximum path matrix or maximal topological distances matrix, of a graph is a symmetric matrix whose (i,j)th entry is the length of the longest path from vertex i to vertex j, or infty if there is no such path (Harary 1994, p. 203). The most common convention (and that adopted here) is to take (Delta)_(ii)=0.

For a connected graph, every path extends to a spanning tree. Its detour matrix can therefore be computed from the distance matrices of all its spanning trees as (Delta)_(ij)=max_(T)d_T(i,j), where T ranges over the spanning trees and d_T(i,j) is the graph distance in T (Harary 1994, p. 203).

For a graph with vertex count n, a detour matrix element of (Delta)_(ij)=n-1 corresponds to a Hamiltonian path between vertices i and j. A graph having a detour matrix whose off-diagonal elements are all equal to n-1 is therefore Hamilton-connected. Similarly, a bipartite graph whose elements (Delta)_(i,j) are maximal for all i and j corresponding to different elements of the bipartition is Hamilton-laceable.

For a complete multipartite graph with positive part sizes s_1,...,s_r, r>=2, put N=sum_(i)s_i. If distinct endpoints u and v belong to parts a and b, and e_i counts how many of these endpoints belong to part i, then

 Delta_(uv)=N-1-max(0,max_(i)(2s_i-N+1-e_i)).

Occurrences of a part on a path require separating vertices from other parts, which gives the upper bound. Delete the indicated number of vertices from a part with maximum deficit. The retained part counts t_i satisfy 2t_i<=L-1+e_i, where L=sum_(i)t_i. A connected loopless multigraph on the parts with degrees 2t_i-e_i has an Eulerian path with the prescribed endpoint parts. Its sequence of parts yields a path attaining the bound. Such a multigraph exists because no prescribed vertex degree exceeds half their sum. Only the endpoint parts can have odd vertex degree. Components can therefore be joined by degree-preserving edge switches before taking the Eulerian path.

Precomputed detour matrices for many named graphs are available in the Wolfram Language as GraphData[graph, "DetourMatrix"].


See also

Detour Index, Detour Polynomial, Graph Circumference, Graph Distance Matrix, Graph Matrix, Hamilton-Connected Graph, Hamilton-Laceable Graph, Longest Path, Spanning Tree

Explore with Wolfram|Alpha

References

Amić, D. and Trinajstić, N. "On the Detour Matrix." Croat. Chem. Acta 68, 53-62, 1995.Devillers, J. and Balaban, A. T. (Eds.). Topological Indices and Related Descriptors in QSAR and QSPR. Amsterdam, Netherlands: Gordon and Breach, p. 44, 1999.Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 203, 1994.Nikolić, S.; Trinajstić, N.; and Mihalić, A. "The Detour Matrix and the Detour Index." Ch. 6 in Topological Indices and Related Descriptors in QSAR and QSPR (Ed. J. Devillers A. T. and Balaban). Amsterdam, Netherlands: Gordon and Breach, pp. 279-306, 2000.Randić, M.; DeAlba, L. M.; Harris, F. E. "Graphs with the Same Detour Matrix." Croat. Chem. Acta 71, 53-68, 1998.Zamfirescu, T. "On Longest Paths and Circuits in Graphs." Math. Scand. 38, 211-239, 1976.

Referenced on Wolfram|Alpha

Detour Matrix

Cite this as:

Weisstein, Eric W. "Detour Matrix." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/DetourMatrix.html

Subject classifications