Eccentricity function in distance-hereditary graphs111Declarations of interest: none
Feodor F. Dragan and Heather M. Guarnera
Algorithmic Research Laboratory, Department of Computer Science
Kent State University, Kent, Ohio, USA
[email protected],
[email protected]
Abstract
A graph G=(V,E) is distance hereditary if every induced path of G is a shortest path.
In this paper, we show that the eccentricity function e(v)=max{d(v,u):u∈V} in any distance-hereditary graph G is almost unimodal, that is, every vertex v with e(v)>rad(G)+1 has a neighbor with smaller eccentricity. Here, rad(G)=min{e(v):v∈V} is the radius of graph G.
Moreover, we use this result to fully characterize the centers of distance-hereditary graphs.
Several bounds on the eccentricity of a vertex with respect to its distance to the center of G or to the ends of a diametral path are established.
Finally, we propose a new linear time algorithm to compute all eccentricities in a distance-hereditary graph.
Keywords: Distance-hereditary graph, eccentricity function, center, radius, diameter, linear-time algorithm
1 Introduction
The eccentricity e(v) of a vertex v is the length of a longest shortest path from v to any other vertex.
In a distance-hereditary graph G, the length of any induced path between two vertices equals their distance in G [16].
The diameter diam(G) (maximum eccentricity) and radius rad(G) (minimum eccentricity) of distance-hereditary graphs have been extensively studied. A close relationship between diameter and radius was discovered in [9, 24], where it was shown that diam(G)≥2rad(G)−2.
It was shown in [9] that with two sweeps of a Breadth-First Search (BFS) one can obtain a value that is very close to the diameter. In fact, any vertex v that is furthest from an arbitrary vertex u has eccentricity e(v)≥diam(G)−2.
Later, Feodor Dragan and Falk Nicolai [14] showed that by using instead LexBFS (Lexicographic Breadth-First Search) one can get a vertex v (last visited by a LexBFS starting at any vertex u) with e(v)≥diam(G)−1,
and additionally if e(v) is even, then e(v) exactly realizes the diameter of G.
This yielded a linear time algorithm to compute the diameter as well as a diametral pair of vertices [9, 14], i.e., a pair x,y such that d(x,y)=diam(G).
There is also a linear time algorithm to find a central vertex (a vertex with minimum eccentricity) and calculate the radius [9].
These results were very recently generalized in [5]; it follows from [5] that all vertex eccentricities of a distance-hereditary graph G can be computed in total linear time via a split decomposition of G.
Here, we establish further properties of the eccentricity function in distance-hereditary graphs.
Understanding the eccentricity function and being able to efficiently compute the diameter, radius, and all vertex eccentricities is of great importance.
For example, in the analysis of social networks
(e.g., citation networks or recommendation networks), biological systems (e.g., protein interaction networks),
computer networks (e.g., the Internet or peer-to-peer networks), transportation networks (e.g., public transportation
or road networks), etc., the eccentricity eG(v) of a vertex v is used to measure the importance of v in the network:
the eccentricity centrality index of v [18] is defined as eG(v)1.
A graph’s eccentricity function is unimodal
if every non-central vertex v has an adjacent vertex u with e(u)<e(v).
The unimodality of the eccentricity function has been studied in a variety of graph classes;
for example, it is exactly unimodal in Helly graphs [8]
and almost unimodal in (α1,Δ)-metric graphs [13] (that includes all chordal graphs) and in hyperbolic graphs [1].
In particular, it was shown [13] that in a chordal graph G the unimodality of the eccentricity function can break for a (non-central) vertex v, i.e., all neighbors w of v
satisfy e(w)≥e(v), only
under very specific conditions: that diam(G)=2rad(G), that e(v)=rad(G)+1, and that v is at distance 2 from a central vertex.
We show in the main theorem of Section 3 that the same conditions hold for vertices of distance-hereditary graphs. This result, which is of independent interest, is a crucial intermediate step to establish the remaining results of this paper.
The center C(G) (all vertices of G with minimum eccentricity and the graph induced by those vertices) of a distance-hereditary graph G is also of interest.
Many graph classes have a well defined center.
The center of a tree is either K1 or K2 [17],
the center of a maximal outerplanar graph is one of seven special graphs [22],
and more generally all possible centers of 2-trees are known [21].
Graph centers have also been characterized fully for chordal graphs [3].
In distance-hereditary graphs it is known [24] that the diameter of the center is no more than 3.
This was later improved by Hong-Gwa Yeh and Gerard Chang [23] that either diam(C(G))=3 and C(G) is connected or C(G) is a cograph (which may not be connected), i.e., a P4-free graph. Furthermore, any cograph is the center of some distance-hereditary graph.
We complete the characterization of centers of distance-herediatary graphs by investigating the instance that C(G) is not a cograph (i.e., diam(C(G))=3),
in which case C(G) takes the form of a graph H which is further described in Section 6,
and moreover each such H is the center of some distance-hereditary graph.
Finally, we obtain several bounds on the eccentricity of an arbitrary vertex v with respect to its distance to a mutually distant pair and also its distance to the center C(G).
A simple dynamic programming algorithm is also presented which computes all eccentricities in a distance-hereditary graph in total linear time by utilizing a pruning sequence which is a characteristic property of distance-hereditary graphs.
The main contributions of this paper are summarized as follows.
We show that the eccentricity function in distance-hereditary graphs is almost unimodal: for every vertex v∈/C(G) there is a neighbor w such that e(w)<e(v) or diam(G)=2rad(G), e(v)=rad(G)+1, and d(v,C(G))=2. We present several consequences of this result for obtaining the eccentricity of a vertex in a distance-hereditary graph G.
We propose certificates for the diameter, the radius and all eccentricities and show that the eccentricity of any vertex is closely bounded by its distances to just two mutually distant vertices.
We fully characterize the centers of distance-hereditary graphs. The center of a distance-hereditary graph G is either a cograph or takes the form of a graph H described in Section 6. Moreover, every cograph and each such H is the center of some distance-hereditary graph.
We present a new linear time algorithm to compute all eccentricities in a distance-hereditary graph.
2 Preliminaries
Let G=(V,E) be an undirected, simple (without loops or parallel edges), connected graph. Let n=∣V∣ and m=∣E∣.
A path P(v0,vk) is a sequence of vertices v0,...,vk such that vivi+1∈E for all i∈[0,k−1]; its length is k.
A graph G is connected if there is a path between every pair of vertices.
Let dG(x,y) be the distance between two vertices x and y in G, that is, the length of a shortest path from x to y.
A subgraph H of a graph G is called isometric if the distance in H between any of its two vertices equals their distance in G. By G−{x} we denote an induced subgraph of G obtained from G by removing a vertex x∈V.
The eccentricity eG(v) of a vertex v is the maximum distance from v to any vertex.
The subindex is omitted if G is known by context.
The diameter (diam(G)) and radius (rad(G)) of a graph G is the maximum and minimum eccentricity of a vertex, respectively.
The center is the set of vertices whose eccentricities are minimum: C(G)={v∈V:e(v)=rad(G)}. It will be convenient to denote by C(G) also the subgraph of G induced by set C(G).
We define Ck(G)={v∈V:e(v)≤rad(G)+k}.
We denote the set of furthest vertices from v as F(v)={u∈V:d(u,v)=e(v)}.
Vertices x,y are considered to be mutually distant if x∈F(y) and y∈F(x); they are called a pair of mutually distant vertices. A pair {x,y} is called a diametral pair if d(x,y)=diam(G).
The interval I(x,y)={v∈V:d(x,v)+d(v,y)=d(x,y)} is the set of all vertices that are on shortest paths between x and y.
An interval slice is defined as Sk(x,y)={v∈I(x,y):d(x,v)=k} for some non-negative integer k.
We denote by <S> the subgraph of G induced by the vertices S⊂V. Let also d(v,S)=min{d(v,u):u∈S} and diam(S)=max{dG(x,y):x,y∈S}.
The neighborhood of v consists of all vertices adjacent to v, denoted by N(v),
and the closed neighborhood of v is defined as N[v]=N(v)∪{v}.
The kth neighborhood of a vertex v is the set of all vertices of distance k to v, that is, Nk(v)={u∈V:d(u,v)=k}.
Whereas a disk of radius k centered at a set S (or a vertex) is the set of vertices of distance at most k to some vertex of S, that is, D(S,k)={u∈V:d(u,S)≤k}.
A vertex v is said to be universal to a set S if N(v)⊇S. Let V={v1,...,vn}.
For an n-tuple of non-negative integers (r(v1),...,r(vn)),
a subset M⊆V is an r-dominating set for a set S⊆V in G if and only if for every v∈S there is a vertex u∈M with d(u,v)≤r(v). We also say that M r-dominates S in G.
If r(vi)=1 for all i, then we say that M dominates S in G.
If S=V then we say that M r-dominates G.
Two vertex sets A and B of G are said to be joined if each vertex of A is adjacent to every vertex of B.
A vertex is pendant if ∣N(v)∣=1.
Two vertices v and u are twins if they have the same neighborhood or the same closed neighborhood.
True twins are adjacent; false twins are not.
A graph is distance-hereditary if and only if each of its connected induced subgraphs is isometric [16], that is,
the length of any induced path between two vertices equals their distance in G.
These graphs are also characterized by a pruning sequence [2]: they can be dismantled by repeatedly removing either a pendant vertex or one vertex from a pair of twin vertices.
The following propositions provide basic information on distance-hereditary graphs necessary for the next sections.
Proposition 1**.**
[2, 7]**
For a graph G, the following conditions are equivalent:
- (i)
G* is distance-hereditary;*
2. (ii)
The house, domino, gem, and the cycles Ck of length k≥5 are not induced subgraphs of G (see Figure 1);
3. (iii)
For an arbitrary vertex x of G and every pair of vertices v,u∈Nk(x), that are connected in the same component of the graph <V∖Nk−1(x)>,
we have N(v)∩Nk−1(x)=N(u)∩Nk−1(x);
4. (iv)
(4-point condition) For any four vertices u,v,w,x of G at least two of the following distance sums are equal: d(u,v)+d(w,x), d(u,w)+d(v,x), and d(u,x)+d(w,v).
If the smaller sums are equal, then the largest one exceeds the smaller ones by at most 2.
5. (v)
G* can be reduced to one vertex graph by a pruning sequence of one-vertex deletions: removing a pendant vertex or a single vertex from a pair of twin vertices.*
Proposition 2**.**
[9]**
Let G be a distance-hereditary graph with n-tuple (r(v1),...,r(vn)) of non-negative integers and M⊆V.
If every vertex pair u,v∈M satisfies d(u,v)≤r(u)+r(v)+1 then M has an r-dominating clique C.
If every vertex pair u,v∈M satisfies d(u,v)≤r(u)+r(v) then there exists either a single vertex or a pair of adjacent vertices which r-dominates M.
Proposition 3**.**
[9*]**
For every vertex v of a distance-hereditary graph G, a furthest from v vertex u∈F(v) satisfies e(u)≥2rad(G)−3.
*
Proposition 4**.**
Let G be a distance-hereditary graph and x,y∈V.
Any vertex v∈Sk(x,y) has Sk+1(x,y)⊆N(v), i.e., neighboring interval slices are joined.
Proof.
Consider a vertex u∈Sk+1(x,y)∩N(v) and any other vertex w∈Sk+1(x,y).
Then u and w are connected in <V∖Nk+1(x)> via shortest paths P(u,y) and P(w,y). By Proposition 1(iii), they share neighboring vertices in Sk(x,y). Hence, w∈N(v).
∎
Unless otherwise stated, the graph G is assumed to be distance-hereditary in all subsequent results.
3 Unimodality of the eccentricity function
Recall that the eccentricity function is unimodal in G if every non-central vertex v of G has a neighbor u such that e(u)<e(v).
Our main result of this section is that in distance-hereditary graphs any vertex with sufficiently large eccentricity does have a neighbor with strictly smaller eccentricity.
Unimodality can break only at vertices with eccentricity equal to rad(G)+1, but those vertices are close (within 2) to the center C(G).
Moreover, this can only occur when diam(G)=2rad(G).
This property of the eccentricity function of distance-hereditary graphs aligns with known results for other graph classes, such as chordal graphs and the underlying graphs of 7-systolic complexes [13].
Our proof will be based on the following two lemmas.
Lemma 1**.**
If a vertex x of G has e(x)=rad(G)+1, then d(x,C(G))≤2.
Proof.
Let c be a central vertex closest to x.
Consider any vertex v∈S1(c,x) and vertex u∈F(v) furthest from v.
As v is not central, d(v,u)=rad(G)+1 and, by distance requirements, d(c,u)=e(c)=rad(G).
Hence, u∈F(c)∩F(v).
First we claim that d(c,x)≤3.
Since c∈I(v,u) and v∈I(c,x), we have d(u,v)+d(c,x)=d(u,c)+d(v,x)+2.
Consider the 4-point condition on vertices u,x,v,c.
As two distance sums must be equal, then either d(u,x)+d(c,v)=d(u,v)+d(c,x) or d(u,x)+d(c,v)=d(u,c)+d(v,x).
We have d(u,x)+d(c,v)≤e(x)+1=rad(G)+2.
In the first case we get d(u,x)+d(c,v)=d(u,v)+d(c,x)=d(u,c)+d(v,x)+2=rad(G)+d(v,x)+2. Hence, d(v,x)≤0 and, by the triangle inequality, d(x,C(G))≤1.
In the second case we get d(u,x)+d(c,v)=d(u,c)+d(v,x)=rad(G)+d(v,x). Hence, d(v,x)≤2 and, by the triangle inequality, d(x,C(G))≤3, establishing the claim.
Assume now that d(c,x)=3 and consider y∈S1(v,x).
We next claim that e(y)=rad(G)+1.
By the choice of c, vertex y is non-central and so e(y)≥rad(G)+1.
Since y∈N(v)∩N(x) with e(v)=e(x)=rad(G)+1, by distance requirements, e(y)≤rad(G)+2.
By way of contradiction assume that e(y)=rad(G)+2.
Consider a furthest vertex y∗∈F(y).
By distance requirements, d(v,y∗)=d(x,y∗)=rad(G)+1 and d(c,y∗)=rad(G).
Since there is a (v,x)-path via vertex y in <V∖Nrad(G)(y∗)>, by Proposition 1(iii), the neighbors of v and x in Nrad(G)(y∗) are shared.
Therefore, cx∈E, contradicting with d(c,x)=3. Thus, e(y)=rad(G)+1 must hold.
We now obtain a general contradiction in two steps. Recall that e(y)=e(v)=e(x)=rad(G)+1 and e(c)=rad(G).
First, consider the 4-point condition on vertices y,y∗,c,v.
Consider three sums: d(y,y∗)+d(c,v)=rad(G)+2, d(y∗,c)+d(y,v)≤rad(G)+1, and d(y∗,v)+d(c,y)≤rad(G)+3.
Clearly, the first and the second sums are not equal.
If the second and the third sums are equal, then d(y∗,v)=d(y∗,c)+d(y,v)−d(c,y)≤rad(G)−1, contradicting with d(y∗,y)=rad(G)+1.
Therefore, the first and the third sums are equal.
Then d(y∗,v)=d(y,y∗)+d(c,v)−d(c,y)=rad(G). Let P(y∗,v) be any shortest path between y∗ and v. Its length is rad(G). Consider also the path Q=P(y∗,v),y,x (extension of P(y∗,v) that includes also y and x). In distance-hereditary graphs, every induced path is a shortest path. As d(x,y∗)≤e(x)=rad(G)+1, Q cannot be induced. As d(y,y∗)=rad(G)+1, vertex x must be adjacent to some vertex on P(y∗,v). To avoid large induced cycles Ck of length k≥5, x must be adjacent to a vertex z∈P(y∗,v) which is a neighbor of v.
Thus, d(y∗,x)=rad(G).
Necessarily, zc∈/E since d(x,c)=3.
We also have that d(y∗,c)≤e(c)=rad(G).
Next, consider the 4-point condition on vertices y∗,c,x,v.
We have d(y∗,c)+d(x,v)≤rad(G)+2, d(y∗,v)+d(c,x)=rad(G)+3, and d(y∗,x)+d(c,v)=rad(G)+1.
Since at least two sums must be equal, necessarily d(y∗,c)=d(y∗,x)+d(c,v)−d(x,v)=rad(G)−1.
Now all distances from y∗ are known.
We have d(c,y∗)=d(z,y∗)=rad(G)−1, d(v,y∗)=d(x,y∗)=rad(G), and d(y,y∗)=rad(G)+1.
Since there is a (v,x)-path in <V∖Nrad(G)−1(y∗)>, by Proposition 1(iii), the neighbors of v and x in Nrad(G)−1(y∗) are shared.
Therefore, vertices x and c must be adjacent, contradicting with d(x,c)=3.
Obtained contradiction proves the lemma.
∎
Lemma 2**.**
If there is a non-central vertex v of G such that each vertex w∈N(v) has e(w)≥e(v),
then e(v)=rad(G)+1 and diam(G)=2rad(G).
Proof.
Consider a vertex u∈F(v), a vertex x∈S1(v,u) with minimal ∣F(x)∣, and let y∈F(x).
By assumption, e(x)≥e(v) and v is non-central.
If d(v,y)=d(x,y)+1, then e(v)≥d(v,y)=d(x,y)+1=e(x)+1≥e(v)+1, a contradiction.
Thus, d(x,y)−1≤d(v,y)≤d(x,y).
Consider the 4-point condition on vertices u,v,x,y.
We have d(u,v)+d(x,y)=e(v)+e(x)≥2rad(G)+2, d(u,y)+d(x,v)≤2rad(G)+1, and d(u,x)+d(v,y)=e(v)−1+d(v,y)≤e(v)+e(x)−1.
Since two sums must be equal, necessarily d(u,y)+d(x,v)=d(u,x)+d(v,y).
Hence 2rad(G)+1≥d(u,y)+d(x,v)=d(u,x)+d(v,y)≥(e(v)−1)+(e(x)−1)≥2e(v)−2≥2rad(G).
Therefore, 2rad(G)≥d(u,y)≥2rad(G)−1 and e(v)≤rad(G)+3/2.
Since eccentricity is an integer and v is non-central, e(v)=rad(G)+1 must hold.
It remains only to show that diam(G)=2rad(G).
If d(u,y)=2rad(G), we are done. So, assume that d(u,y)=2rad(G)−1.
We get d(y,v)=d(u,y)+d(x,v)−d(u,x)=rad(G), and so e(x)=rad(G)+1. Furthermore, v∈I(x,y).
The length of path Q=P(u,v)∪P(v,y) (the concatenation of P(u,v) with P(v,y)) is 2rad(G)+1. As d(u,y)=2rad(G)−1, Q is not an induced path. Hence, there are vertices s∈P(v,u) and w∈P(v,y) such that sw∈E.
To avoid large induced cycles Ck of length k≥5, necessarily s∈S1(x,u) and w∈S1(v,y) must hold.
Then, w belongs to S1(v,u) as well as x. Since y∈F(x)∖F(w) (note that e(w)≥e(v)=rad(G)+1 by assumption),
by minimality of ∣F(x)∣, there is a vertex t∈F(w)∖F(x).
Hence, d(t,x)<rad(G)+1 and d(t,w)=e(w)≥rad(G)+1.
Now consider the 4-point condition on vertices x,y,w,t.
We have d(x,y)+d(w,t)=e(x)+e(w)≥2rad(G)+2, whereas d(t,y)+d(w,x)≤2rad(G)+2 and d(x,t)+d(w,y)≤2rad(G)−1.
As d(x,y)+d(w,t)−d(x,t)−d(w,y)≥3, then only the two largest sums are equal: d(x,y)+d(w,t)=d(t,y)+d(w,x).
Hence, diam(G)≥d(t,y)=d(x,y)+d(w,t)−d(w,x)≥2rad(G).
That is, diam(G)=d(t,y)=2rad(G). ∎
We are ready to prove the main result of this section.
Theorem 1**.**
Every vertex v∈/C(G) either has an adjacent vertex w with e(w)<e(v) or
e(v)=rad(G)+1, diam(G)=2rad(G), and d(v,C(G))=2.
Proof.
If a non-central vertex v has no neighbors with smaller eccentricity then d(v,C(G))>1 and, by Lemma 2, e(v)=rad(G)+1 and diam(G)=2rad(G). Thus, by Lemma 1, d(v,C(G))=2. ∎
4 Certificates for eccentricities
We obtain as a consequence of Theorem 1 several new results for distance-hereditary graphs on
lower and upper certificates for eccentricities, which were introduced in [12]
as a way to compute exactly or approximately eccentricities in a graph by maintaining upper and lower bounds.
A set L (set U) of vertices is a lower certificate (respectively, an upper certificate) for eccentricities of G if it is used to obtain lower bounds (respectively, upper bounds) of eccentricities in G.
Given all distances from a vertex v to all vertices in L∪U as well as the eccentricities of vertices in U, we have
the following lower and upper bounds for the eccentricity of any vertex v [12]:
[TABLE]
A lower certificate L (an upper certificate U) is said to be tight if eL(v)=e(v) (eU(v)=e(v), respectively) for all v∈V.
A diameter certificate is a set U such that eU(v)≤diam(G) for all v∈V,
and therefore the diameter is realized by maxv∈VeU(v).
A radius certificate is a set L such that eL(v)≥rad(G) for all v∈V,
and therefore the radius is realized by minv∈VeL(v).
In what follows, we define the set of all diametral vertices of G as D(G)={v∈V:e(v)=diam(G)}.
In this section we show that all eccentricities can exactly be determined in distance-hereditary graphs by
computing distances from vertices of C1(G) to all vertices, since C1(G) forms a tight upper certificate.
We also show that in distance-hereditary graphs the set C(G) is a diameter certificate
and the set D(G) is a radius certificate (a kind of duality between C(G) and D(G)).
This agrees with radius and diameter certificates in chordal graphs [12]
but, as we show later, this does not hold for arbitrary graphs.
We use the following corollary to Theorem 1.
Corollary 1**.**
Let G be a distance-hereditary graph.
- (i)
If diam(G)<2rad(G) then, for every pair of vertices v∈V and u∈F(v), there is a vertex w∈I(v,u)∩C(G) such that u∈F(w).
2. (ii)
For every pair of vertices v∈V∖C(G) and u∈F(v),
there is a vertex w∈I(v,u)∩C1(G) such that u∈F(w).
Proof.
Consider any vertex v∈V and u∈F(v) and proceed by induction on k:=e(v).
If k=rad(G), then w=v and we are done.
If k=rad(G)+1 and diam(G)=2rad(G) then again w=v and we are done.
If k>rad(G)+1 or k=rad(G)+1 and diam(G)<2rad(G)
then, by Theorem 1, a neighbor z of v with e(z)=k−1
satisfies u∈F(z), and we can apply the induction hypothesis.
∎
Lemma 3**.**
The set C1(G) is a tight upper certificate for all eccentricities of G.
Proof.
The statement follows from Corollary 1 and the definition of a tight upper certificate.
∎
Lemma 4**.**
The center C(G) is a diameter certificate of G.
Proof.
This is clear by Corollary 1 if diam(G)<2rad(G).
Additionally, in any graph G with diam(G)=2rad(G) all central vertices c∈C(G) and every diametral pair of vertices x,y
satisfy d(x,y)=d(x,c)+d(c,y)=d(x,c)+rad(G)=rad(G)+d(y,c)=2rad(G).
∎
Lemma 5**.**
The set D(G) is a radius certificate of G.
Proof.
We first show that D(G) is a radius certificate for any graph G if diam(G)≥2rad(G)−1.
If D(G) is not a radius certificate,
then there is a vertex u∈V such that maxv∈D(G)d(u,v)<rad(G).
Thus, for any diametral pair x,y, d(x,y)≤d(x,u)+d(u,y)≤(rad(G)−1)+(rad(G)−1)=2rad(G)−2, a contradiction with d(x,y)=diam(G)≥2rad(G)−1.
As in a distance-hereditary G, diam(G)≥2rad(G)−2 holds [9, 24], it remains to consider only the case when diam(G)=2rad(G)−2.
Let S be the set of vertices u such that d(u,t)≤rad(G)−1 for all t∈D(G).
By contradiction assume D(G) is not a radius certificate and therefore S is not empty.
Let u∈S be a vertex which minimizes ∣F(u)∣.
Consider any diametral pair x,y and furthest from u vertex v∈F(u).
Necessarily v∈/D(G) by the choice of u.
Since d(x,y)=2rad(G)−2, d(u,x)≤rad(G)−1 and d(u,y)≤rad(G)−1, clearly d(u,x)=d(u,y)=rad(G)−1.
Consider the 4-point condition on vertices v,u,x,y.
We have that the largest distance sum is d(v,u)+d(x,y)=d(v,u)+2rad(G)−2≥3rad(G)−2,
given that d(v,x)+d(u,y)≤d(x,y)−1+rad(G)−1=3rad(G)−4
and that d(v,y)+d(u,x)≤d(x,y)−1+rad(G)−1=3rad(G)−4.
Therefore, the smaller sums are equal, establishing d(v,x)=d(v,y).
Moreover, since the difference between the largest sum and the other sums is at most 2, we get d(v,u)=rad(G) and d(v,x)=d(v,y)=2rad(G)−3. So, u∈C(G).
We claim that there is a vertex w such that d(w,x)=rad(G)−1, d(w,y)=rad(G)−1 and v∈/F(w).
Fix arbitrary shortest path P(x,u), P(y,u) and P(u,v).
Since d(v,x)<d(v,u)+d(u,x)=diam(G)+1, path Q=P(x,u)∪P(u,v) is not induced. Hence, there must exist a chord between shortest path P(x,u) and shortest path P(u,v).
Define vertices t,w∈P(u,v), s,z∈P(x,u), q,p∈P(y,u), as shown in Figure 2.
Since d(v,x)=2rad(G)−3,
we must have the chord zt∈E or the chord sw∈E.
By the same argument, there must exist a chord between shortest path P(y,u) and shortest path P(u,v)
which is realized by chord pt∈E or qw∈E.
We note that if zt∈E then pt∈/E since d(x,y)=2rad(G)−2.
Up to symmetry, we have two cases as shown in Figure 2.
In case (a) we have zt,qw∈E,
and in case (b) we have sw,qw∈E.
In either case vertex w satisfies the desired properties, establishing the claim.
We next claim that there is a vertex w such that d(w,w)≥rad(G) and d(u,w)≤rad(G)−1.
On one hand, if w∈/S then, by definition of S, there exists a vertex w∈D(G) such that d(w,w)≥rad(G) and, by the choice of u∈S, we have d(u,w)≤rad(G)−1.
On the other hand, if w∈S then, by minimality of ∣F(u)∣ and since v∈/F(w), there exists a vertex w∈F(w)∖F(u).
As w∈/F(u), d(u,w)≤rad(G)−1
and, as w∈F(w), d(w,w)≥rad(G), establishing the claim.
Consider now the 4-point condition on vertices v,u,w,w.
Since v∈/D(G) we have d(v,w)+d(w,u)≤2rad(G)−3+2=2rad(G)−1.
We also have d(v,w)+d(w,u)≤rad(G)−2+rad(G)−1=2rad(G)−3
and d(v,u)+d(w,w)≥rad(G)+rad(G)=2rad(G).
Given that d(v,u)+d(w,w) is strictly larger than the other sums, it must differ from them by at most 2.
However, it differs by at least 3, giving a contradiction.
∎
As a consequence of these results, if the set C1(G) of a distance-hereditary graph G is known, then all vertex eccentricities in G can straightforwardly be found by performing a BFS from each vertex of C1(G). Similarly, if the set C(G) (D(G)) is known, then the entire set D(G) (C(G), respectively) of G can be found.
However, as we will discuss in Section 7, there is a more efficient approach to compute all eccentricities of a distance-hereditary graph.
We note that Lemma 4 and Lemma 5 do not hold for general graphs, as illustrated in Figure 3 by a graph G with diam(G)=6 and rad(G)=4.
Here D(G)={x,y} and C(G)={u}, and all other vertices have eccentricity 5.
However, D(G) is not a radius certificate since eD(G)(u)=3<rad(G).
Moreover, C(G) is not a diameter certificate since eC(G)(v)=d(v,u)+e(u)=8>diam(G).
One aims also to minimize the size of a certificate.
In trees, for example, a single diametral pair is a sufficient radius certificate rather than the full set of diametral vertices.
Unfortunately this is not true for distance-hereditary graphs.
The graph G in Figure 4 illustrates that every diametral vertex is necessary to establish a radius certificate. Graph G consists of a clique of vertices {u1,...,uℓ} and a clique of vertices {v1,...,vℓ},
where each ui is adjacent to all vertices vj=i, and each ui and vi has a pendant vertex xi and yi, respectively.
G is distance-hereditary as it can be dismantled via a sequence of pendant and twin vertex eliminations. All vertices xi and yi are pendant,
each ui vertex is a false twin to vi,
and the remaining vi vertices are true twins (as they form a clique in the remaining graph).
Here D(G) consists of all xi and yi vertices and C(G) consists of all ui and vi vertices,
where diam(G)=d(xi,yi)=4 and rad(G)=d(vi,xi)=d(ui,yi)=3.
However, any xi∈D(G) has a vertex vi such that d(vi,t)<rad(G) for all t∈D(G)∖{xi}.
By symmetry, the same is true for yi and its counterpart ui.
Hence, all vertices of D(G) are necessary to form a radius certificate.
One can also show that all vertices of C(G) are necessary to form a diameter certificate.
5 Eccentricities, mutually distant pairs and distances to the center
In this section, we show that the eccentricity of any vertex of a distance-hereditary graph is bounded by its distances to just two
mutually distant vertices. Furthermore, the distance between any two mutually distant vertices is bounded by their distances to an arbitrary peripheral vertex (a vertex which is furthest for some other vertex).
The unimodality behavior of the eccentricity function described in Theorem 1 gives also a relation between the eccentricity of a vertex
and its distance to C1(G).
Lemma 6**.**
Let x,y be a mutually distant pair of G,
and let u∈V and v∈F(u) be a furthest vertex from u.
Let also α:=d(u,x) and β:=d(u,y).
Then,
[TABLE]
Moreover, if e(u)=max{α,β}+2, then α=β=e(u)−2 and d(v,x)=d(v,y)=d(x,y).
Proof.
Let v∈F(u). By the choice of v, we have e(u)=d(u,v)≥max{d(u,x),d(u,y)}.
Consider the 4-point condition on vertices u,v,x,y.
As x,y is a mutually distant pair, we have for the three distance sums that d(u,v)+d(x,y)=e(u)+d(x,y), d(u,x)+d(v,y)≤d(u,x)+d(x,y)≤e(u)+d(x,y),
and d(u,y)+d(v,x)≤d(u,y)+d(x,y)≤e(u)+d(x,y).
Clearly the first sum is largest.
We first consider the case when the first sum equals one of the latter.
Suppose that d(u,v)+d(x,y)=d(u,x)+d(v,y).
Then, e(u)+d(x,y)=d(u,x)+d(v,y)≤e(u)+d(x,y).
Hence, e(u)=d(u,x)=max{d(u,x),d(u,y)}. Suppose now that d(u,v)+d(x,y)=d(u,y)+d(v,x).
Then, e(u)+d(x,y)=d(u,y)+d(v,x)≤e(u)+d(x,y).
Hence, e(u)=d(u,y)=max{d(u,x),d(u,y)}. In either case, e(u)=max{d(u,x),d(u,y)}.
We next consider the case when the two smaller sums are equal and differ from the largest one by at most 2.
We have e(u)=d(u,v)≤d(v,y)+d(u,x)−d(x,y)+2=d(v,x)+d(u,y)−d(x,y)+2.
Since d(x,y) is not smaller than d(v,y) and d(v,x), we obtain e(u)≤d(u,x)+2 and
e(u)≤d(u,y)+2, i.e., e(u)≤min{d(u,x),d(u,y)}+2.
Moreover, if e(u)=max{d(u,x),d(u,y)}+2, we must be in the latter case when the two smaller sums are equal (otherwise, e(u)=max{d(u,x),d(u,y)} as shown previously),
and so d(u,v)=e(u)=min{d(u,x),d(u,y)}+2.
Hence, d(u,x)=d(u,y)=d(u,v)−2 and, since d(u,x)+d(v,y)=d(u,y)+d(x,v), d(v,y)=d(x,v) holds too.
Combining this with the fact that d(u,v)+d(x,y)−d(u,x)−d(y,v)≤2, we obtain d(x,y)≤d(v,y)
and, since x,y are mutually distant, necessarily d(x,y)=d(v,y)=d(x,v), completing the proof.
∎
Lemma 7**.**
Let x,y be a mutually distant pair of G,
and let u∈V and v∈F(u) be a furthest vertex from u. Let also α:=d(v,x) and β:=d(v,y).
Then,
[TABLE]
Moreover, if d(x,y)=max{α,β}+2 then α=β=d(x,y)−2 and d(u,x)=d(u,y)=d(u,v).
Proof.
The proof is analogous to that of Lemma 6 and is omitted. The only difference is that now we argue from the perspective of d(x,y) and not of e(u).
∎
Figure 5(a) illustrates that the upper bounds of Lemma 6 and Lemma 7 are sharp using vertices z and w for two opposing purposes.
First, e(z)=d(z,w)=max{d(x,z),d(y,z)}+2, whereas w∈F(z) has d(x,y)=max{d(x,w),d(y,w)}.
Secondly, e(w)=d(z,w)=max{d(x,w),d(y,w)}, whereas z∈F(w) has d(x,y)=max{d(x,z),d(y,z)}+2.
Recall the implications of Lemma 6 and Lemma 7 which state that
for a mutually distant pair x,y and fixed vertices u∈V and v∈F(u),
if either e(u) or d(x,y) is realized by its upper bound as given in the above inequalities, then the other value is realized by its lower bound.
So, it is not possible to obtain for the same u∈V and v∈F(u) that both e(u)=max{d(x,u),d(y,u)}+2 and d(x,y)=max{d(x,v),d(y,v)}+2 are true
(Figure 5(a) uses a different starting vertex u to illustrate both upper bounds - with u:=z and then with u:=w).
However, we show in Figure 5(b) an example when for fixed vertices u and v∈F(u), both e(u)=max{d(x,u),d(y,u)}+1 and d(x,y)=max{d(x,v),d(y,v)}+1 are true.
In the case when x and y form a diametral pair, Lemma 7 yields a result known from [23]. We have diam(G)=d(x,y)≤max{d(v,x),d(v,y)}+2≤e(v)+2.
Corollary 2**.**
[23]**
If vertex v of G is a furthest vertex from any u∈V, then e(v)≥diam(G)−2.
Corollary 2 can be used to find a pair of mutually distant vertices of a distance-hereditary graph in linear time. Pick an arbitrary start vertex v0. With at most five BFSs find vertices v1,…,vk (2≤k≤5) such that vi∈F(vi−1) and d(vk,vk−1)=d(vk−1,vk−2). Since, by Corollary 2, e(v1)≥diam(G)−2, there are at most two improvements on e(v1) to get a required mutually distant pair vk−1,vk−2.
Now, by Lemma 6, the obtained distances from vk−1 and vk−2 to all vertices u∈V already yield good lower bounds for vertex eccentricities in G (they are within 2 from exact eccentricities).
We next show that, in some cases, they are even closer.
Corollary 3**.**
Let x,y be a mutually distant pair of G and let u∈V.
- (i)
If ∣d(x,u)−d(y,u)∣≥2, then e(u)=max{d(x,u),d(y,u)}.
2. (ii)
If ∣d(x,u)−d(y,u)∣=1 or u∈C(G), then max{d(x,u),d(y,u)}≤e(u)≤max{d(x,u),d(y,u)}+1.
Proof.
By Lemma 6, max{d(x,u),d(y,u)}≤e(u)≤max{max{d(x,u),d(y,u)},min{d(x,u),d(y,u)}+2}. If ∣d(x,u)−d(y,u)∣≥2, then max{d(x,u),d(y,u)}≥min{d(x,u),d(y,u)}+2 and therefore e(u)=max{d(x,u),d(y,u)}.
If ∣d(x,u)−d(y,u)∣=1, then e(u)≤max{d(x,u),d(y,u)}+1.
By contradiction assume now that u∈C(G), d(x,u)=d(y,u) and e(u)=d(x,u)+2.
By Proposition 3, we have d(x,y)=e(x)≥2rad(G)−3.
By the triangle inequality, d(x,y)≤d(x,u)+d(u,y)=2(rad(G)−2)=2rad(G)−4, a contradiction.
∎
In what follows, we analyze deeper the case when d(u,x)=d(u,y). As the graph on Figure 5 showed, in this case,
e(u)=max{d(x,u),d(y,u)}+2 may happen. However, we demonstrate that it happens not very often. First we show that if d(x,y) is odd, then still e(u)≤max{d(x,u),d(y,u)}+1. For this we will need one auxiliary lemma.
Lemma 8**.**
Let u,x,y be vertices of G.
If d(u,x)=d(u,y) and d(x,y)=2k+1 for some integer k,
then all vertices s∈Sk(x,y) satisfy d(u,x)=d(u,s)+k.
Proof.
Let s∈Sk(x,y) and d(u,x)=d(u,y).
necessarily, d(s,y)=k+1.
Consider the 4-point condition on vertices x,y,u,s.
We have d(u,s)+d(x,y)=d(u,s)+2k+1,
d(u,x)+d(s,y)=d(u,x)+k+1,
and d(u,y)+d(x,s)=d(u,x)+k.
Since at least two sums must be equal and the latter two sums are not, we consider the two remaining cases.
If d(u,s)+d(x,y)=d(u,x)+d(s,y), then d(u,x)=d(u,s)+(2k+1)−(k+1)=d(u,s)+k, and we are done.
If d(u,s)+d(x,y)=d(u,y)+d(x,s), then d(u,x)=d(u,y)=d(u,s)+(2k+1)−k=d(u,s)+k+1.
However, by the triangle inequality, d(u,x)≤d(u,s)+d(s,x)=d(u,s)+k, a contradiction.
∎
Next lemma handles the case when d(x,y) is odd.
Lemma 9**.**
Let x,y be a mutually distant pair of G.
If d(x,y) is odd, then any vertex u∈V has e(u)≤max{d(x,u),d(y,u)}+1.
Proof.
Let d(x,y)=2k+1 for some integer k. By contradiction assume that e(u)=max{d(x,u),d(y,u)}+2.
Consider a vertex v∈F(u).
By Lemma 6, when e(u)=max{d(x,u),d(y,u)}+2, we have d(u,x)=d(u,y)=e(u)−2, and d(x,y)=d(x,v)=d(y,v).
Let s∈Sk(x,y).
By Lemma 8 applied to vertex u and to vertex v, we have d(u,x)=d(u,s)+k and d(v,x)=d(v,s)+k.
By the triangle inequality, e(u)=d(u,v)≤d(u,s)+d(s,v)=(d(u,x)−k)+(d(v,x)−k)=d(u,x)+d(v,x)−2k=d(u,x)+d(x,y)−2k=d(u,x)+1, contradicting with e(u)=d(u,x)+2.
∎
The following theorem summarizes the obtained bounds on the eccentricity of any vertex u∈V. The distances from u to a selected pair of vertices is very close to the eccentricity of u, and in some cases, measures it exactly.
Theorem 2**.**
Let x,y be mutually distant vertices of G.
For every vertex u∈V, the following holds:
[TABLE]
As a consequence of Theorem 2, in distance-hereditary graphs, all eccentricities with an additive one-sided error of at most 2 can be computed in linear time. We further investigated the case in which d(x,u)=d(y,u) and d(x,y) is even, but this case proved to be difficult and did not lead to any improvements on the upper bounds for e(u).
We remark that a 2-approximation of eccentricities is known for distance-hereditary graphs.
One common approach to approximating eccentricities in a graph G is via an eccentricity k-approximating spanning tree T [4, 10, 13, 20], i.e., a spanning tree T of G such that eT(v)−eG(v)≤k holds for each vertex v of G.
Note that every additive tree k-spanner (a spanning tree T of G such that dT(x,y)≤dG(x,y)+k holds for every vertex pair x,y) is eccentricity k-approximating.
However, there are graph families which do not admit any additive tree k-spanners and yet they have very good eccentricity approximating spanning trees. The introduction of eccentricity approximating spanning trees is an attempt to weaken the restriction of additive tree spanners and instead closely approximate only distances to most distant vertices, the eccentricities. This is fruitful especially for those graphs for which additive tree k-spanners with small k do not exist. For example, for every k there is a chordal graph without an additive tree k-spanner, though every chordal graph has an eccentricity 2-approximating spanning tree [20, 13] computable in linear time [10].
More generally, all so-called δ-hyperbolic graphs (note that chordal graphs are 1-hyperbolic) have an eccentricity (4δ+1)-approximating spanning tree [4, 11]. As distance-hereditary graphs are also 1-hyperbolic, that general result for δ-hyperbolic graphs implies that all distance-hereditary graphs have an eccentricity 5-approximating spanning tree. In fact, the situation with distance-hereditary graphs is
even simpler. They have additive tree 2-spanners [19] (computable in linear time) and therefore eccentricity 2-approximating spanning trees. Furthermore, in general, the additive error 2 in an eccentricity approximating spanning tree cannot be improved.
A distance-hereditary graph in Figure 6 has no eccentricity 1-approximating spanning tree.
Consider any edge uv of the inner C4 which is not present in T; either eT(u)=eG(u)+2 or eT(v)=eG(v)+2.
So, another approach is needed to efficiently compute all eccentricities in a distance-hereditary graph. In Section 7, we present a new linear time algorithm for that which utilizes a characteristic pruning sequence.
We turn now to a relation between the eccentricity of a vertex
and its distance to C(G) or C1(G).
Lemma 10**.**
Let v∈V be any vertex of an arbitrary graph G and let k be an integer.
If e(v)=d(v,Ck(G))+rad(G)+k, then e(v)=d(v,Ck+1(G))+rad(G)+k+1.
Proof.
Suppose e(v)=d(v,Ck(G))+rad(G)+k and let u∈F(v).
Let c∈Ck(G) be a closest vertex to v in Ck(G).
Consider an adjacent vertex z∈S1(c,v).
By the choice of c, e(z)=rad(G)+k+1 and therefore z∈Ck+1(G).
Then, e(v)=d(v,c)+rad(G)+k=d(v,z)+d(z,c)+rad(G)+k≥d(v,Ck+1(G))+rad(G)+k+1.
By the triangle inequality, also e(c)≤d(v,Ck+1(G))+rad(G)+k+1.
∎
Lemma 11**.**
Let G be a distance-hereditary graph.
- (i)
If diam(G)<2rad(G), then all vertices v∈V satisfy e(v)=d(v,C(G))+rad(G).
2. (ii)
All vertices v∈V∖C(G) satisfy e(v)=d(v,C1(G))+rad(G)+1.
Proof.
The statements follow from Theorem 1 and Lemma 10 (see also Corollary 1).
∎
Lemma 12**.**
*Let v be an arbitrary vertex of G and v′ be an arbitrary vertex of C(G) closest to v.
Then,
d(v,C(G))+rad(G)−1≤e(v)≤d(v,C(G))+rad(G).
Furthermore, all shortest paths P:=(v′=x0,x1,...,xℓ=v), connecting v with v′, satisfy the following:*
- (a)
if e(v)=d(v,C(G))+rad(G), then e(xi)=d(xi,C(G))+rad(G)=i+rad(G) for each i∈{0,...,ℓ};
2. (b)
if e(v)=d(v,C(G))+rad(G)−1, then e(xi)=d(xi,C(G))−1+rad(G)=i−1+rad(G) for each i∈{3,...,ℓ} and e(x1)=e(x2)=rad(G)+1.
Proof.
Let r:=rad(G).
By the triangle inequality, e(v)≤d(v,C(G))+r.
Let e(v)≥r+1 and w be a vertex of C1(G) closest to v.
By the triangle inequality and Lemma 1, d(v,v′)=d(v,C(G))≤d(v,w)+d(w,C(G))≤d(v,C1(G))+2.
Combining with Lemma 11, one obtains e(v)=d(v,C1(G))+r+1≥d(v,C(G))+r−1.
Consider an arbitrary shortest path P:=(v′=x0,x1,...,xℓ=v) connecting v with v′.
As adjacent vertices can have eccentricities which differ by at most one,
e(v)=d(v,C(G))+r implies e(xi)=d(xi,C(G))+r=i+r for each i∈{0,...,ℓ}.
If e(v)=d(v,C(G))+r−1, there must exist an index i∈{1,...,ℓ−1} such that e(xi)=e(xi+1)=r+i
and e(xj)=r+j for j≤i. We claim that i=1 must hold.
We first establish that i≤2.
By Theorem 1, there is a shortest path Q∗:=(w=u2,...,uρ=v) connecting v to
a vertex w∈C1(G) closest to v, where d(w,C(G))≤2 and e(uk)=r+k−1 for all k∈2,...,ρ.
Let c be a vertex of C(G) closest to w.
We have that d(v,C(G))≤d(v,c)≤d(v,w)+d(w,c)≤e(v)−e(w)+2=(d(v,C(G))+r−1)−(r+1)+2=d(v,C(G)).
Therefore, vertex c is also a closest to v central vertex, d(w,C(G))=2, and ρ=ℓ.
Let now Q:=(c=u0,u1,u2,...,uℓ=v) be a shortest path which joins shortest paths Q∗ and any shortest path connecting u2 to c.
As c is a closest to v central vertex, necessarily e(u1)=e(u2)=r+1.
We claim that central vertices u0 and x0 are connected in <V∖Nd(v,C(G))−1(v)> by respective paths to a vertex t∈F(v).
Let u∗∈I(u0,t), u∗=u0. We have d(u0,t)≥d(u∗,t)+1.
Assume that d(u∗,v)≤d(v,C(G))−1.
Then, e(v)=d(v,t)≤d(v,u∗)+d(u∗,t)≤(d(v,C(G))−1)+(d(u0,t)−1)≤d(v,C(G))+r−2, a contradiction with e(v)=d(v,C(G))+r−1.
Therefore, any vertex u∗ on a shortest (u0,t)-path satisfies d(v,u∗)≥d(v,C(G)) and,
by symmetry, any vertex x∗ on a shortest (x0,t)-path also satisfies d(v,x∗)≥d(v,C(G)).
The combined paths connect vertices u0 and x0 in <V∖Nd(v,C(G))−1(v)>.
As a result, for each k∈{0,...,ℓ−1}, vertices uk and xk are connected in <V∖Nd(v,C(G))−k−1(v)>.
Then, by Proposition 1(iii), ukxk+1∈E and uk+1xk∈E.
In particular, u2x3∈E, u2x1∈E, u1x2∈E, and x0u1∈E.
Recall that e(u2)=r+1.
If i≥3, then e(x3)=r+3; however, e(x3)≤1+e(u2)=r+2, a contradiction.
Assume now that i=2.
Hence, e(x2)=e(x3)=r+2. Recall that e(u2)=e(u1)=e(x1)=r+1 and e(x0)=r.
Let z∈F(x2); then z is also furthest from vertices u1, x1, and x0.
Denote by Z a shortest path connecting x0 and z, and let z0∈Z be the vertex adjacent to x0.
By distance requirements from each vertex x2, x1, and u1 to furthest vertex z, necessarily z0x2∈/E, z0x1∈/E, and u1z0∈/E.
Since d(x3,x0)=3, z0x3∈/E.
As d(u2,z)≤e(u2)=r+1, the path obtained by joining shortest paths Z and (x0,u1,u2) by their common end-vertex x0 is not induced.
The only possible chord is u2z0.
As u2 and x2 are connected in <V∖N(x0)>, by Proposition 1(iii), z0x2∈E, a contradiction.
∎
Lemma 11 and Lemma 12 establish a close relationship between the eccentricity of a vertex and its distance to a closest vertex of C(G) or of C1(G).
We now use the following section to fully describe the structure of centers of distance-hereditary graphs.
6 Centers of distance-hereditary graphs
In this section, we investigate the structure of centers of distance-hereditary graphs and provide their full characterization.
A subset S⊆V is called m3-convex if and only if S contains every induced path of length at least three between vertices of S.
It is known from [15] that the centers of HHD-free graphs are m3-convex. As every distance-hereditary graph is HHD-free, the centers of distance-hereditary graphs are m3-convex, too.
It is also known from [23] that C(G) is either a cograph or a connected graph with diam(C(G))=3.
As every connected subgraph of a distance-hereditary graph is isometric, when diam(C(G))=3, C(G) is isometric and a distance-hereditary graph. We remark that if the diameter of a set S in a distance-hereditary graph is no more than 2 then, by definition, it induces a cograph (or, equivalently, a distance-hereditary graph of diameter at most 2).
To prove our main result of this section, we will need the following auxiliary lemmas.
Lemma 13**.**
Let x,y be a diametral pair of G, diam(G)=2rad(G),
and S:=Srad(G)(x,y).
Then, S and C(G) are cographs with C(G)⊆S,
any vertex of Srad(G)+1(x,y)∪Srad(G)−1(x,y) is universal to S,
and C1(G)⊆D(S,1).
Proof.
Any central vertex c∈C(G) has d(x,c)≤rad(G) and d(y,c)≤rad(G), therefore, by distance requirements, C(G)⊆S.
By Proposition 4, any vertex w∈Srad(G)+1(x,y)∪Srad(G)−1(x,y) is universal to slice S and therefore universal to C(G).
Moreover, since the diameters of S and C(G) are no more than 2, both are cographs.
Let now c∈C1(G) and by contradiction assume c∈/D(S,1).
Necessarily d(x,c)≤rad(G)+1 and d(y,c)≤rad(G)+1.
If d(x,c)<rad(G) then, by distance requirements, d(y,c)=rad(G)+1 and c∈Srad(G)−1(x,y). By Proposition 4, c∈D(S,1), a contradiction.
If d(x,c)=d(y,c)=rad(G) then c∈S, a contradiction.
Hence, we can assume, without loss of generality, that d(x,c)=rad(G)+1.
Consider vertex u=c on a shortest path P(c,y) closest to x, and let b∈Srad(G)+1(x,y).
Then, d(y,u)≤rad(G) as d(y,c)≤rad(G)+1.
If d(x,u)≥rad(G)+1, then vertices b and c are connected in <V∖Nrad(G)(x)> and therefore, by Proposition 1 (iii), share common neighbors in S. So, c∈D(S,1), a contradiction.
If d(x,u)≤rad(G), then d(x,u)=d(y,u)=d(y,c)−1=rad(G) as d(x,y)=2rad(G). Hence, u∈S∩N(c), a contradiction.
∎
Lemma 14**.**
Let x,y be a diametral pair of G, diam(G)=2rad(G)−1,
and let
A:=Srad(G)−1(x,y) and B:=Srad(G)−1(y,x).
Then, C(G) is a cograph and any edge ab∈E, where a∈A and b∈B, satisfies C(G)⊆D({a,b},1).
Moreover, there is a vertex a∈A∩C(G) and a vertex b∈B∩C(G).
Proof.
By Proposition 4, slices A and B are joined.
Consider any c∈C(G) and edge ab∈E for any vertex pair a∈A and b∈B.
As d(x,y)=2rad(G)−1 and e(c)=rad(G), d(x,c)<rad(G) implies d(x,c)=rad(G)−1 and d(y,c)=rad(G). Hence, c∈A.
By symmetry, if d(y,c)<rad(G) then c∈B.
Assume now that d(x,c)=d(y,c)=rad(G).
Then, b,c∈Nrad(G)(x).
Consider vertex u=c on a shortest path P(c,y) closest to x.
We have d(y,u)≤rad(G)−1 by the choice of u.
If d(x,u)≤rad(G)−1, then d(x,y)≤d(x,u)+d(u,y)≤2rad(G)−2, a contradiction.
Thus, d(x,u)≥rad(G).
Vertices b and c are connected in <V∖Nrad(G)−1(x)> by shortest paths to y. By Proposition 1 (iii),
b and c share neighbors in A.
Therefore, a∈N(c) and, by symmetry, b∈N(c).
Hence, any central vertex either belongs to A∪B or is universal to A∪B.
Thus, C(G)⊆D({a,b},1).
Additionally, since any pair of vertices in C(G) is at most distance 2 apart, C(G) is a cograph.
We now show the existence of vertices a∈A and b∈B such that a,b∈C(G).
Consider the family of disks D(v,r(v)) centered at each vertex v,
where r(v)=1 for all central vertices v∈C(G) and r(v)=rad(G)−1 for all others.
Any two non-central vertices u,v∈V∖C(G) have distance no more than the diameter, therefore d(u,v)≤2rad(G)−1=r(u)+r(v)+1.
Any two central vertices u,v∈C(G) have distance no more than the diameter of the center, therefore d(u,v)≤2=r(u)+r(v).
By definition, any central vertex u∈C(G) sees any vertex v∈V within rad(G), and therefore d(u,v)≤rad(G)=r(u)+r(v).
Hence, by Proposition 2, there is an r-dominating clique K.
As any non-central vertex has distance rad(G)−1 to a vertex of K, we have K⊆C(G).
Let a∈K be closest to x and let b∈K be closest to y.
By distance requirements, ab must be an edge with d(x,a)=rad(G)−1 and d(b,y)=rad(G)−1.
Therefore, a∈A and b∈B.
∎
Corollary 4**.**
If diam(G)≥2rad(G)−1 then C(G) is a cograph.
It remains now to investigate the case when diam(G)=2rad(G)−2.
Lemma 15**.**
Let diam(G)=2rad(G)−2,
and let M⊆C(G).
If all u,v∈M satisfy d(u,v)=2, then there is a vertex c∈C(G) that is universal to M.
Proof.
Consider a disk of radius 1 centered at each s∈M and a disk of radius rad(G)−1 centered at each v∈V∖M.
Any two vertices u,v∈V∖M satisfy d(u,v)≤diam(G)=2rad(G)−2=r(u)+r(v).
Since M⊆C(G), any s∈M and v∈V satisfy d(s,v)≤rad(G)=r(s)+r(v).
By assumption, any two s,t∈M satisfy d(s,t)=2=r(s)+r(t).
By Proposition 2, there is a single vertex or a pair of adjacent vertices r-dominating G.
In the former case, we are done.
Thus, consider the case when there is an r-dominating edge ab∈E.
We have a,b∈C(G) since all vertices v∈V see some end-vertex of edge ab within rad(G)−1.
We claim that at least one end-vertex of edge ab is universal to M.
By contradiction assume there exist vertices u,v∈M which are adjacent to opposite ends of edge ab.
Without loss of generality, let u∈N(a)∖N(b) and v∈N(b)∖N(a).
Since d(u,v)=2, we get in G either an induced C5, or an induced house, or an induced gem. A contradiction obtained proves the lemma.
∎
Lemma 16**.**
Let x,y be a diametral pair of G, diam(G)=2rad(G)−2,
and let
A:=Srad(G)−2(x,y), S:=Srad(G)−1(x,y), and B:=Srad(G)−2(y,x).
Then A∪B∪(S∩C(G))⊆C(G) and there is a vertex c∈S∩C(G).
Moreover, C(G)⊆D(S∩C(G),1).
Proof.
Consider any s∈A. By Lemma 6, e(s)≤max{max{d(s,x),d(s,y)},min{d(s,x),d(s,y)}+2}=d(s,y)=rad(G).
Hence, s∈C(G) and, by symmetry, A∪B⊆C(G).
By contradiction assume there is no central vertex in S.
Let w be a vertex from S minimizing ∣F(w)∣, and let v∈F(w).
Since w∈/C(G), d(w,v)≥rad(G)+1.
Denote by s1∈S1(w,x) and s2∈S1(w,y) two adjacent to w vertices on a shortest path from x to y.
As previously established, both s1 and s2 are central since they belong to A and B, respectively.
Thus, d(s1,v)≤rad(G) and d(s2,v)≤rad(G).
Therefore, d(s1,v)=d(s2,v)=rad(G) and d(w,v)=rad(G)+1.
Since s1,s2∈Nrad(G)(v) and are connected via w in the graph <V∖Nrad(G)−1(v)>, by Proposition 1(iii), there is a vertex t∈Nrad(G)−1(v) adjacent to s1 and s2.
As t∈Srad(G)−1(y,x) and v∈F(w)∖F(t),
by minimality of ∣F(w)∣, there is a vertex u∈F(t)∖F(w).
By our assumption, u∈/C(G), i.e., d(u,t)≥rad(G)+1.
Consider the 4-point condition on vertices t,w,v,u. We have
d(v,u)+d(w,t)=d(v,u)+2,
d(v,t)+d(u,w)≤rad(G)−1+rad(G), and
d(v,w)+d(u,t)≥rad(G)+1+rad(G)+1=2rad(G)+2.
Since the latter two sums differ by more than 2, necessarily, d(v,u)+d(w,t)=d(v,w)+d(u,t).
Hence, d(v,u)=d(v,w)+d(u,t)−d(w,t)≥2rad(G), a contradiction with diam(G)=2rad(G)−2.
Thus, there is a vertex c∈S∩C(G).
Next, we establish an intermediate claim that C(G)⊆D(M,1), where M:=A∪B∪(S∩C(G)).
By contradiction suppose there is a vertex w∈C(G) with w∈/D(M,1).
Consider arbitrary vertices a∈A and b∈B.
Thus, d(a,b)=2, and a,b∈M and, by the choice of w, necessarily d(w,a)≥2 and d(w,b)≥2.
If d(w,a)=d(w,b)=2 then, by Lemma 15 applied to the set {w,a,b}, there is a central vertex u adjacent to w,a,b.
In this case u∈S∩C(G) and therefore u∈M, contradicting with w∈/D(M,1).
Assume now, without loss of generality, that d(w,a)≥3.
Consider the 4-point condition on vertices w,x,y,a.
We have d(x,y)+d(w,a)≥2rad(G)+1 is the largest sum
since d(x,w)+d(y,a)≤2rad(G)
and d(x,a)+d(w,y)≤2rad(G)−2.
Since the smaller two sums must be equal and differ from the larger one by at most two, inequality d(x,y)+d(w,a)≥d(x,a)+d(y,w)+3 gives a contradiction which establishes the claim that C(G)⊆D(M,1).
Finally, we establish that C(G)⊆D(S∩C(G),1).
By contradiction assume there is a central vertex w∈C(G)∖S which is not adjacent to any vertex of S∩C(G).
By the previous claim, w is adjacent to some vertex from A or B.
Without loss of generality, let wa∈E for some vertex a∈A.
Since d(a,y)=rad(G), necessarily, d(w,y)≥rad(G)−1.
If d(w,y)=rad(G)−1 then w∈S, a contradiction.
So, d(w,y)=rad(G) must hold.
Now, vertices w and a are connected in <V∖Nrad(G)−1(y)>.
By Proposition 1 (iii), N(w)∩Nrad(G)−1(y)=N(a)∩Nrad(G)−1(y).
By Proposition 4, also S∩C(G)⊆N(a)∩Nrad(G)−1(y).
Thus, w is universal to S∩C(G), a contradiction.
∎
We are ready to prove the main result of this section.
Theorem 3**.**
*Let H be a subgraph of a distance-hereditary graph G induced by C(G).
Either
(i) H is a cograph, or
(ii) H is a connected distance-hereditary graph with diam(H)=3 and C(H) is a connected cograph with rad(C(H))=2.
Furthermore, any such graph H is the center of some distance-hereditary graph.*
Proof.
If diam(G)≥2rad(G)−1 then, by Lemma 13 and Lemma 14, H is a cograph.
Assume now that diam(G)=2rad(G)−2 and diam(H)=3 (if diam(H)≤2 then, by definition, H is a cograph).
Then, H is a connected distance-hereditary graph [23], and so 2rad(H)−2≤diam(H)≤2rad(H). On one hand, rad(H)≥⌈(diam(H)/2)⌉=2.
On the other hand, rad(H)≤⌊(diam(H)+2)/2⌋=2.
Hence, rad(H)=2.
So, H is a connected distance-hereditary graph with diam(H)=3 and rad(H)=2. Consider the center C(H) of H.
First we show that C(H) is connected.
Let r(u)=1 for each vertex u∈H.
Then, any pair u,v∈H satisfies dH(u,v)≤diam(H)=r(u)+r(v)+1.
By Proposition 2, there is a clique K in H dominating H.
Since each vertex of K is at most distance 2=rad(H) from every vertex of H, K⊆C(H) holds.
Moreover, every two vertices of C(H) are connected through vertices of K⊆C(H), implying that C(H) is connected in H.
In distance-hereditary graphs every connected subgraph is isometric. Hence, C(H) is an isometric subgraph of H. As rad(H)=2, every two vertices of C(H) are at distance at most 2 from each other, implying diam(C(H))=2. Thus, C(H) is a connected cograph with rad(C(H))≤2.
We will show next that rad(C(H))=2, i.e.,
for any c∈C(H) there is a vertex z∈C(H) such that cz∈/E.
Consider a vertex t∈F(c) furthest from c in G. We have dG(c,t)=rad(G).
Let z∈H be a closest vertex to t which is central in G.
Since diam(G)=2rad(G)−2, by Lemma 11, we have dG(t,z)=dG(t,C(G))=eG(t)−rad(G)≤diam(G)−rad(G)=rad(G)−2.
Moreover, vertices z and c are not adjacent since dG(c,t)=rad(G) and dG(t,z)≤rad(G)−2.
But, since c∈C(H), dG(c,z)=dH(c,z)≤2.
Therefore, dH(c,z)=2 and dG(t,z)=rad(G)−2.
We next establish that z belongs to C(H).
By contradiction, assume that there is a vertex u∈H such that dH(z,u)>rad(H)=2.
Then, dH(z,u)=diam(H)=3 and, by the choice of c (c∈C(H)), necessarily dH(c,u)≤2.
Consider the 4-point condition on vertices c,u,z,t.
We have that d(c,t)+d(u,z)=rad(G)+3 is the largest sum
since d(c,z)+d(u,t)≤rad(G)+2
and d(c,u)+d(z,t)≤rad(G).
However, d(c,t)+d(u,z)≥d(c,u)+d(z,t)+3, giving a contradiction since the smaller two sums must be equal and differ from the larger one by at most two.
Hence, z belongs to C(H) showing that every c∈C(H) has a non-adjacent vertex z∈C(H).
Finally, we show that any such graph H is the center of some distance-hereditary graph G. In what follows, we refer to Figure 7 for an illustration.
If H is a cograph, then one can construct a graph G by simply adding to H four new vertices x,x∗,y,y∗. Vertices x and y are universal to H, and vertices x∗,y∗ are pendant to x and y, respectively. Now graph H is the center of G as any vertex u of the cograph H is at most distance 2 to any vertex of G, whereas dG(x,y∗)=3 and dG(y,x∗)=3.
Suppose now that H is a connected distance-hereditary graph with diam(H)=3 and C(H) is a connected cograph with rad(C(H))=2.
One can construct a graph G by adding to H (with C(H)={c1,c2,...,cℓ}) ℓ new vertices x1,x2,...,xℓ such that each xi is pendant to ci∈C(H).
Each ci∈C(H) has dG(ci,u)≤2 for all u∈H.
Since rad(C(H))=2, each ci has a non-adjacent vertex ck∈C(H), and therefore dG(ci,xk)=3.
Any vertex u∈H∖C(H) has a vertex v∈H∖C(H), for which dG(u,v)=3. Furthermore, any such u satisfies dG(u,xi)=dG(u,ci)+1≤3 for each xi.
Since rad(C(H))=2, for any pendant xi, vertex ci has a non-adjacent vertex ck∈C(H) and therefore dG(xi,xk)=4.
Hence, H is the center of G.
∎
7 Computing all eccentricities
Recall that Theorem 2 yields a linear time 2-approximation of all eccentricities. We also used ideas from Section 6 to find in linear time a set S⊆C(G) sufficient for an additive 1-approximation of all eccentricities. However, it proved to be challenging to get exact computation of all eccentricities using that approach. Instead, we found it more fruitful to use a characteristic pruning sequence of G.
We provide in this section a simple linear time algorithm to compute all eccentricities of a distance-hereditary graph G using a weight function and a special pruning sequence produced by processing layers of a breadth-first search tree of G (see [6]).
For a given graph G=(V(G),E(G)) and an n-tuple (p(v1),p(v2),...,p(vn)) of non-negative vertex weights, we define the p-weighted eccentricity of each vertex v∈V(G) as
eG,p(v)=maxu∈V(G){dG(v,u)+p(u)}.
We refer to the set of furthest vertices from a vertex v under weight function p in G
as FG,p(v)={u∈V(G):eG,p(v)=dG(v,u)+p(u)}. Clearly, when p(v)=0 for all v∈V(G), we have eG,p(v)=eG(v) and FG,p(v)=FG(v) agreeing with earlier definitions.
Lemma 17**.**
Let x,y∈V be twins with p(x)≤p(y).
Set G′=G−{x} and p′(v)=p(v) for all v∈V(G′).
Then, eG,p(v)=eG′,p′(v) for all v∈V(G′)∖{y},
eG,p(y)=max{p(x)+dG(x,y),eG′,p′(y)},
and eG,p(x)=max{p(y)+dG(x,y),eG,p(y)}.
Moreover, if FG,p(y)∖{x}=∅, then eG,p(y)=eG′,p′(y).
Proof.
Let v∈V(G′)∖{y}.
As x and y are twins, dG(v,y)=dG(v,x).
Since G′ is isometric in G, dG(v,u)+p(u)=dG′(v,u)+p′(u) for any u∈V(G′).
Then, by definition of eccentricity, eG′,p′(v)=maxu∈V(G′){dG′(v,u)+p′(u)}=maxu∈V(G)∖{x}{dG(v,u)+p(u)}.
As p(x)≤p(y), dG(v,y)+p(y)≥dG(v,x)+p(x).
Thus, eG′,p′(v)=max{dG(v,x)+p(x),maxu∈V(G)∖{x}{dG(v,u)+p(u)}}=maxu∈V(G){dG(v,u)+p(u)}=eG,p(v).
Similarly, eG,p(y)=max{dG(x,y)+p(x),maxu∈V(G′){dG(y,u)+p(u)}}=max{dG(x,y)+p(x),eG′,p′(y)}.
Moreover, if FG,p(y)∖{x}=∅,
then eG,p(y)=eG′,p′(y) as realized by the weighted distance in G′ from y to any v∈FG,p(y)∖{x}.
As d(x,y)≥1 and p(x)≤p(y), dG(x,y)+p(y)≥max{dG(x,y)+p(x),p(y)}.
Again, by definition of eccentricity,
[TABLE]
Lemma 18**.**
Let x be a vertex pendant to y.
Set G′=G−{x},
p′(y)=max{1+p(x),p(y)}, and p′(v)=p(v) for all v∈V(G′)∖{y}.
Then,
eG,p(v)=eG′,p′(v) for all v∈V(G′).
If FG,p(y)∖{x}=∅, then eG,p(x)=max{p(x),eG′,p′(y)+1}.
Proof.
Let v∈V(G′).
As x is pendant to y, dG(v,x)=dG(v,y)+1.
Since G′ is isometric in G, dG′(v,y)+p′(y)=max{dG(v,y)+1+p(x),dG(v,y)+p(y)}=max{dG(v,x)+p(x),dG(v,y)+p(y)}.
Then, by definition of eccentricity,
[TABLE]
Assume now that FG,p(y)∖{x}=∅.
Hence, eG′,p′(y)=eG,p(y)=maxu∈V(G)∖{x}{dG(y,u)+p(u)}.
Thus, by definition of eccentricity,
[TABLE]
We use the pruning sequence (the vertex elimination ordering) σ=(v1,...,vn) that can be constructed in linear time via ρ iterations of a systematic removal of pendants/twins from each layer Lρ,...,L1 of a breadth-first search tree rooted at vn (see [6]).
Iteration k, where k=ρ,...,1, consists of four consecutive steps:
remove any x∈Lk twin to some y∈Lk of the same connected component in Lk (i.e., x and y belong to the same connected component of the subgraph of G induced by vertices of Lk),
remove any x∈Lk pendant to some y∈Lk−1,
remove any x∈Lk−1 twin to some y∈Lk−1 belonging to the same neighborhood N(z)∩Lk−1 of some z∈Lk, and
remove any x∈Lk pendant to some y∈Lk−1.
Note that we move to the next step only when no vertex remains satisfying the condition of the previous step.
At the end of iteration k, all vertices of Lk have been removed (see [6]).
By this ordering, any u∈Lk satisfies that
if u is a pendant to v, then v∈Lk−1, and
if u is a twin to v, then v∈Lk.
Let Gi denote the graph induced by {vi,...,vn} for each i=1,...,n.
Theorem 4**.**
There is a linear time algorithm to compute all eccentricities in a distance-hereditary graph.
Proof.
Let σ=(v1,...,vn) be the pruning sequence constructed as described above by
each iteration k=rad(G),...,1 of removing vertices from layer Lk of a BFS tree rooted at a central vertex vn. Denote by vy∈L2 the first pendant vertex of σ encountered in step (d) of iteration 2 (or in step (b) if L2 becomes empty after steps (a) and (b)). Denote by vz the first vertex of σ encountered in iteration 1.
Thus, the graph Gz consists of vn and some twins/pendants in L1 adjacent to vn.
The algorithm is summarized as follows. We process vertices vi, i<z, from v1 to vz (from left to right along σ).
We denote by pi the weight function of each vertex immediately before vertex vi is processed. For each vertex vj∈σ, set p1(vj)=0.
As each vi is processed, pi+1 is invariant (that is, pi+1(vj)=pi(vj) for every vj) with the exception of one case: if vi is a pendant to vj in Gi, then let pi+1(vj)=max{pi(vi)+1,pi(vj)}.
We can assume that if vi is a twin to vertex vj in Gi, then pi(vi)≤pi(vj), since otherwise, their positions as twins can be swapped in σ.
Observe that
the weight function of a vertex vj∈Lk can only increase when a vertex vi∈Lk+1 is pendant to vj, where i<j.
Hence, if any vertex vi belongs to layer Lk, then for any integer ℓ, pℓ(vi)≤rad(G)−k.
Additionally, every vertex vi and integers ℓ<κ satisfy pℓ(vi)≤pκ(vi).
After all vertices vi, i<z, are processed (along σ from left to right), we next compute all pz-weighted eccentricities in Gz.
Then, we compute all py-weighted eccentricities in Gy.
Finally, we process each vertex vi, i<y, along the reverse direction of σ. The pi+1-weighted eccentricities in Gi+1 are used to obtain the pi-weighted eccentricities in Gi.
Backward phase 1: Compute all pz-weighted eccentricities in Gz.
Denote by V∗ and Ni∗ the vertex lists ordered by decreasing weight pz from the respective vertex sets V(Gz) and N(vi)∩V(Gz) for each vi∈V(Gz).
The lists are ordered in total linear time with a bucket sort.
The first vertex w of Ni∗ has maximum pz(w) among neighbors of vi in Gz, and
the first vertex u of V∗∖Ni∗ has maximum pz(u) among non-neighbors of vi.
By definition, the weighted eccentricity of each vi is eGz,pz(vi)=max{pz(vi),1+pz(w),2+pz(u)}
if there exists a non-neighbor u∈V∗∖Ni∗, and
eGz,pz(vi)=max{pz(vi),1+pz(w)} otherwise.
Backward phase 2: Compute all py-weighted eccentricities in Gy.
By choice of y, each vertex vi for y≤i<z satisfies vi∈L2 and vi is pendant to a vertex vj∈L1 in Gy.
Hence, for M={vz,...,vn} and S={vy,...,vz−1}, maxm∈Mpz(m)=max{maxm∈Mpy(m),maxu∈Spy(u)+1} holds.
Therefore, we may again use ideas from the previous phase.
For each vertex vi, y≤i<z, pendant to vj, we have a vertex w∈N(vj) in Gz with maximum pz(w) among neighbors of vj in Gz and a vertex u∈/N(vj) in Gz with maximum pz(u) among non-neighbors of vj in Gz.
By definition, the weighted eccentricity of each vi is
eGy,py(vi)=max{pi(vi),pi(vj)+1,pz(w)+2,pz(u)+3} if there exists in Gz a non-neighbor u∈/N(vj), and
eGy,py(vi)=max{pi(vi),pz(vj)+1,pz(w)+2} otherwise.
Additionally, by Lemma 18, each vertex vℓ for ℓ≥z has equal pz and py weighted eccentricities, that is, eGy,py(vℓ)=eGz,pz(vℓ).
Backward phase 3: Compute all pi-weighted eccentricities in Gi for i<y along a reverse direction of σ.
If vi is a twin to vj in Gi, by Lemma 17,
eGi,pi(vj)=max{pi(vi)+dG(vi,vj),eGi+1,pi+1(vj)},
eGi,pi(vi)=max{pi(vj)+dG(vi,vj),eGi,pi(vj)},
and for all u∈V(Gi)∖{vi,vj}
eGi,pi(u)=eGi+1,pi+1(u).
We consider now the case that vi is a pendant to vj.
By Lemma 18, each u∈V(Gi)∖{vi} satisfy
eGi,pi(u)=eGi+1,pi+1(u).
We claim that eGi,pi(vi)=max{pi(vi),eGi+1,pi+1(vj)+1}.
It remains only to show that any pendant vi, where i<y, satisfies FGi,pi(vj)∖{vi}=∅; applying Lemma 18 then proves the claim.
By contradiction, let vi∈Lγ pendant to vj∈Lγ−1 be the earliest vertex in σ with i<y and FGi,pi(vj)={vi}.
Hence, eGi,pi(vj)=dGi(vj,vi)+pi(vi)>maxi+1≤t≤n{dGi(vj,vt)+pi(vt)}.
As i<y and vy∈L2, then γ≥2.
Thus, pi(vi)≤rad(G)−2 and eGi,pi(vj)=dG(vj,vi)+pi(vi)≤rad(G)−1.
If eGi,pi(vj)=eG(vj), we obtain a contradiction with eG(vj)≤rad(G)−1.
Therefore, eGi,pi(vj)<eG(vj).
Let vℓ∈σ be the earliest vertex such that eGℓ,pℓ(vj)>eGℓ+1,pℓ+1(vj), where ℓ<i<j.
By Lemma 17 and Lemma 18,
vℓ is a twin to vj in Gℓ such that FGℓ,pℓ(vj)={vℓ} and pℓ(vℓ)≤pℓ(vj).
Then, rad(G)≤eG(vj)=eGℓ,pℓ(vj)=dG(vℓ,vj)+pℓ(vℓ).
Hence, pi(vj)≥pℓ(vj)≥pℓ(vℓ)≥rad(G)−dG(vℓ,vj).
If pi(vj)=rad(G)−1 or if vℓ is a true twin to vj, then pi(vj)≥rad(G)−1, and a contradiction arises with
pi(vj)<dG(vj,vi)+pi(vi)≤rad(G)−1 (recall that FGi,pi(vj)={vi}).
Necessarily, vℓ is a false twin to vj and pi(vj)=rad(G)−2.
As rad(G)−2=pi(vj)<eGi,pi(vj)=dG(vi,vj)+pi(vi)≤1+rad(G)−γ, we obtain γ<3.
Hence, vi∈L2 and vℓ∈L1.
As ℓ<i, necessarily vℓ is removed in iteration 2 step (c) of σ construction.
However, this implies that vi is removed in iteration 2 step (d);
therefore, i≥y, a contradiction that proves the claim.
∎
8 Concluding remarks
We have shown that the eccentricity function in distance-hereditary graphs is almost unimodal. We used this result to fully characterize centers of distance-hereditary graphs and to provide several bounds on the eccentricity of a vertex. Finally, a new linear time algorithm to calculate all eccentricities is presented.
Acknowledgments. We are very grateful to anonymous referees for many useful suggestions and to Guillaume Ducoffe for informing us about the relevant results from [5].