English

Isometric embeddings in trees and their use in the diameter problem

Data Structures and Algorithms 2020-10-30 v1

Abstract

We prove that given a discrete space with nn points which is either embedded in a system of kk trees, or the Cartesian product of kk trees, we can compute all eccentricities in O(2O(klogk)(N+n)1+o(1)){\cal O}(2^{{\cal O}(k\log{k})}(N+n)^{1+o(1)}) time, where NN is the cumulative total order over all these kk trees. This is near optimal under the Strong Exponential-Time Hypothesis, even in the very special case of an nn-vertex graph embedded in a system of ω(logn)\omega(\log{n}) spanning trees. However, given such an embedding in the strong product of kk trees, there is a much faster O(N+kn){\cal O}(N + kn)-time algorithm for this problem. All our positive results can be turned into approximation algorithms for the graphs and finite spaces with a quasi isometric embedding in trees, if such embedding is given as input, where the approximation factor (resp., the approximation constant) depends on the distortion of the embedding (resp., of its stretch). The existence of embeddings in the Cartesian product of finitely many trees has been thoroughly investigated for cube-free median graphs. We give the first-known quasi linear-time algorithm for computing the diameter within this graph class. It does not require an embedding in a product of trees to be given as part of the input. On our way, being given an nn-node tree TT, we propose a data structure with O(nlogn){\cal O}(n\log{n}) pre-processing time in order to compute in O(klog2n){\cal O}(k\log^2{n}) time the eccentricity of any subset of kk nodes. We combine the latter technical contribution, of independent interest, with a recent distance-labeling scheme that was designed for cube-free median graphs.

Keywords

Cite

@article{arxiv.2010.15803,
  title  = {Isometric embeddings in trees and their use in the diameter problem},
  author = {Guillaume Ducoffe},
  journal= {arXiv preprint arXiv:2010.15803},
  year   = {2020}
}
R2 v1 2026-06-23T19:45:19.084Z