-Metric Graphs: Radius, Diameter and all Eccentricities
arXiv:2305.02545
Abstract
We extend known results on chordal graphs and distance-hereditary graphs to much larger graph classes by using only a common metric property of these graphs. Specifically, a graph is called -metric () if it satisfies the following -metric property for every vertices and : if a shortest path between and and a shortest path between and share a terminal edge , then . Roughly, gluing together any two shortest paths along a common terminal edge may not necessarily result in a shortest path but yields a ``near-shortest'' path with defect at most . It is known that -metric graphs are exactly ptolemaic graphs, and that chordal graphs and distance-hereditary graphs are -metric for and , respectively. We show that an additive -approximation of the radius, of the diameter, and in fact of all vertex eccentricities of an -metric graph can be computed in total linear time. Our strongest results are obtained for -metric graphs, for which we prove that a central vertex can be computed in subquadratic time, and even better in linear time for so-called -metric graphs (a superclass of chordal graphs and of plane triangulations with inner vertices of degree at least ). The latter answers a question raised in (Dragan, IPL, 2020). Our algorithms follow from new results on centers and metric intervals of -metric graphs. In particular, we prove that the diameter of the center is at most (at most , if ). The latter partly answers a question raised in (Yushmanov & Chepoi, Mathematical Problems in Cybernetics, 1991).
To appear in WG'23