Abstract 1 Introduction 2 Preliminaries 3 An algorithm for the center problem 4 Hardness results References

A Fine-Grained Dichotomy for the Center Problem on Gromov Hyperbolic Graphs

Guillaume Ducoffe ORCID National Institute for Research and Development in Informatics, Bucharest, Romania
Faculty of Mathematics and Computer Science, University of Bucharest, Romania
Abstract

A vertex in a graph is called central if it minimizes its maximum distance to the other vertices. The radius of a graph G is the largest distance between a central vertex and the other vertices, and it is denoted by rad(G). In the center problem, we are asked to find a central vertex. We study the fine-grained complexity of the center problem on graphs with small Gromov hyperbolicity. Roughly, the Gromov hyperbolicity of a graph represents how close, locally, it is to a tree, from a metric point of view. It has applications in the design of approximation algorithms. In particular, there is a linear-time algorithm that for every δ-hyperbolic graph G outputs some vertex at distance at most rad(G)+5δ to the other vertices [Chepoi et al, SoCG’08]. However, a linear-time algorithm for computing a central vertex is known only for 0-hyperbolic graphs, whereas its existence was ruled out for 2-hyperbolic graphs under the Hitting Set Conjecture of [Abboud et al, SODA’16]. Our main contribution in the paper is a linear-time algorithm for computing a central vertex in the class of 12-hyperbolic graphs. Furthermore, we rule out the existence of such an algorithm for 1-hyperbolic graphs, under the Hitting Set Conjecture, thus completely settling all the cases left open.

Keywords and phrases:
Center problem, Gromov hyperbolicity, Fine-grained complexity in P, Graph algorithms
Category:
Track A: Algorithms, Complexity and Games
Copyright and License:
[Uncaptioned image] © Guillaume Ducoffe; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis
; Theory of computation Problems, reductions and completeness
Related Version:
Full Version: https://arxiv.org/pdf/2605.01578 [35]
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

We study the finer-grained complexity of facility location problems on graphs with respect to some properties of their distance function. This is in contrast with structural parameterizations for these problems, such as treewidth [1] and clique-width [32]. The structure of graphs sharing distance properties with the classical metric and geometric spaces (e.g., Euclidean spaces, p-spaces, Hyperbolic spaces, etc.) has long been studied [5]. These prior works are mostly devoted to graphs that are undirected, unweighted, connected, and simple (i.e., with no loops nor multiple edges). Such is also the setting considered in the paper. We refer to [7, 13] for other related works on edge-weighted undirected graphs. For standard graph terminology, see also [8]. Algorithmic applications of some of these properties to distance computation problems can be found in [6, 17, 28]. We focus on the Center problem, the definition of which is outlined in what follows.

The center problem.

Let G be a graph. For every two vertices u and v, their distance, denoted by dG(u,v), equals the minimum number of edges on a uv-path. Let eG(v)=max{dG(u,v):uV(G)} be the eccentricity of vertex v. The radius and the diameter of G are defined as rad(G)=min{eG(v):vV(G)} and diam(G)=max{eG(v):vV(G)}, respectively. We will omit the subscript if the graph G is clear from the context. A vertex is called central if its eccentricity equals the radius. The Center problem asks to find a central vertex. It is a fundamental problem in Network Analysis, and in Location Theory. Note that a naive algorithm that first computes the distance matrix allows one to solve the Center problem in O(nm) time on n-vertex m-edge graphs. This runtime is essentially optimal assuming the Hitting Set Conjecture [1], the definition of which is recalled in Sec. 4. In particular, for the design of linear-time algorithms, we are required to consider more restricted classes of graphs. Our focus in the paper is on graphs with small Gromov hyperbolicity.

Gromov hyperbolic graphs.

The Gromov hyperbolicity of a connected graph G is the least value δ such that for every four vertices u,v,x,y, it holds that d(u,v)+d(x,y)max{d(u,x)+d(v,y),d(u,y)+d(v,x)}+2δ [41]. The definition applies to general metric spaces. It is a relaxation of the four-point characterization of tree metrics [12]. Note that for graphs, the Gromov hyperbolicity is either a natural number or a positive half-integer (of the form k/2, where k is a natural odd number). It has been experimentally verified that the Gromov hyperbolicity is small in practice on some biological networks and communication networks [3, 24], therefore suggesting the use of this parameter in order to better classify complex networks [2, 48], and to explain some of their properties [9, 22, 47]. Furthermore, unlike many graph width parameters that are NP-hard to compute, or even to approximate, the Gromov hyperbolicity of a graph can be computed in polynomial time. The naive O(n4)-time algorithm has been improved in [39]. There exist parameterized algorithms [38], as well as approximation algorithms [15, 31], that are even faster. See also [26], and the references therein for practical algorithms.

On the algorithmic side, every δ-hyperbolic graph can be embedded in a tree with additive distortion in O(δlogn) [41]. The latter result can be used in the design of compact labeling schemes for approximate distance computation [40]. For other algorithmic applications, see [43, 50]. Our starting point for this work is that for every δ-hyperbolic graph G, an almost central vertex: of eccentricity at most rad(G)+5δ, can be computed in O(n+m) time [20]. This seminal result was later generalized to the approximate computation of all the vertex eccentricities [21], and to an approximation algorithm for the more general k-Center problem [23, 37]. In the paper, we consider exact algorithms for the Center problem.

The combination of Gromov hyperbolicity with other structural and metric properties can be used in the design of linear-time algorithms for the Center problem on various graph classes [16, 28]. However, Gromov hyperbolicity on its own is not a strong enough parameter for subquadratic-time center computation; in particular, assuming the Hitting Set conjecture, the radius of 2-hyperbolic graphs cannot be computed in truly subquadratic-time [21]. Insofar, the only positive result in this direction is the linear-time algorithm for computing a central vertex of a 0-hyperbolic graph. More specifically, the 0-hyperbolic graphs are exactly the block graphs [44], a proper subclass of chordal graphs, and a linear-time algorithm for the Center problem on chordal graphs is known [18]. (Recall that a graph is chordal if it has no induced cycle of length more than three.) Therefore, the complexity of the Center problem has been left open for the following hyperbolicity values: 12,1and32. We stress that for some well-studied classes of graphs, including chordal graphs, weakly chordal graphs, AT-free graphs, distance-hereditary graphs, cocomparability graphs, the link graphs of simple polygons, and the graphs of 7-systolic simplicial complexes, the hyperbolicity is at most one [11, 20, 54]. Therefore, bridging the complexity gap for the Center problem between 0-hyperbolic graphs and 2-hyperbolic graphs is a legitimate research direction. A similar question could be asked for other distance-related problems, such as diameter computation. In this work, we completely settle all of the cases left open for the Center problem.

Contributions

Our main result in the paper is as follows:

Theorem 1.

The Center problem can be solved in linear time on 12-hyperbolic graphs.

Before our work, the best-known algorithms for the Center problem on (superclasses of) 12-hyperbolic graphs were the deterministic O(m1.71)-time algorithm from [27], and the recent randomized O~(m32)-time algorithm from [16]. These running-times were outmatching the naive O(nm)-time algorithm only for graphs of sufficiently low density. Furthermore, unlike [16], all our algorithms in the paper are deterministic.

A full characterization of the 12-hyperbolic graphs was given in [4]. Their structure is arguably more complex than that of block graphs. In particular, we stress that every C4-free graph is an induced subgraph of some 12-hyperbolic graph [25]. Furthermore, every C4-free graph within the following classes of graphs is 12-hyperbolic: AT-free graphs, cocomparability graphs, permutation graphs and distance-hereditary graphs [54]. In contrast to Theorem 1, let us mention that the best-known algorithm for the Center problem on AT-free graphs and on cocomparability graphs runs in O(m3/2) time [33].

Overview of our approach.

In order to sketch our strategy to prove Theorem 1, we need to introduce a few more notations and terminology. For every two vertices u and v, let the (metric) interval I(u,v) be defined as the set of all vertices w on a shortest uv-path (i.e., such that d(u,v)=d(u,w)+d(w,v)). For every k such that 0kd(u,v), let Sk(u,v)={wI(u,v):d(u,w)=k} be called a slice. Our basic strategy would be to compute a pair u,v of mutually distant vertices (i.e., such that e(u)=e(v)=d(u,v)), using a few BFS, then to extract a central vertex from a middle slice. This approach has been used in the design of linear-time algorithms for the Center problem on various graph classes [19, 36, 51]. A refinement of it was presented in [18] for chordal graphs: such that either we extract a central vertex from a middle slice or we compute a new pair u,v of mutually distant vertices such that d(u,v)>d(u,v). Since for chordal graphs d(u,v)diam(G)2, a central vertex is found after a constant number of iterations. Our algorithm follows a similar strategy to these prior works, although we must tackle with new challenges that are specific to 12-hyperbolic graphs. More specifically, in some cases where d(u,v)=2r1 is odd, previous techniques can neither be used to extract a central vertex from the middle slices Sr1(u,v) and Sr(u,v), nor to find a new pair u,v of distance larger than d(u,v). In this situation, we extend the search for a central vertex to the neighborhoods of both slices. The latter requires inspecting the vertices at a distance of up to 3 from the slices in order to guide the search. Hence, as a side contribution of this work, we bring new insights on the structure of the balls centered at a clique of a 12-hyperbolic graph.

Another difference between [18] and our Theorem 1 is the implementation of the distance-to-clique procedure. Roughly, the procedure must output some distance information for every vertex of a clique, which includes their respective eccentricities. The linear-time implementation proposed in [18, Sec. 3] was based on a property of chordal graphs that does not hold for 12-hyperbolic graphs (namely, that cliques in a chordal graph are outergated, see Sec. 2). We propose a different implementation, which is based on recent results about cliques in a graph with convex balls (a superclass of chordal graphs and 12-hyperbolic graphs) [16].

Additional results.

Recall that the algorithm presented in this paper is proved to be correct under the unchecked assumption that the input graph is 12-hyperbolic. If we run this algorithm on an arbitrary input, then it may fail, or it may output a non-central vertex. The latter raises the question of deciding whether a graph is 12-hyperbolic. The problem was studied in [25], where a subcubic equivalence was proved between the recognition of 12-hyperbolic graphs and the detection of an induced C4. Combined with the results from [53], it implies that we can decide whether a graph is 12-hyperbolic in O(nω+o(1)) time, where ω<2.371339 denotes the square matrix multiplication exponent. We complete these prior works with the following conditional lower bound (the definition of the Strong Exponential-Time Hypothesis is recalled in Sec. 4):

Theorem 2.

Under the Strong Exponential-Time Hypothesis, the recognition of 12-hyperbolic graphs requires Ω(n2o(1)) time, even on n-vertex split graphs with at most n1+o(1) edges.

A similar hardness result was proved in [10], but only for the recognition of 1-hyperbolic graphs. The 1-hyperbolic graphs are much less structured than the 12-hyperbolic graphs. For example, every graph with diameter at most three is 1-hyperbolic [49].

Finally, we complete Theorem 1 with the following hardness result on the Center problem for 1-hyperbolic graphs:

Theorem 3.

Assuming the Hitting Set conjecture, the Center problem on 1-hyperbolic graphs requires Ω(n2o(1)) time, even on graphs with n vertices and at most n1+o(1) edges.

The missing proofs in what follows can be found in the full version of the paper [35].

Perspectives: other definitions of hyperbolicity.

There are other so-called “negative curvature” parameters on graphs, that can only differ from Gromov hyperbolicity by a small multiplicative factor; see [15]. One of these parameters, the slimness, has received special attention [30]. Although the differences between these parameters and Gromov hyperbolicity are irrelevant in the design of approximation algorithms, they may lead to varying behaviors, for small values, when considering exact algorithms. For instance, we can prove that linear-time center computation can only be achieved for graphs with slimness 0 (a.k.a., the block graphs), whereas it essentially requires quadratic-time, under the Hitting Set conjecture, for any positive value of slimness. The latter result is a byproduct of our proof for Theorem 3.

2 Preliminaries

In what follows, we introduce the notations, terminology, and prior results that are required for the presentation of the main algorithm and its analysis. Basic concepts of neighborhoods, distances, eccentricities, and other related notions are both defined for vertices and vertex-subsets. This will make easier the presentation of our algorithms in Sec. 3.

Let G=(V,E) be a graph. The neighborhood of a vertex x, denoted by N(x), is the set of all the vertices y such that xyE. The degree of x is equal to d(x)=|N(x)|. For a vertex-set X, we define similarly N(X)={yVX:N(y)X}, and d(X)=|N(X)|. We recall that the distance d(x,y) between two vertices x and y is the minimum number of edges on a path between x and y. An xy-path with minimum number of edges is called a shortest xy-path. The ball of center x and radius r, hereafter denoted by Br(x), is the set of all the vertices y such that d(x,y)r. Let e(x)=max{d(x,y):yV} be the eccentricity of G. The set of vertices that are furthest from x is denoted by F(x)={yV:d(x,y)=e(x)}. Two vertices x and y are mutually distant if xF(y) and yF(x). Let rad(G)=min{e(x):xV} and diam(G)=max{e(x):xV} be called the radius and the diameter of G, respectively. A vertex x is called central if e(x)=rad(G). These notations can be extended from vertices x to vertex-sets X as follows. For every vertex y let d(y,X)=min{d(x,y):xX}. For every natural number r let Br(X)={yV:d(y,X)r}. Let e(X)=max{d(y,X):yV}, and let F(X)={yV:d(y,X)=e(X)}. The (weak) diameter of X is defined as diam(X)=max{d(x,x):x,xX}.

Recall that for every vertices x and y, I(x,y)={zV:d(x,y)=d(x,z)+d(z,y)}. Let also Io(x,y)=I(x,y){x,y}. For every k such that 0kd(x,y), let Sk(x,y)={zI(x,y):d(x,z)=k} be called a slice. A set X is called convex if I(x,x)X for every x,xX. A metric triangle consists of three different vertices x,y,z such that the sets Io(x,y), Io(y,z), and Io(z,x) are pairwise disjoint. The type of a metric triangle x,y,z is defined as the triple (d(x,y),d(y,z),d(z,x)). A median of a triple of vertices x,y,z is any vertex of I(x,y)I(y,z)I(z,x). A quasi-median of x,y,z is a metric triangle x,y,z such that the following distance equalities hold: d(x,y)=d(x,x)+d(x,y)+d(y,y), d(y,z)=d(y,y)+d(y,z)+d(z,z), and d(z,x)=d(z,z)+d(z,x)+d(x,x). It was observed in [20] that every triple of vertices x,y,z has a median or a quasi-median.

Projections, shadows, and potentials.

The following concepts are a cornerstone of our approach in the next section. Let X be a vertex set of G. The projection of a vertex y on X is defined as pry(X)={xX:d(y,x)=d(y,X)}. For every vertex-set Y, we further define the Y-shadow of a vertex xX as being ΨX(x,Y)={yY:xpry(X)}; let ψX(x,Y)=|ΨX(x,Y)|. Of particular interest is the special case where Y=F(X); then, we simply write ΨX(x) and ψX(x). Finally, for every natural number r, the r-potential of a vertex x with respect to Y is defined as Φr(x,Y)=Br(x)Y; let ϕr(x,Y)=|Φr(x,Y)|.

Graph classes considered in our results.

We recall that a graph G=(V,E) is δ-hyperbolic if for every u,v,x,yV, d(u,v)+d(x,y)max{d(u,x)+d(v,y),d(u,y)+d(v,x)}+2δ. In what follows, we mostly consider the special case δ=12. We further consider two related metric properties on graphs. The graph G satisfies the α1-metric property if for every u,v,w,xV such that vI(u,w) and wI(v,x) are adjacent, d(u,x)d(u,v)+d(w,x). Then, we also call G an α1-metric graph. A CB-graph is a graph with convex balls. It was observed in [4] that every 12-hyperbolic graph is α1-metric, and in [55] that every α1-metric graph is a CB-graph. We will often use these relations in our proofs with no further mention.

The following properties of δ-hyperbolic graphs are used:

Lemma 4.

If G=(V,E) is a δ-hyperbolic graph, then

  1. 1.

    the diameter of every slice is at most 2δ; in particular, every slice of a 12-hyperbolic graph is a clique [14];

  2. 2.

    the eccentricity of any vertex furthest from an arbitrary vertex is at least diam(G)2δ [20];

  3. 3.

    a pair u,v of mutually distant vertices can be computed in O(δm) time [21].

A distance-preserving subgraph in a graph G is called an isometric subgraph. A graph is called a Helly graph if every family of pairwise intersecting balls has a nonempty common intersection. For every graph G there is an inclusionwise minimal Helly graph (G) in which G isometrically embeds [46]. The graph (G) is sometimes called the injective hull of G.

Lemma 5 ([42]).

A graph G is δ-hyperbolic if and only if its injective hull (G) is δ-hyperbolic.

The following results on the α1-metric property are also used.

Lemma 6.

If G=(V,E) is an α1-metric graph, then

  1. 1.

    every metric triangle is of type (1,1,1), (1,2,2), (2,1,2), (2,2,1) or (2,2,2) [4];

  2. 2.

    for every adjacent x,ySk(u,v), x and y have common neighbours in both Sk1(u,v) and Sk+1(u,v) [29].

𝒌-Outergated sets.

Let G=(V,E) be a graph. We call XV a k-outergated set if for every vertex z such that d(z,X)>k, {Sk(x,z):xprz(X)}. Furthermore, every vertex z in this intersection is called a k-outergate of z with respect to X. For k=1, we simply refer to outergated sets, and to outergates.

Lemma 7 ([34]).

For a set X of a graph G, in O(m) time one can map every zX to zBd(z,X)1(z)B1(X) maximizing |N(z)X|. Furthermore, if X is outergated, then z is an outergate of z.

Finally, the following recent results on cliques in a CB-graph are used in our analysis:

Lemma 8 ([16]).

If K is a clique of a CB-graph G=(V,E), then

  1. 1.

    K is 2-outergated. More precisely, for any zVK, either z has an outergate or prz(K)=K and z has a 2-outergate;

  2. 2.

    in O(m) time we can compute the set of vertices without an outergate with respect to K.

3 An algorithm for the center problem

The following section is devoted to the proof of Theorem 1.

3.1 Intermediate computations: shadows, potentials and eccentricities

Shadows were implicitly used in [18], where a linear-time distance-to-clique procedure is introduced in order to compute the shadows for the vertices of a clique of a chordal graph. We present a novel version of the distance-to-clique procedure from [18], which is tailored for the 12-hyperbolic graphs. Indeed, the initial procedure from [18] was based on the assumption that cliques are outergated, which is true for chordal graphs but not for the 12-hyperbolic graphs. For example, the cycle C5 is 12-hyperbolic, however the edges of C5 are not outergated.

Lemma 9.

Let K,M be disjoint vertex-subsets in a 12-hyperbolic graph G such that K is a clique. The following values, for every wK, can be computed in O(n+m) time:

  1. 1.

    ψK(w,M) (shadows);

  2. 2.

    ϕr(w,M), for a fixed natural number r (potentials);

  3. 3.

    and e(w) (eccentricities).

Roughly, we bi-partition the vertices of M according to the existence of an outergate in K. By Lemma 8.2, this partitioning can be done in linear time. For the vertices with an outergate, we adapt the distance-to-clique procedure from [18] for shadow computations. For the other vertices, by Lemma 8.1 they are equidistant to all the vertices of K, and so, they must be included in all the shadows. Finally, the computation of r-potentials (2), and of eccentricities (3) can be reduced to that of some shadows (1) for different subsets M. Note that Lemma 9.3 is also a special case of [16, Prop. 11.10].

3.2 Lower and upper bounds on eccentricities

We next provide upper bounds on the eccentricities of the vertices in a middle slice.

Lemma 10.

If u,v are mutually distant vertices in a 12-hyperbolic graph G=(V,E), then e(w)d(u,v)2+1 for every wSd(u,v)2(u,v) (resp. for every wSd(u,v)2(u,v)).

In particular,

d(u,v)2rad(G)d(u,v)2+1

Proof.

By symmetry (up to reverting the respective roles of u and v), it suffices to prove the result for the slice Sd(u,v)2(u,v). Let zV be arbitrary. It suffices to prove that d(w,z)d(u,v)2+1 for every wSd(u,v)2(u,v). For that, since u and v are mutually distant, d(u,z)d(u,v) and d(v,z)d(u,v). In particular, the balls Bd(u,v)2(u),Bd(u,v)2(v)andBd(u,v)2(z) pairwise intersect. Let (G) be the injective hull of G. Since (G) is a Helly graph, there is a vertex cz of (G) such that d(cz,u)=d(u,v)2, d(cz,v)=d(u,v)2, and d(cz,z)d(u,v)2. By Lemma 5, (G) is 12-hyperbolic. Therefore, by Lemma 4.1, d(w,cz)1 for every wSd(u,v)2(u,v). It implies d(z,w)d(z,cz)+d(cz,w)d(u,v)2+1.

Lemma 10 can be directly used in order to solve the even case of our algorithm (case of mutually distant vertices at an even distance).

Corollary 11.

If u,v are mutually distant vertices in a 12-hyperbolic graph G such that d(u,v)=2r is even, then every vertex of minimum eccentricity in Sr(u,v) is central.

For the odd case, our first intent was to reuse the strategy from [18]: either we extract a central vertex from a middle slice, or we find a new pair of mutually distant vertices at a larger distance. For that, the following procedure can be used:

Lemma 12.

Let K,M be disjoint vertex-subsets in an α1-metric graph G such that K is a clique, and for every zM, d(z,K)r. If the vertex c maximizes ψK(c,M), but ψK(c,M)<|M|, then for every xMΨK(c,M), e(x)max{d(x,y):yM}2r.

Corollary 13.

If K is a clique in an α1-metric graph G, the vertex c maximizes ψK(c), and e(c)=e(K)+1, then for every xF(c), e(x)2e(K).

However, the strategy sketched above can only be used in order to solve the odd case d(u,v)=2r1 if the middle slice Sr1(u,v) has eccentricity r. The example of Fig. 1 shows that it is not always the case.

Figure 1: The graph G, made of three paths pending to the vertices of a C5, is 12-hyperbolic. Vertices x,y,z are pairwise at distance 2r1, however d(y,Sr1(x,z))=d(z,Sr1(x,y))=r+1.

3.3 The odd case

We present in what follows the new results and techniques that are required to solve the odd case. For starters, we use metric triangles (Lemma 6.1) to prove that we can always restrict the search for a central vertex to the two middle slices and their respective neighborhoods.

Lemma 14.

Let u,v,c be vertices in a graph G such that d(u,c)r, d(v,c)r, and d(u,v)=2r1. If G is α1-metric, then cB1(Sr1(u,v))B1(Sr(u,v)).

The remainder of this part is devoted to the proof of the following result:

Proposition 15.

Let K be a clique in a 12-hyperbolic graph G such that e(K)=r+13, and e(w)=e(K)=r+1 for every wK. There is an O(n+m)-time procedure that outputs a vertex a such that either e(a)r, e(a)=r+1, or e(a)2r. Furthermore, if e(a)=r+1 then every vertex of B1(K) also has eccentricity at least r+1.

We remark that since we assume r2, r<r+1<2r. Before proving Proposition 15, we need to prove a few intermediate results.

Lemma 16.

Let K be a clique of a graph G, and let x be such that d(x,K)3. If G is 12-hyperbolic then the slices S2(w,x), for wprx(K), are comparable for inclusion.

Proof.

Suppose by contradiction S2(w,x) and S2(w,x) are uncomparable for inclusion, for some w,wprx(K). Let yS2(w,x)S2(w,x) and let yS2(w,x)S2(w,x). By Lemma 4.1, both S2(w,x) and S2(w,x) are cliques. Since K is 2-outergated (Lemma 8.1), S2(w,x)S2(w,x). Therefore, d(y,y)2. However, by the α1-metric property, d(y,y)d(y,w)+d(w,y)=4. A contradiction.

We combine Lemma 16 with Lemma 6.2, to prove the following important result:

Lemma 17.

If K is a clique of a 12-hyperbolic graph G, then B2(K) is outergated.

We next summarize ways to restrict the search for a central vertex, using outergates and some convexity arguments:

Lemma 18.

Let K be a clique of a 12-hyperbolic graph G such that e(K)=r+13. For every xF(K), let gK(x) be an outergate in B2(K). Let M={gK(x):xF(K)}. The following must hold for any vertex cN(K) such that e(c)r:

  1. 1.

    For every xF(K), c has some neighbor xcprx(B2(K)) such that ϕ2(xc,M) is maximized. In particular, d(c,gK(x))=2, and diam(M)4.

  2. 2.

    For every y such that d(y,K)=r, N(c)pry(K). Furthermore if
    K={pry(K):d(y,K)=r}, then cN(K).

We need one more technical lemma:

Lemma 19.

Let x,y,w be vertices in a graph G such that d(x,w)=d(y,w)=3, and d(x,y)3. If G is α1-metric, and d(y,S1(x,w))3, then S1(w,x)S1(w,y).

The proof of Proposition 15 now follows from the analysis of Algorithm 1. See also Fig. 2 for an illustration. The implementation of the algorithm can be reduced to O(1) calls to BFS (either from a start vertex, or from a start subset), and to the procedure of Lemma 9. Therefore, the running time is linear.

Algorithm 1 The process-clique procedure, see Prop. 15.

Let us sketch the correctness proof of this algorithm. First, we force the clique K to satisfy the following Property (α): zVF(K),wK,d(z,w)r. The intuition goes as follows: assume that we can find a vertex vLN(K) such that F(K)Br(vL). Then, either e(vL)r, or e(vL)=r+1 and F(vL)VF(K). Furthermore, in the latter situation, assuming Property (α) we can consider any edge between vL and K; by applying the α1-metric property to this edge, we can prove that every vertex of F(vL) has eccentricity 2r (lines 65–69). In order to enforce Property (α), we use the set of vertices F(K)={zV:d(z,K)=r} (lines 2–11). If F(K)=, then Property (α) already holds. Otherwise, either some vertex of K is at distance at most r to every vertex of F(K), in which case we can restrict K to K={wK:ψK(w,F(K))=F(K)} (see Lemma 18.2); or we can output a vertex of eccentricity 2r (Lemma 12).

For every xF(K), let gK(x) be an outergate of x in B2(K), whose existence follows from Lemma 17. Let M={gK(x):xF(K)}. Roughly, most of the algorithm (lines 12–59) is devoted to the search for a vertex vL such that MB2(vL). Such a vertex, if any, may not be central, but it satisfies F(K)Br(vL). For that, we fix an arbitrary x0F(K). Let M0 be the subset of vertices in M that are at distance at most 2 to prx0(B2(K)). We start searching in prx0(B2(K)) for a vertex s0 such that M0B2(s0) (lines 28–34). Let L be the subset of all such vertices s0. Then, using an arbitrary zL such that d(z,L)>r, we go closer to K by searching for a cLN(K)N(L) such that cLBr(zL), and M0B2(cL) (see Lemma 18.1). Doing so, let wLN(cL)K be arbitrary, and let WL=S1(wL,x0). We claim that d(gK(x),WL)2 for every xF(K). Indeed, this is true if gK(x)M0, because cLWL. Otherwise (gK(x)M0), we apply Lemma 19 to gK(x),gK(x0)andwL. We end up searching for vL in WL, which by Lemma 4.1 is a clique.

The sub-procedure for searching vL may fail if diam(M)4. More specifically, sometimes we cannot compute an intermediate vertex with the desired properties, in which case we rather find some x,xF(K) such that d(gK(x),gK(x))4. Nevertheless, whenever it happens, by Lemma 18.1 there are only two possibilities: either d(gK(x),gK(x))>4, and there is no cN(K) such that e(c)r; or d(gK(x),gK(x))=4, and so we can restrict the search for such a vertex c to S2(gK(x),gK(x)). In these situations, we replace x0 with one of x or x, then we apply the sub-procedure of lines 15–26. Finally, in a few more technical situations, the search for a vertex vL may fail even if diam(M)3. However, when it happens, we can either directly output a vertex a such that e(a)r (a may not be in N(K), see lines 37 & 42), or e(a)2r (using Lemma 12, see lines 44 & 54); or we can assert that there is no cN(K) such that e(c)r. Furthermore, in the latter situation, we return an arbitrary vertex of K (lines 16, 24 & 50).

Figure 2: An illustration of the proof of Prop. 15.

3.4 The algorithm

Proof of Theorem 1..

Let u,v be mutually distant vertices. If d(u,v)=2r (even case), by Corollary 11, every vertex of minimum eccentricity within Sr(u,v) is central. Hence, we shall assume for the remainder of the proof d(u,v)=2r1 (odd case). By Lemma 10, we are left deciding whether rad(G)=r or rad(G)=r+1, and returning a central vertex. If r=1, then both u and v are universal. In particular, both u and v are central, and so we can return any of those vertices. From now on, we shall assume r2. By Lemma 14, a vertex of eccentricity at most r, if any, must be contained either in B1(Sr1(u,v)), or in B1(Sr(u,v)). We first consider K=Sr1(u,v), which by Lemma 4.1 is a clique. There are two cases:

If e(K)=r, then we follow the same strategy as in [18]. More specifically, let cK be maximizing ψK(c). If e(c)=r, then c is central. Otherwise, let uF(c). By Corollary 13, e(u)2r. Furthermore, by Lemma 4.2, e(u)=e(v)=2r1diam(G)1. Therefore, e(u)=diam(G)=2r. Let vF(u) be arbitrary. We replace u,v with the diametral pair u,v. By doing so, we are back to the even case.

Otherwise, by Lemma 10, e(K)=r+1; furthermore, also by Lemma 10, e(w)=r+1 for every wK. Let a be the vertex returned by the process-clique procedure of Proposition 15 (Algorithm 1). If e(a)=r, then a is central. Else, if e(a)2r, then we conclude as before e(a)=2r=diam(G). We replace u and v with a and an arbitrary vertex of F(a). By doing so, we are back to the even case. Otherwise, e(a)=r+1, and by Proposition 15, there is no vertex of eccentricity r within B1(K). In the latter sub-case, we next consider K=Sr(u,v). We proceed exactly as before, with the exception of the last sub-case: when e(K)=r+1, and the vertex a returned by the process-clique procedure has eccentricity r+1. Then, by Proposition 15 (applied twice), there is no vertex of eccentricity r within B1(Sr1(u,v))B1(Sr(u,v)). By Lemma 14, rad(G)=r+1, and a is central.

Runtime analysis.

We apply Lemma 4.3 to compute a pair u,v of mutually distant vertices. Then, we run two BFSs: from u and v, respectively. In the even case, since by Lemma 4.1 Sr(u,v) is a clique, a vertex of minimum eccentricity within the slice can be computed by applying the procedure of Lemma 9.3. We now focus on the odd case, and we further assume r2 (the sub-case r=1 is trivial). Since we apply the same procedure to Sr1(u,v) and Sr(u,v), it suffices to detail the implementation of this procedure for a fixed clique K. We run a BFS with start subset K to compute e(K) and F(K). If e(K)=r, then we compute the vertex c by applying Lemma 9.1; then, we compute e(c) and F(c) by running a BFS from c. If e(K)=r+1, then we apply Proposition 15; the eccentricity of its output a can be computed from a final BFS. The overall running-time is therefore in O(n+m).

4 Hardness results

We complete Sec. 3 with two hardness results: one for the recognition of 12-hyperbolic graphs, and another for the Center problem on 1-hyperbolic graphs.

Recognition of 𝟏𝟐-hyperbolic graphs.

(Theorem 2). The Strong Exponential-Time Hypothesis (SETH) posits that for any ε>0, there exists a k such that k-SAT on n variables cannot be solved in O((2ε)n) time [45]. The Orthogonal-Vector problem (OV) takes as input two families A and B of n sets over some universe U, and it asks whether there exist aA, bB s.t. ab=. By [52], under SETH we cannot solve OV in O(n2ε) time, for any ε>0. In [11], a characterization of the 12-hyperbolic chordal graphs is proved, via two forbidden isometric subgraphs. For split graphs, the characterization can be reduced to one such subgraph H2. To see the connection with OV, we stress that H2 contains two vertices u and v at distance three, or equivalently such that B1(u) and B1(v) are disjoint. Roughly, we construct split graphs G s.t. conversely, if diam(G)=3, then H2 is an isometric subgraph.

Central vertices in 𝟏-hyperbolic graphs.

(Theorem 3). The Hitting Set Conjecture posits that for any ε>0, there is no algorithm that for two lists A,B of n subsets, can decide in O(n2ε) time if there is a set in the first list that intersects every set in the second list [1]. The authors of [1] introduced the so-called HS-graphs, which they used in order to prove that distinguishing graphs with radius at most two from those of radius at least three cannot be done in truly subquadratic time, under the Hitting Set conjecture. Furthermore, it was observed in [21] that every HS-graph is 2-hyperbolic. We refine the hyperbolicity bound on HS-graphs, using two pre-processing rules, to prove the final result of the paper.

References

  • [1] A. Abboud, V. Vassilevska Williams, and J. Wang. Approximation and fixed parameter subquadratic algorithms for radius and diameter in sparse graphs. In Annual ACM-SIAM symposium on Discrete Algorithms (SODA), pages 377–391, 2016.
  • [2] M. Abu-Ata and F.F. Dragan. Metric tree-like structures in real-world networks: an empirical study. Networks, 67(1):49–68, 2016. doi:10.1002/NET.21631.
  • [3] H. Alrasheed and F.F. Dragan. Core–periphery models for graphs based on their δ-hyperbolicity: An example using biological networks. Journal of Algorithms & Computational Technology, 11(1):40–57, 2017.
  • [4] H.-J. Bandelt and V. Chepoi. 1-Hyperbolic Graphs. SIAM J. Discret. Math., 16(2):323–334, 2003. doi:10.1137/S0895480100380902.
  • [5] H.-J. Bandelt and V. Chepoi. Metric graph theory and geometry: a survey. Contemporary Mathematics, 453:49–86, 2008.
  • [6] L. Bénéteau, J. Chalopin, V. Chepoi, and Y. Vaxès. Medians in median graphs and their cube complexes in linear time. Journal of Computer and System Sciences, 126:80–105, 2022. doi:10.1016/J.JCSS.2022.01.001.
  • [7] J. Berleant, K. Sheridan, A. Condon, V. Vassilevska Williams, and M. Bathe. Isometric Hamming embeddings of weighted graphs. Discrete Applied Mathematics, 332:119–128, 2023. doi:10.1016/J.DAM.2023.02.005.
  • [8] J.A. Bondy and U.S.R. Murty. Graph theory. Graduate Texts in Mathematics, 2008.
  • [9] M. Borassi, A. Chessa, and G. Caldarelli. Hyperbolicity measures democracy in real-world networks. Physical Review E, 92(3):032812, 2015.
  • [10] M. Borassi, P. Crescenzi, and M. Habib. Into the square: on the complexity of some quadratic-time solvable problems. Electronic Notes in Theoretical Computer Science, 322:51–67, 2016.
  • [11] G. Brinkmann, J.H. Koolen, and V. Moulton. On the hyperbolicity of chordal graphs. Annals of Combinatorics, 5(1):61–69, 2001.
  • [12] P. Buneman. A Note on the Metric Properties of Trees. Journal of Combinatorial Theory, Series B, 17:48–50, 1974.
  • [13] S. Cabello. Testing Whether a Subgraph Is Convex or Isometric. In Pat Morin and Eunjin Oh, editors, 19th International Symposium on Algorithms and Data Structures (WADS 2025), volume 349 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.WADS.2025.12.
  • [14] J.W. Cannon, D.B.A. Epstein, D.F. Holt, S.V.F. Levy, M.S. Paterson, and W.P. Thurston. Word processing in groups. Jones and Barlett Publ., Boston, MA, 1992.
  • [15] J. Chalopin, V. Chepoi, F.F. Dragan, G. Ducoffe, A. Mohammed, and Y. Vaxès. Fast approximation and exact computation of negative curvature parameters of graphs. Discrete & Computational Geometry, 65(3):856–892, 2021. doi:10.1007/S00454-019-00107-9.
  • [16] J. Chalopin, V. Chepoi, F.F. Dragan, G. Ducoffe, and Y. Vaxxès. On Gp-unimodality of radius functions in graphs: structure and algorithms. Technical Report 2503.15011, arXiv, 2025.
  • [17] T.M. Chan, H.-C. Chang, J. Gao, S. Kisfaludi-Bak, H. Le, and D.W. Zheng. Truly Subquadratic Time Algorithms for Diameter and Related Problems in Graphs of Bounded VC-dimension. In FOCS 2025, 2025. To appear.
  • [18] V. Chepoi and F.F. Dragan. A linear-time algorithm for finding a central vertex of a chordal graph. In European Symposium on Algorithms (ESA), pages 159–170. Springer, 1994.
  • [19] V. Chepoi and F.F. Dragan. Finding a central vertex in an HHD-free graph. Discrete Applied Mathematics, 131(1):93–111, 2003.
  • [20] V. Chepoi, F.F. Dragan, B. Estellon, M. Habib, and Y. Vaxès. Diameters, centers, and approximating trees of delta-hyperbolic geodesic spaces and graphs. In Annual Symposium on Computational Geometry (SoCG), pages 59–68, 2008.
  • [21] V. Chepoi, F.F. Dragan, M. Habib, Y. Vaxès, and H. Alrasheed. Fast approximation of eccentricities and distances in hyperbolic graphs. Journal of Graph Algorithms and Applications, 23(2):393–433, 2019. doi:10.7155/JGAA.00496.
  • [22] V. Chepoi, F.F. Dragan, and Y. Vaxès. Core congestion is inherent in hyperbolic networks. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’17, pages 2264–2279, 2017.
  • [23] V. Chepoi and B. Estellon. Packing and covering δ-hyperbolic spaces by balls. In International Workshop on Approximation Algorithms for Combinatorial Optimization, pages 59–73. Springer, 2007.
  • [24] N. Cohen, D. Coudert, and A. Lancin. On computing the Gromov hyperbolicity. Journal of Experimental Algorithmics (JEA), 20:1–18, 2015.
  • [25] D. Coudert and G. Ducoffe. Recognition of C4-free and 1/2-hyperbolic graphs. SIAM Journal on Discrete Mathematics, 28(3):1601–1617, 2014.
  • [26] D. Coudert, A. Nusser, and L. Viennot. Computing Graph Hyperbolicity Using Dominating Sets. In Symposium on Algorithm Engineering and Experiments (ALENEX), pages 78–90. SIAM, 2022.
  • [27] F.F. Dragan and G. Ducoffe. α i-Metric Graphs: Radius, Diameter and all Eccentricities. Algorithmica, 86(7):2092–2129, 2024. doi:10.1007/S00453-024-01223-6.
  • [28] F.F. Dragan, G. Ducoffe, and H.M. Guarnera. Fast deterministic algorithms for computing all eccentricities in (hyperbolic) Helly graphs. Journal of Computer and System Sciences, 149:103606, 2025. doi:10.1016/J.JCSS.2024.103606.
  • [29] F.F. Dragan and Ducoffe G. αi-Metric Graphs: Hyperbolicity. Technical Report 2404.14792, arXiv, 2024.
  • [30] F.F. Dragan and A. Mohammed. Slimness of graphs. Discret. Math. Theor. Comput. Sci., 21(3), 2019. doi:10.23638/DMTCS-21-3-10.
  • [31] R. Duan. Approximation algorithms for the Gromov hyperbolicity of discrete metric spaces. In Latin American Symposium on Theoretical Informatics, pages 285–293. Springer, 2014.
  • [32] G. Ducoffe. Optimal Centrality Computations Within Bounded Clique-Width Graphs. Algorithmica, 84:3192–3222, 2022. doi:10.1007/S00453-022-01015-W.
  • [33] G. Ducoffe. The diameter of AT-free graphs. Journal of Graph Theory, 99(4):594–614, 2022. doi:10.1002/JGT.22754.
  • [34] G. Ducoffe. Distance problems within Helly graphs and k-Helly graphs. Theoretical Computer Science, 946:113690, 2023. doi:10.1016/J.TCS.2023.113690.
  • [35] G. Ducoffe. A fine-grained dichotomy for the center problem on Gromov hyperbolic graphs. Technical Report 2605.01578, arXiv, 2026.
  • [36] G. Ducoffe and F. F. Dragan. A story of diameter, radius and (almost) Helly property. Networks, 77(3):435–453, 2021. doi:10.1002/NET.21998.
  • [37] K. Edwards, W.S. Kennedy, and I. Saniee. Fast approximation algorithms for p-centers in large δ-hyperbolic graphs. Algorithmica, 80(12):3889–3907, 2018.
  • [38] T. Fluschnik, C. Komusiewicz, G.B. Mertzios, A. Nichterlein, R. Niedermeier, and N. Talmon. When can graph hyperbolicity be computed in linear time? Algorithmica, 81(5):2016–2045, 2019. doi:10.1007/S00453-018-0522-6.
  • [39] H. Fournier, A. Ismail, and A. Vigneron. Computing the Gromov hyperbolicity of a discrete metric space. Information Processing Letters, 115(6-8):576–579, 2015. doi:10.1016/J.IPL.2015.02.002.
  • [40] C. Gavoille and O. Ly. Distance labeling in hyperbolic graphs. In International Symposium on Algorithms and Computation, pages 1071–1079. Springer, 2005.
  • [41] M. Gromov. Hyperbolic Groups, pages 75–263. Springer New York, 1987.
  • [42] H.M. Guarnera, F.F. Dragan, and A. Leitert. Injective hulls of various graph classes. Graphs and Combinatorics, 38(4):112, 2022. doi:10.1007/S00373-022-02512-Z.
  • [43] B. Das Gupta, M. Karpinski, N. Mobasheri, and F. Yahyanejad. Effect of Gromov-hyperbolicity parameter on cuts and expansions in graphs and some algorithmic implications. Algorithmica, 80(2):772–800, 2018. doi:10.1007/S00453-017-0291-7.
  • [44] E. Howorka. On metric properties of certain clique graphs. Journal of Combinatorial Theory, Series B, 27:67–74, 1979. doi:10.1016/0095-8956(79)90069-8.
  • [45] R. Impagliazzo and R. Paturi. On the complexity of k-SAT. Journal of Computer and System Sciences, 62(2):367–375, 2001. doi:10.1006/JCSS.2000.1727.
  • [46] J. Isbell. Six theorems about injective metric spaces. Commentarii Mathematici Helvetici, 39(1):65–76, 1964.
  • [47] E. Jonckheere and P. Lohsoonthorn. Geometry of network security. In Proceedings of the 2004 American Control Conference, volume 2, pages 976–981. IEEE, 2004.
  • [48] W.S. Kennedy, I. Saniee, and O. Narayan. On the hyperbolicity of large-scale networks and its estimation. In International Conference on Big Data, pages 3344–3351. IEEE, 2016.
  • [49] J.H. Koolen and V. Moulton. Hyperbolic bridged graphs. European Journal of Combinatorics, 23(6):683–699, 2002. doi:10.1006/EUJC.2002.0591.
  • [50] R. Krauthgamer and J.R. Lee. Algorithms on negatively curved spaces. In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS’06), pages 119–132. IEEE, 2006.
  • [51] S. Olariu. A simple linear-time algorithm for computing the center of an interval graph. International Journal of Computer Mathematics, 34(3-4):121–128, 1990. doi:10.1080/00207169008803870.
  • [52] R. R. Williams. A new algorithm for optimal 2-constraint satisfaction and its implications. Theoretical Computer Science, 348(2-3):357–365, 2005. doi:10.1016/J.TCS.2005.09.023.
  • [53] V. Vassilevska Williams, J.R. Wang, R. Williams, and H. Yu. Finding four-node subgraphs in triangle time. In Proceedings of the twenty-sixth annual ACM-SIAM Symposium on Discrete Algorithms, pages 1671–1680. SIAM, 2014.
  • [54] Y. Wu and C. Zhang. Hyperbolicity and Chordality of a Graph. Electr. J. Comb., 18(1):Paper #P43, 2011. doi:10.37236/530.
  • [55] S.V. Yushmanov and V. Chepoi. A general method of investigation of metric graph properties related to the eccentricity. Mathematical Problems in Cybernetics, 3:217–232, 1991.