1 Introduction

In this paper, we consider simple and connected graphs. If \(G = (V(G), E(G))\) is a graph and \(u, v \in V(G)\), then the distance \(d_G(u, v)\) between u and v is the number of edges on a shortest uv-path. The eccentricity of a vertex and its total distance are distance properties of central interest in (chemical) graph theory; they are defined as follows. The eccentricity \(\varepsilon _G(v)\) of a vertex v is the distance between v and a farthest vertex from v, and the total distance \(D_G(v)\) of v is the sum of distances between v and the other vertices of G. Even more fundamental property of a vertex in (chemical) graph theory is its degree (or valence in chemistry), denoted by \(\deg _G(v)\). (We may skip the index G in the above notations when G is clear.) Multiplicatively combining two out of these three basic invariants naturally leads to the eccentric connectivity index \(\xi ^c(G)\), the eccentric distance sum \(\xi ^d(G)\), and the degree distance DD(G), defined as follows:

$$\begin{aligned} \xi ^c(G)&= \sum _{v \in V(G)}\varepsilon (v)\deg (v)\,. \\ \xi ^d(G)&= \sum _{v \in V(G)}\varepsilon (v)D(v)\,. \\ DD(G)&= \sum _{v \in V(G)}\deg (v)D(v)\,. \end{aligned}$$

\(\xi ^c\) was introduced by Sharma, Goswami, and Madan [18], \(\xi ^d\) by Gupta, Singh, and Madan [7], and DD by Dobrynin and Kochetova [6] and by Gutman [8]. These three topological indices are well investigated, selected contributions to the eccentric connectivity index are [10, 13, 24], see also [21] for its generalization; to the eccentric distance sum [1, 14, 17, 23]; and to the degree distance [15, 19, 20]. The three invariants were also compared to other invariants, cf. [2,3,4,5, 25]. For information on additional topological indices based on eccentricity, see [16].

In [11], the eccentric distance sum and the degree distance are compared, while in [26] the difference between the eccentric connectivity index and the (not defined here) connective eccentricity index is studied. The primary motivation for the present paper, however, is the papers [12, 28] in which \(\xi ^d(G) - \xi ^c(G)\) was investigated. In [28], Zhang, Li, and Xu, besides other results on the two indices, determined sharp upper and lower bounds on \(\xi ^d(G) - \xi ^c(G)\) for graphs G of given order and diameter 2. Parallel results were also derived for subclasses of diameter 2 graphs with specified one of the minimum degree, the connectivity, the edge-connectivity, and the independence number. Hua, Wang, and Wang [12] extended the last result to general graphs. More precisely, they characterized the graphs that attain the minimum value of \(\xi ^d(G) - \xi ^c(G)\) among all connected graphs G of given independence number. They also proved a related result for connected graphs with given matching number.

In this paper, we continue the investigation along the lines of [12, 28] and proceed as follows. In the rest of this section, definitions and some observations needed are listed. In Section 2, we give a lower and an upper bound on \(\xi ^d(G) - \xi ^c(G)\) and in both cases characterize the equality case. The upper bound involves the Wiener index, the first Zagreb index, as well as the degree distance of G. In Section 3, we focus on trees and first prove that among all trees T with given order and diameter, \(\xi ^d(T)-\xi ^c(T)\) is minimized on caterpillars. Using this result, we give a lower bound on \(\xi ^d(T)-\xi ^c(T)\) for all trees T with given order, the bound being sharp precisely on stars. We also give a sharp upper bound on \(\xi ^d(T)-\xi ^c(T)\) for trees T with given order. In the last section, we give a sharp lower bound and a sharp upper bound on \(\xi ^d(G)+\xi ^c(G)\), compare \(\xi ^d(G)\) with \(\xi ^c(G)\) for graphs G with not too large maximum degree, and give a sharp lower bound on \(\xi ^d(G)\) for graphs G with a given radius.

1.1 Preliminaries

The order and the size of a graph G will be denoted by n(G) and m(G), respectively. The star of order \(n\ge 2\) is denoted by \(S_n\); in other words, \(S_n = K_{1,n-1}\). If \(n\ge 2\), then the cocktail party graph \(CP_{2n}\) is the graph obtained from \(K_{2n}\) by removing a perfect matching. The join \(G\oplus H\) of graphs G and H is the graph obtained from the disjoint union of G and H by connecting by an edge every vertex of G with every vertex of H. The maximum degree of a vertex of G is denoted by \(\Delta (G)\). A graph G is regular if all vertices have the same degree. The first Zagreb index [9] \(M_1(G)\) of G is the sum of the squares of the degrees of the vertices of G. The Wiener index [22] W(G) of G is the sum of distances between all pairs of vertices in G.

The diameter \(\mathrm{diam}(G)\) and the radius \(\mathrm{rad}(G)\) of a graph G are the maximum and the minimum vertex eccentricity in G, respectively. A graph G is self-centered if all vertices have the same eccentricity. It this eccentricity is d, we further say that G is d-self-centered. The eccentricity \(\varepsilon (G)\) of G is

$$\begin{aligned} \varepsilon (G)=\sum _{v \in V(G)}\varepsilon (v)\,. \end{aligned}$$

The eccentric connectivity index of G can be equivalently written as

$$\begin{aligned} \xi ^c(G) = \sum _{uv \in E(G)}(\varepsilon (u) + \varepsilon (v))\,, \end{aligned}$$
(1)

and the eccentric distance sum as

$$\begin{aligned} \xi ^d(G) = \sum _{ \{u,v\}\subseteq V(G)}(\varepsilon (u)+\varepsilon (v))d(u,v)\,. \end{aligned}$$
(2)

Finally, for a positive integer n we use the convention \([n] = \{1,\ldots , n\}\).

2 The Difference on General Graphs

In this section, we give some sharp upper and lower bounds on \(\xi ^d(G) - \xi ^c(G)\) for an arbitrary graph G. The bounds are in terms of the eccentricity, the Wiener index, the first Zagreb index, the degree distance, the maximum degree, the size, and the order of G. To state the result, we recall from [26] the following definitions. Let \(G^*(n, k)\), \(0 \le k \le \lfloor n/2 \rfloor \), be the connected graph of order \(n \ge 4\) obtained from \(K_n\) by deleting k pairwise independent edges. Set further \(G^*(n) = \{G^*(n, k):\ 0 \le k \le \lfloor n/2 \rfloor \}\). We note in passing that the graphs \(G^*(n, k)\), \(1 \le k \le \lfloor n/2 \rfloor \), are named generalized cocktail party graphs in [27]. Then, we recall the following result to be used a couple of times later on.

Lemma 2.1

[26, Lemma 3.1] Let G be a connected graph with \(n(G)\ge 5\). Then, \(\varepsilon (v) = n(G) - \deg (v)\) for any vertex \(v\in V(G)\) if and only if \(G \epsilon G^*(n)\).

Theorem 2.2

If G is a connected graph, then the following hold.

  1. (i)

    \(\xi ^d(G) - \xi ^c(G) \ge 2\big (n(G)-1-\Delta (G)\big )\varepsilon (G)\). Moreover, the equality holds if and only if G is a regular graph with \(\mathrm{diam}(G) \le 2\).

  2. (ii)

    \(\xi ^d(G) - \xi ^c(G) \le 2n(G)\big (W(G)-m(G)\big ) + M_1(G) - DD(G)\). Moreover, the equality holds if and only if \(G\in \{P_4\} \cup G^*(n)\).

Proof

(i) Let v be a vertex of G. If w is not adjacent to v, then \(d(v,w)\ge 2\) and consequently \(D(v) - \deg (v) \ge 2(n(G)-1-\Delta (G))\). Thus:

$$\begin{aligned} \xi ^d(G)-\xi ^c(G)= & {} \sum _{v \in V(G)}\varepsilon (v)\big (D(v)-\deg (v)\big )\\\ge & {} \sum _{v \in V(G)} 2\, \varepsilon (v)\big (n(G) -1-\Delta (G)\big ) \\= & {} 2\,\varepsilon (G)\big ( n(G)-1-\Delta (G)\big )\,. \end{aligned}$$

The equality holds if and only if \(D(v) - \deg (v) = 2(n(G)-1-\Delta (G))\) for every vertex v. As the last equality in particular holds for a vertex of maximum degree, we infer that G must be regular. Then, the condition \(D(v) - \deg (v) = 2(n(G)-1-\Delta (G))\) simplifies to

$$\begin{aligned} D(v) + \Delta (G) = 2n(G)-2\,. \end{aligned}$$
(3)

Suppose that \(\mathrm{diam}(G) = d\), and let \(x_i\), \(i\in \{2,\ldots , d\}\), be the number of vertices at distance i from v. Then, \(n(G) = 1 + \Delta (G) + x_2 + \cdots + x_d\) and \(D(v) = \Delta (G) + 2x_2 + \cdots + dx_d\). Plugging these equalities into (3) yields

$$\begin{aligned} 2\Delta (G) + 2x_2 + \cdots + dx_d = 2 + 2\Delta (G) + 2x_2 + \cdots + 2x_d - 2 \end{aligned}$$

which implies that \(x_3 = \cdots = x_d = 0\), that is, \(\mathrm{diam}(G) = 2\). Finally, if \(\mathrm{diam}(G) = 2\), then \(D(v) = \Delta (G) + 2(n(G)-\Delta (G)-1)\), so (3) is fulfilled for every regular graph of diameter 2. Clearly, (3) is also fulfilled for graphs of diameter 1, that is, complete graphs.

(ii) If \(v \in V(G)\), then clearly \(\varepsilon (v) \le n(G)-\deg (v)\). Then, we deduce that

$$\begin{aligned} \xi ^d(G) - \xi ^c(G)= & {} \sum _{v \in V(G)}\varepsilon (v)\big ( D(v)-\deg (v) \big ) \\\le & {} \sum _{v \in V(G)} \big ( n(G)-\deg (v) \big )\big ( D(v)-\deg (v) \big ) \\= & {} n(G)\sum _{v \in V(G)}\big (D(v)-\deg (v) \big ) + \sum _{v \in V(G)}\deg (v)^2 \\&- \sum _{v \in V(G)}\deg (v)D(v) \\= & {} 2n(G)\big (W(G)-m(G)\big ) + M_1(G) - DD(G)\,. \end{aligned}$$

The equality in the above computation holds if and only if \(\varepsilon (v) = n(G) - \deg (v)\) holds for all \(v \in V (G)\). So suppose that G is a graph for which \(\varepsilon (v) = n(G) - \deg (v)\) holds for all \(v \in V (G)\) and distinguish the following two cases.

Suppose first that \(\mathrm{diam}(G)\le 2\). If the order of a graph is at most 4, then the equality holds only for \(P_4\). If the order is at least 5, then the statement holds by Lemma 2.1. Suppose second that \(\mathrm{diam}(G)\ge 3\). Let P be a diametral path in G, and let v and \(v'\) be its endpoints. Since \(\varepsilon (v) = n(G) - \deg (v)\) and \(|V(P) \setminus N[v]| = \varepsilon (v) - 1\), it follows that \(n(G) = 1 + \deg (v) + |V(P) \setminus N[v]|\). The latter means that \(V(G) = N[v]\cup V(P)\). Since \(\mathrm{diam}(G) = \varepsilon (v) \ge 3\) it follows that \(\deg (v') = 1\). Since we have also assumed that \(\varepsilon (v') = n(G) - \deg (v')\) holds we see that \(\varepsilon (v') = n(G) -1\) which in turn implies that G is a path. Among the paths \(P_n\), \(n\ge 4\), the path \(P_4\) is the unique one which fulfills the condition \(\varepsilon (v) = n - \deg (v)\) for all \(v \in V (P_n)\). \(\square \)

3 The Difference on Trees

In this section, we turn our attention to \(\xi ^d(T) - \xi ^c(T)\) for trees T, and in particular on extremal trees regarding this difference.

Theorem 3.1

Among all trees T with given order and diameter, \(\min \{ \xi ^d(T)-\xi ^c(T)\}\) is achieved on caterpillars.

Proof

Fix the order and diameter of trees to be considered. Let T be an arbitrary tree that is not a caterpillar with this fixed order and diameter. Let P be a diametral path of T connecting x to y. Then, the eccentricity of each vertex w of T is equal to \(\max \{d(w,x), d(w,y)\}\). Let \(z\ne x,y\) be a vertex of P, and let \(T_z\) be a maximal subtree of T which contains z but no other vertex of P. We may assume that z can be selected such that \(T_z\) contains a vertex at distance \(k \ge 2\) from z, for otherwise T is a caterpillar. Let u be vertex of \(T_z\) with \(d(u,z)=k-1\), and let v be the neighbor of u with \(d(v,z)=k-2\). Let \(S = N(u)\setminus \{v\}\) and let \(s = |S|\). Note that \(s > 0\). Let \(T'\) be the tree obtained from T by replacing the edges between u and the vertices of S with the edges between v and the vertices of S.

Claim A: \(\xi ^d(T) - \xi ^c(T) > \xi ^d(T') - \xi ^c(T')\).

Set \(X_d = \xi ^d(T) - \xi ^d(T')\) and \(X_c = \xi ^c(T) - \xi ^c(T')\). To prove the claim, it is equivalent to show that \(X_d - X_c > 0\).

For a vertex \(w \in V(G)\setminus (S \cup \{u\})\), we have \(D_{T'}(w) = D_{T}(w) - s\) and \(\varepsilon _{T'}(w)\le \varepsilon _{T}(w)\). Moreover if \(w \in S\), then \(\varepsilon _{T'}(w)= \varepsilon _{T}(w) -1\) and \(D_T(w) = D_{T'}(w) + n-s-2\). With these facts in hand, we can compute as follows.

$$\begin{aligned} X_d= & {} \sum _{w \in V(T)}\varepsilon _T(w)D_T(w) - \sum _{w \in V(T')}\varepsilon _{T'}(w)D_{T'}(w) \\= & {} \varepsilon _{T}(u)D_{T}(u)- \varepsilon _{T'}(u)D_{T'}(u) + \varepsilon _{T}(v)D_{T}(v)-\varepsilon _{T'}(v)D_{T'}(v)\\&+ \sum _{w \in S}\varepsilon _T(w)D_T(w) - \varepsilon _{T'}(w)D_{T'}(w) \\&+ \sum _{w \in V(T)- ( S\cup \{u,v\})}\varepsilon _T(w)D_T(w) - \varepsilon _{T'}(w)D_{T'}(w)\\\ge & {} s(\varepsilon _T(v)-\varepsilon _T(u)) + \sum _{w \in V(T)- ( S\cup \{u,v\})} \varepsilon _T(w)s \\&+ \sum _{w \in S}\big ( \varepsilon _T(w)D_T(w) - (\varepsilon _T(w)-1)(D_T(w)-n+2+s) \big ) \\= & {} -s + \sum _{w \in V(T)- ( S\cup \{u,v\})} \varepsilon _T(w)s \\&+ \sum _{w \in S}\big ( (D_T(w)-n+2+s ) - \varepsilon _T(w)(-n+2+s) \big ) \\= & {} -s + \sum _{w \in V(T)\setminus ( S\cup \{u,v\})} \varepsilon _T(w)s + (n-s-2)\sum _{w \in S}(\varepsilon _T(w)-1 + D_T(w))\\= & {} -s + \sum _{w \in V(T)\setminus ( S\cup \{u,v\})} \varepsilon _T(w)s \\&+\, s(n-s-2)\varepsilon _T(u) + s(D_T(u)+ n-2)\\= & {} s\big [ \varepsilon (T)-\varepsilon _T(u)(s+2)-s+1 + (n-s-2)\varepsilon _T(u)+ D_T(u)+ n-3) \big ]\,. \end{aligned}$$

Similarly, but shorter, we get that \(X_c = 2s\). Thus,

$$\begin{aligned} X_d - X_c&\ge s\big [ \varepsilon (T)-\varepsilon _T(u)(s+2) \\&\quad + (n-s-2)\varepsilon _T(u)+ D_T(u)+ n-s-4) \big ] \\&> 0\,. \end{aligned}$$

This proves Claim A. If \(T'\) is not a caterpillar, we can repeat the construction as many times as required to arrive at a caterpillar. Since at each step the value of \(\xi ^d - \xi ^c\) is decreased, the minimum of this difference is indeed achieved on caterpillars. \(\square \)

Theorem 3.2

If T is a tree of order \(n\ge 3\), then

$$\begin{aligned} \xi ^d(T) - \xi ^c(T)\ge 4 n^2-12 n+8\,. \end{aligned}$$

Moreover, equality holds if and only if \(T = S_n\).

Proof

Let \(n\ge 3\) be a fixed integer. By Theorem 3.1, it suffices to consider caterpillars. More precisely, let T be a caterpillar of order n and with \(\mathrm{diam}(T) = d \ge 3\). Then, we wish to prove that \(\xi ^d(T) - \xi ^c(T) > \xi ^d(S_n) - \xi ^c(S_n) = 4 n^2-12 n+8\). The latter equality is straightforward to check; for the strict inequality, we proceed as follows.

Let \(w, z\in V(T)\) be two adjacent vertices of eccentricities \(d-1\) and \(d-2\), respectively. Let \(S = N(w)\setminus \{z\}\) and set \(s = |S|\). As \(\varepsilon (w) = d-1\), we have \(s\ge 1\). Let further \(S_1 = V(G) \setminus (S\cup \{w,z\})\). Construct now a tree \(T'\) from T by replacing the edges between w and the vertices of S with the edges between z and the vertices of S. Note that \(\deg _T(w) = \deg _{T'}(w)+s\) and \(\deg _T(z) = \deg _{T'}(z)- s\), while the other vertices have the same degree in T and \(T'\). Further, it is straightforward to verify the following relations:

$$\begin{aligned} D_T(w)&= D_{T'}(w)- s,\quad \varepsilon _T(w)= \varepsilon _{T'}(w); \\ D_T(z)&= D_{T'}(z)+ s,\quad \varepsilon _{T'}(z)\le \varepsilon _T(z)\le \varepsilon _{T'}(z)+1; \\ D_T(x)&= D_{T'}(x) + n-s-2,\quad \varepsilon _T(x)=\varepsilon _{T'}(x)+1\ (x \in S); \\ D_T(y)&= D_{T'}(y) + s,\quad \varepsilon _{T'}(y)\le \varepsilon _T(y)\le \varepsilon _{T'}(y) + 1\ (y \in S_1). \end{aligned}$$

Setting \(X_d = \xi ^d(T)-\xi ^d(T')\), we have:

$$\begin{aligned} X_d= & {} \sum _{v \in \{w,z\}}D_T(v)\varepsilon _{T}(v)-D_{T'}(v)\varepsilon _{T'}(v) + \sum _{v \in S}D_{T}(v)\varepsilon _{T}(v)-D_{T'}(v)\varepsilon _{T'}(v)\\&+ \sum _{v \in S_1 }D_T(v)\varepsilon _{T}(v)-D_{T'}(v)\varepsilon _{T'}(v) \\\ge & {} s(\varepsilon _{T'}(z)-\varepsilon _T(w)) + \sum _{v \in S}D_{T}(v)\varepsilon _{T}(v)- (D_{T}(v) -(n-s-2))(\varepsilon _{T}(v)-1)\\&+ \sum _{v \in S_1 }D_T(v)\varepsilon _{T}(v)-(D_{T}(v)-s)\varepsilon _{T}(v) \\\ge & {} -s + (n-s-2)\sum _{v \in S}\varepsilon _T(v)+ \sum _{v \in S}D_T(v) - s(n-s-2) + s \sum _{v \in S_1}\varepsilon _T(v)\\\ge & {} -s+ 3s(n-s-2) + s(2(n-s-2)+2s+1) - s(n-s-2) \\&+\, 3s(n-s-2)\\= & {} 5s(n-s-2) + 2s(n-2)\,. \end{aligned}$$

Similarly, setting \(X_c = \xi ^c(T)-\xi ^c(T')\), we have

$$\begin{aligned} X_c= & {} \sum _{v \in \{w,z\}} \big (\deg _T(v)\varepsilon _{T}(v)-\deg _{T'}(v)\varepsilon _{T'}(v)\big )\\&+\sum _{v \in S} \big ( \deg _{T}(v)\varepsilon _{T}(v)-\deg _{T'}(v)\varepsilon _{T'}(v)\big )\\&+ \sum _{v \in S_1 } \big (\deg _T(v)\varepsilon _{T}(v)-\deg _{T'}(v)\varepsilon _{T'}(v)\big ) \\\le & {} s\varepsilon _T(w) + \deg _T(z)\varepsilon _T(z) - (\deg _T(z)+s)(\varepsilon _T(z)-1) \\&+\,s + \sum _{v \in S_1 }\deg _T(v)\varepsilon _{T}(v)-\deg _{T}(v)(\varepsilon _{T}(v)-1)\\= & {} 2s + \deg _T(z) + \sum _{v \in S_1}\deg (v)\\= & {} 2n -3. \end{aligned}$$

Therefore,

$$\begin{aligned} X_d - X_c \ge \big (5s(n-s-2) + 2s(n-2)\big ) -\big (2n -3\big ) > 0\,, \end{aligned}$$

that is, \(\xi ^d(T)-\xi ^c(T) > \xi ^d(T')-\xi ^c(T')\). Repeating the above transformation until \(S_n\) is constructed finishes the argument. \(\square \)

To bound the difference \(\xi ^d(T) - \xi ^c(T)\) for an arbitrary tree T from above, we first recall the following result.

Lemma 3.3

[14, Theorem 2.1] Let w be a vertex of graph G. For nonnegative integers p and q, let G(pq) denote the graph obtained from G by attaching to vertex w pendant paths \(P = wv_1\cdots v_p\) and \(Q = wu_1 \cdots u_q\) of lengths p and q, respectively. Let \(G(p+q,0)=G(p,q)- wu_1+v_pu_1\). If \(r = \varepsilon _G(w)\) and \(r\ge p\ge q \ge 1\), then

$$\begin{aligned}&\xi ^d(G(p+q,0))- \xi ^d(G(p,q)) \\&\quad \ge \frac{pq}{6}\big [ 6D_G(w)+p(2p-3) + q(2q-3) + 3pq -12r \\&\qquad + 6n(G)(p+q+r+1) + 6\sum _{v \in V(G)}\varepsilon (v)\big ]\,. \end{aligned}$$

Lemma 3.4

Let G, p, q, G(pq), and \(G(p+q,0)\) be as in Lemma 3.3. Then,

$$\begin{aligned} \xi ^c(G(p+q,0)) - \xi ^c(G(p,q)) \le q(3p + 2m(G)-1)\,. \end{aligned}$$

Proof

Let \(\deg '(v)\) and \(\varepsilon '(v)\) (resp. \(\deg (v)\) and \(\varepsilon (v)\)) denote the degree and the eccentricity of v in \(G(p+q,0)\) (resp. G(pq)). Then, we have:

$$\begin{aligned} \deg '(w)&= \deg (w)-1, \quad \varepsilon '(w) \le \varepsilon (w) + q; \\ \deg '(v_i)&=\deg (v_i), i\in [p-1],\quad \deg '(v_p)=\deg (v_p)+1; \\ \varepsilon '(v_i)&\le \varepsilon (v_i) + q, i\in [p]; \\ \deg '(u_j)&=\deg (u_j), \quad \varepsilon '(u_j) = \varepsilon (u_j)+ p; \\ \varepsilon '(x)&\le \varepsilon (x) + q, x \in V(G)\,. \end{aligned}$$

Moreover, the degrees of vertices in \(G(p+q,0)\) do not decrease. Calculating the difference of contributions of vertices in \(\xi ^c\) for \(G(p+q,0)\) and G(pq), we can estimate the difference \(X_c = \xi ^c(G(p+q,0)) - \xi ^c(G(p,q))\) as follows:

$$\begin{aligned} X_c\le & {} \sum _{w\ne x \in V(G)}\deg (x) q + \sum _{i=1}^{q} \deg (u_i)p + \sum _{i=1}^{ \lfloor \frac{p}{2} \rfloor }\deg (v_i)q\\&+ \, \varepsilon (v_p) + (\deg (w)-1)(r+q)-\deg (w)r\\= & {} \big (2m(G)-\deg (w) \big )q + (2q-1)p + pq +p +q(\deg (w)-1) \\= & {} 2qm(G) + 3pq - q\,. \end{aligned}$$

\(\square \)

Theorem 3.5

If T is a tree of order n, then

$$\begin{aligned} \xi ^d(T) - \xi ^c(T) \le {\left\{ \begin{array}{ll} \frac{25 n^4}{96}-\frac{n^3}{6}-\frac{89 n^2}{48}+\frac{19 n}{6}-\frac{45}{32}; &{} n\ odd\,, \\ \frac{25 n^4}{96}-\frac{n^3}{6}-\frac{43 n^2}{24}+\frac{19 n}{6}-2; &{} n\ even\,. \end{array}\right. } \end{aligned}$$

Moreover, equality holds if and only if \(T=P_n\).

Proof

The right side of the above inequality is equal to \(\xi ^d(P_n)-\xi ^c(P_n)\). (The value of \(\xi ^d(P_n)\) has been determined in [14], while it is straightforward to deduce \(\xi ^c(P_n)\). Combining the two formulas, the polynomials from the right hand side of the inequality are obtained.) Suppose now that \(T \ne P_n\). Then, there is always a vertex w of degree at least 3 such that we can apply Lemmas 3.3 and 3.4. Setting

$$\begin{aligned} X_{dc} = \big (\xi ^d(T(p+q,0) - \xi ^c(p+q,0)\big )-\big (\xi ^d(T(p,q) - \xi ^c(p,q) \big ), \end{aligned}$$

we have:

$$\begin{aligned} X_{dc}\ge & {} pqD_T(w) + \frac{pq}{6} \big ( p(2p-3) + q(2q-3) \big )+ \frac{(pq)^2}{2} -2pqr \\&+ pqn(T)(p+q+r+1) +pq\sum _{v \in V(T)}\varepsilon (v) - \big ( 2qm(T) + 3pq - q \big )\\= & {} pq\big (D_T(w) + \sum _{v \in V(T)}\varepsilon (v) -3 \big ) + \frac{pq}{6}\big (2p^2-3p+2q^2-3q+3pq \big )\\&+ pqr(n(G)-2) + q\big (pn(T)(p+q+r)-2m(T)+1\big ) > 0 \end{aligned}$$

and the result follows. \(\square \)

4 Further Comparison

In this concluding section, we give sharp lower and upper bounds on \(\xi ^d(G)+\xi ^c(G)\), compare \(\xi ^d(G)\) with \(\xi ^c(G)\) for graphs G with \(\Delta (G) \le \frac{2}{3}(n-1)\), and give a sharp lower bound on \(\xi ^d(G)\) for graphs G with a given radius.

Theorem 4.1

If G is a connected graph, then the following hold.

  1. (i)

    \(\xi ^d(G) + \xi ^c(G)\le 2(n(G)-1) \varepsilon (G) + 2 \mathrm{diam}(G) \big ( W(G) + m(G) - 2{n(G) \atopwithdelims ()2} \big )\).

  2. (ii)

    \(\xi ^d(G) + \xi ^c(G)\ge 2(n(G)-1)\varepsilon (G) + 2 \mathrm{rad}(G) \big ( W(G) + m(G) - 2{n(G) \atopwithdelims ()2} \big ) \).

Moreover, each of the equalities holds if and only if G is a self-centered graph.

Proof

(i) Partition the pairs of vertices of G into neighbors and non-neighbors, and using (1), we can compute as follows:

$$\begin{aligned} \xi ^d(G)= & {} \sum _{ \{u,v\}\subseteq V(G)}(\varepsilon (u)+\varepsilon (v))d(u,v) \\= & {} \sum _{ uv\in E(G)}(\varepsilon (u)+\varepsilon (v)) +2 \sum _{\begin{array}{c} \{u,v\}\subseteq V(G) \\ d(u,v)\ge 2 \end{array}} (\varepsilon (u)+\varepsilon (v)) \\&+ \sum _{\begin{array}{c} \{u,v\}\subseteq V(G) \\ d(u,v)\ge 2 \end{array}} \big (\varepsilon (u)+\varepsilon (v)\big )\big (d(u,v)-2\big ) \\= & {} \xi ^c(G) + \sum _{\{u,v\}\subseteq V(G)}(\varepsilon (u) + \varepsilon (v)) - 2 \xi ^c(G) \\&+\sum _{\begin{array}{c} \{u,v\} \subseteq V(G)\\ d(u,v)\ge 2 \end{array}} \big (\varepsilon (u)+\varepsilon (v)\big )\big (d(u,v)-2\big ) \\\le & {} -\xi ^c(G) + 2(n(G)-1)\varepsilon (G) \\&+ 2\mathrm{diam}(G) \big ( W(G) + m(G) - 2 \genfrac(){0.0pt}1{n(G)}{2} \big )\,. \end{aligned}$$

The inequality above becomes equality if and only if \(\varepsilon (v) = \mathrm{diam}(G)\) for every \(v \in V(G)\). That is, the equality holds if and only if G is a self-centered graph.

(ii) This inequality as well as its equality case is proved along the same lines as (i). The only difference is that the inequality \(\varepsilon (u)+\varepsilon (v) \le 2\mathrm{diam}(G)\) is replaced by \(\varepsilon (u)+\varepsilon (v) \ge 2\mathrm{rad}(G)\). \(\square \)

In our next result, we give a relation between \(\xi ^d(G)\) and \(\xi ^c(G)\) for graph G with maximum degree at most \(\frac{2}{3}(n(G)-1)\).

Theorem 4.2

If G is a graph with \(\Delta (G) \le \frac{2}{3}(n-1)\), then \(\xi ^d(G) \ge 2\xi ^c(G)\). Moreover, the equality holds if and only if G is 2-self-centered, \(\frac{2}{3}(n(G)-1)\)-regular graph.

Proof

Set \(n = n(G)\) and let v be a vertex of G. Since \(\deg (v) < n-1\) we have \(\varepsilon (v) \ge 2\). Therefore, \(D(v) \ge 2(n-1) - \deg (v) \) with equality holding if and only if \(\varepsilon (v) = 2\). Using the assumption that \(\deg (v) \le \frac{2}{3}(n-1)\), equivalently, \( 2n-2 \ge 3\deg (v)\), we infer that \( \varepsilon (v)D(v) \ge 2\varepsilon (v)\deg (v)\). Summing over all vertices of G, the inequality is proved. Its derivation also reveals that the equality holds if and only if \(\deg (v) =\frac{2}{3}(n-1)\) and \(\varepsilon (v)=2\) for each vertex \(v \in V(G)\). \(\square \)

A graph \(G=C(n; a_0,a_1, \ldots , a_k)\) is called a circulant if \(V(G)=[n]\) and \(E(G)=\{(i,j): |i-j|\in \{a_0, a_1, \ldots , a_k\} \pmod n\}\), where \(1\le a_0<a_1<\cdots <a_k\le n/2\). Consider the circulants \(G_k = C(3k+1; 1, 2,\ldots , k)\), \(k\ge 1\), and note that \(G_1 = C_4\). Then, it can be checked that \(G_k\) is a 2-self-centered, \(\frac{2}{3}(n(G_k)-1) = 2k\)-regular graph. Hence, \(G_k\), \(k\ge 1\), is an infinite series of graphs that attain the equality in Theorem 4.2.

To conclude the paper, we give a lower bound on the eccentric distance sum in terms of the radius of a given graph. Interestingly, the cocktail-party graphs are again among the extreme graphs.

Theorem 4.3

If G is a graph with \(\mathrm{rad}(G) = r\), then

$$\begin{aligned} \xi ^d(G)\ge \big (n(G)-1 + \genfrac(){0.0pt}1{r}{2}\big )\varepsilon (G)\,. \end{aligned}$$

Equality holds if and only if G is a complete graph or a cocktail-party graph.

Proof

Set \(n = n(G)\) and let \(v\in V(G)\). Let P be a longest path starting in v. Separately considering the neighbors of v, the last \(\varepsilon (v) - 2\) vertices of P, and all the other vertices, we can estimate that

$$\begin{aligned} D(v)\ge & {} \deg (v) + (3 + \cdots + \varepsilon (v)) + 2\big (n - 1 - \deg (v) - (\varepsilon (v) -2) \big ) \\= & {} 2n - \deg (v) + \frac{\varepsilon (v)^2-3\varepsilon (v)}{2}-1\,. \end{aligned}$$

Since \(n-\deg (v) \ge \varepsilon (v)\) for every vertex \(v \in V(G)\), we have \(D(v) \ge n+ \varepsilon (v) + \frac{\varepsilon (v)^2 - 3\varepsilon (v)}{2}-1\). Consequently, having the fact \(\varepsilon (v)\ge r\) in mind, we get \(D(v)\ge n-1 + {r \atopwithdelims ()2}\). Multiplying this inequality by \(\varepsilon (v)\) and summing over all vertices of G the claimed inequality is proved.

From the above derivation, we see that the equality can hold only if \(\varepsilon (v)=r=n-\deg (v)\) holds for every \(v\in V(G)\). Then, \(\mathrm{diam}(G)\le 2\) by Lemma 2.1. For the equality, we must also have \(D(v) = n-1 + {r \atopwithdelims ()2}\) for every v. If \(r = 2\) this means that \(D(v) = n\), and hence, \(\deg (v) = n-2\). It follows that G is a cocktail-party graph. And if \(r = 1\), then we get a complete graph. \(\square \)