🤖 AI Summary
This paper addresses the computation of diameter and average distance on continuous graphs—graphs whose edges are continuous line segments, requiring consideration of all points along them. For two fundamental classes of sparse graphs—graphs of bounded treewidth and planar graphs—we introduce a novel geometric modeling framework coupled with piecewise distance function analysis. Our approach integrates tree decompositions, planar graph divide-and-conquer techniques, and efficient data structures such as interval trees to overcome the classical $O(m^2)$ time barrier. Specifically, we achieve an $O(n log^{O(k)} n)$ algorithm for $n$-vertex graphs of treewidth at most $k$, and an $O(nF log n)$ algorithm for $n$-vertex planar graphs with $F$ faces. To the best of our knowledge, these are the first subquadratic-time algorithms for diameter and average distance computation on continuous graphs. The results significantly improve the efficiency of global distance metric estimation and provide new theoretical foundations and algorithmic tools for network analysis and geometric graph learning.
📝 Abstract
We study the problem of computing the diameter and the mean distance of a continuous graph, i.e., a connected graph where all points along the edges, instead of only the vertices, must be taken into account. It is known that for continuous graphs with $m$ edges these values can be computed in roughly $O(m^2)$ time. In this paper, we use geometric techniques to obtain subquadratic time algorithms to compute the diameter and the mean distance of a continuous graph for two well-established classes of sparse graphs. We show that the diameter and the mean distance of a continuous graph of treewidth at most $k$ can be computed in $O(nlog^{O(k)} n)$ time, where $n$ is the number of vertices in the graph. We also show that computing the diameter and mean distance of a continuous planar graph with $n$ vertices and $F$ faces takes $O(n F log n)$ time.