 # Maximum Eccentric Connectivity Index for Graphs with Given Diameter

The eccentricity of a vertex v in a graph G is the maximum distance between v and any other vertex of G. The diameter of a graph G is the maximum eccentricity of a vertex in G. The eccentric connectivity index of a connected graph is the sum over all vertices of the product between eccentricity and degree. Given two integers n and D with D≤ n-1, we characterize those graphs which have the largest eccentric connectivity index among all connected graphs of order n and diameter D. As a corollary, we also characterize those graphs which have the largest eccentric connectivity index among all connected graphs of a given order n.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Let be a simple connected undirected graph. The distance between two vertices and in is the number of edges of a shortest path in connecting and . The eccentricity of a vertex is the maximum distance between and any other vertex, that is . The diameter of is the maximum eccentricity among all vertices of . The eccentric connectivity index of is defined by

 ξc(G)=∑v∈Vdeg(v)ϵ(v).

This index was introduced by Sharma et al. in . Alternatively, can be computed by summing the eccentricities of the extremities of each edge:

 ξc(G)=∑vw∈Eϵ(v)+ϵ(w).

We define the weight of a vertex by , and we thus have . Morgan et al.  give the following asymptotic upper bound on for a graph of order and with a given diameter .

###### Theorem 1 (Morgan, Mukwembi and Swart, 2011 ).

Let be a connected graph of order and diameter . Then,

 ξc(G)≤D(n−D)2+O(n2).

In what follows, we write if and are two isomorphic graphs, and we let and be the complete graph and the path of order , respectively. We refer to Diestel  for basic notions of graph theory that are not defined here. A lollipop is a graph obtained from a path by joining an end vertex of this path to . Morgan et al.  state that the above asymptotic bound is best possible by showing that . The aim of this paper is to give a precise upper bound on in terms of and , and to completely characterize those graphs that attain the bound. As a result, we will observe that there are graphs of order and diameter such that is strictly larger than .

Morgan et al.  also give an asymptotic upper bound on for graphs of order (but without a fixed diameter), and show that this bound is sharp by observing that it is attained by .

###### Theorem 2 (Morgan, Mukwembi and Swart, 2011 ).

Let be a connected graph of order . Then,

 ξc(G)≤427n3+O(n2).

We give a precise upper bound on for graphs of order , and characterize those graphs that reach the bound. As a corollary, we show that for every lollipop, there is another graph of same order, but with a strictly larger eccentric connectivity index.

## 2 Results for a fixed order and a fixed diameter

The only graph with diameter is the clique, and clearly, . Also, the only connected graph with vertices and diameter 2 is , and . The next theorem characterizes the graphs with maximum eccentric connectivity index among those with vertices and diameter . Let be the graph obtained from by removing a maximum matching (i.e., disjoint edges) and, if

is odd, an additional edge adjacent to the unique vertex that still has degree

. In other words, all vertices in have degree , except possibly one that has degree . For illustration, and are drawn in Figure 1.

###### Theorem 3.

Let be a connected graph of order and diameter . Then,

 ξc(G)≤2n2−4n−2(nmod2)

with equality if and only if or and (see Figure 1).

###### Proof.

Let be a graph of order and diameter , and let be the number of vertices of degree in . Clearly, for all vertices of degree , while for all other vertices . Note that if is odd, then at least one vertex in has degree at most . Hence,

 ξc(G) ≤x(n−1)+2(n−x)(n−2)−2((n−x)mod2) =2n2−4n+x(3−n)−2((n−x)mod2).

For or , this value is maximized with . For , both (i.e., ) and (i.e., ) give the maximum value . ∎

Before giving a similar result for graphs with diameter , we prove the following useful property.

###### Lemma 4.

Let be a connected graph of order and diameter . Let be a shortest path in between two vertices at distance , and assume there is a vertex on such that is strictly larger than the longest distance from to an extremity of . Finally, let be a vertex in such that and let be a path of length linking to in . Then

vertices do not belong to ;

vertex has either no neighbor on , or its unique neighbor on is an extremity at distance from ;

if then vertices have no neighbor on .

###### Proof.

No vertex with is on , since this would imply , and hence . Similarly, no vertex with has a neighbor on , since this would imply , and hence . If vertex has at least one neighbor on , then this neighbor is necessarily an extremity of at distance from , else we would have , which would imply . We conclude the proof by observing that if both extremities of are at distance from , then is adjacent to at most one of them since . ∎

Let and be integers such that , and , and let be the graph (of order and diameter ) constructed from a path by joining each vertex of a clique to and , and vertices of the clique to (see Figure 1). Observe that is the lollipop and that can be viewed as a lollipop with a missing edge between and . Also, if , then and .

###### Lemma 5.

Let and be integers such that , and , then

 ξc(En,D,k)= 2D−1∑i=0max{i,D−i}+(n−D−1)(2D−1+D(n−D)) +k(2D−n−1+max{2,D−2}).
###### Proof.

The sum of the weights of the vertices outside is

 ∑v∈V∖V(P)W(v) =k(n−D+1)(D−1)+(n−D−1−k)(n−D)D, =k(2D−n−1)+(n−D−1)(n−D)D.

We now consider the weights of the vertices in . The weight of is , the weight of is , and the weight of is . The weight of for is , and the weight of is . Hence, the total weight of the vertices on is

 (n−D)D+(n−D+1)(D−1)+(k+2)max{2,D−2}+2D−1∑i=3max{i,D−i}+D = ((n−D−1)D+D)+((n−D−1)(D−1)+2(D−1)) +(kmax{2,D−2}+2max{2,D−2})+2D−1∑i=3max{i,D−i}+D = 2D−1∑i=0max{i,D−i}+(n−D−1)(2D−1)+kmax{2,D−2}

By summing up all weight in , we obtain the desired result. ∎

In what follows, we denote . It follows from the above lemma that

Lemma 5 allows to know for which values of we have .

###### Corollary 6.

Let and be integers such that , and .

If , then , with equality if and only if .

If , then with equality if and only if .

If , then all are equal to for .

###### Corollary 7.

Let and be integers such that , and .

If , then if and only if .

If , then if and only if .

If , then if and only if .

The graph of Figure 1 has vertices, diameter , and is not isomorphic to , while . Similarly, the graph of Figure 1 has vertices, diameter , and is not isomorphic to , while . In what follows, we prove that all graphs of order and diameter have . Moreover, we show that if is not isomorphic to a , then equality can only occur if or . So, for every and , let us consider the following graph class :

 CDn=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩{En,3,n−4}if n=4,5 % and D=3;{En,3,2,H2}if n=6 and D=3;{En,3,0,…,En,3,3,H3}if n=7 and D=3;{En,3,0}if n>7 and D=3;{En,D,n−D−1}if n<3(D−1) and D≥4;{En,D,0,…,En,D,n−D−1}if n=3(D−1) and D≥4;{En,D,0}if n>3(D−1) and D≥4.

Note that while Morgan et al.  state that the lollipops reach the asymptotic upper bound of the eccentric connectivity index, we will prove that they reach the more precise upper bound only if , and , or and .

###### Theorem 8.

Let be a connected graph of order and diameter . Then , with equality if and only if belongs to .

###### Proof.

We have already observed that all graphs in have . So let be a graph of order , diameter such that . It remains to prove that belongs to .

Let be a shortest path in that connects two vertices and at distance from each other. In what follows, we use the following notations for all :

is the number of vertices outside and adjacent to ;

;

. Also, let . Note that and for all , and since . Since is a shortest path linking to , no vertex outside can have more than three neighbors in . We consider the following partition of the vertices outside in 4 disjoint sets , and denote by their respective size:

is the set of vertices outside with no neighbor on ;

is the set of vertices outside with one or two neighbors in ;

is the set of vertices outside with three neighbors in and ;

is the set of vertices outside with three neighbors in and .

Clearly, all vertices outside can have except those in . The maximum degree of a vertex in is , while it is for those in and for those in . For a vertex , let

 ρ(v)=max{ri|ui is adjacent to v} ρ∗=maxv∈V1,2∪VD−13∪VD3ρ(v)

Hence, . We first show that the total weight of the vertices in is at most

 D(n−D)(n−D−1−nD−13−nD3)−2Dr∗+Dmin{1,ρ∗}.
• If , then the largest possible weight of the vertices in occurs when all of them have two neighbors in (i.e., and no vertex in has one neighbor on ). In such a case, , and all these vertices have degree . Hence, their total weight is at most .

• If and , then let be such that . It follows from Lemma 4 that there is a path such that have no neighbor on and has at most one neighbor on . Hence, the largest possible weight of the vertices in occurs when vertices have 0 neighbor on , one vertex has one neighbor on , and vertices have 2 neighbors in . Hence, the largest possible weight for the vertices in is

 D(n−D−2)(r∗−1)+D(n−D−1)+D(n−D)(n−D−1−nD−13−nD3−r∗) = D(n−D)(n−D−1−nD−13−nD3)−2Dr∗+D.
• If and , then consider the same path as in the above case. If has no neighbor on , then there are at least vertices with no neighbor on and the largest possible weight for the vertices in is

 D(n−D−2)(r∗)+D(n−D)(n−D−1−nD−13−nD3−r∗)=D(n−D)(n−D−1−nD−13−nD3)−2Dr∗.

Also, if there are at least two vertices in with only one neighbor on , then the largest possible weight for the vertices in is

 D(n−D−2)(r∗−1)+2D(n−D−1)+D(n−D)(n−D−1−nD−13−nD3−r∗−1)=D(n−D)(n−D−1−nD−13−nD3)−2Dr∗.

So assume is the only vertex in with only one neighbor on . We thus have . We now show that this case is impossible. We know from Lemma 4 that is adjacent to or (exclusive) to . Since for all vertices outside , we know that has no neighbor outside . Hence, is or , say (the other case is similar). Then is not adjacent to else there is with such that is outside and has as neighbor on , and since must have a second neighbor on with , we would have

 i+2≤ℓ=d(u0,uℓ)≤d(wr∗,wj)+2≤(d(wr∗,ui)−2)+2=i+1.

Hence, is adjacent to . Then there is also a path linking to going through else . Let be such a path of minimum length. Clearly, has length at least equal to . So let be the subpath of of length and having as extremity (i.e., and ). Applying the same argument to as was done for , we conclude that has as unique neighbor on . We thus have two vertices in with a unique neighbor on , a contradiction.

The total weight of the vertices in is at most , which gives the following upper bound on the total weight of the vertices outside :

 B= D(n−D)(n−D−1−nD−13−nD3)+(n−D+1)((D−1)nD−13+DnD3) −2Dr∗+Dmin{1,ρ∗} = (n−D−1)D(n−D)+nD−13(2D−n−1)+DnD3−2Dr∗+Dmin{1,ρ∗}.

This bound can only be reached if all vertices outside are pairwise adjacent. But Lemma 4 shows that this cannot happen if . Indeed, consider a vertex in with . There is a vertex in adjacent to such that . We know from Lemma 4 that there is a shortest path linking to a vertex with and such that do not belong to . In what follows, we denote such a path. If is adjacent to a with , then the path links to and has length at most , a contradiction. Hence has at least non-neighbors outside . Also, as shown in Lemma 4, belong to , while belongs to . In the upper bound , we have assumed that . Hence, if , we can gain units on for every , ( for and for ), while the gain is ( for and for ) if .

We can gain an additional for every . Indeed, consider such a vertex and let be a vertex at distance from . Note that is not on and has at most one neighbor on else . Hence, if , we can gain (one for and one for ) in the above upper bound. So assume , and consider again the shortest path , with . Also, let . To gain an additional , it is sufficient to determine a vertex in which is not adjacent to . So assume no such vertex exists, and let us prove that such a situation cannot occur. Note that (since it has at most one neighbor on ), which implies .

• If a vertex has a neighbor outside , then is adjacent to , and the path has length at most , a contradiction.

• If a vertex has a neighbor , then , a contradiction.

Since is connected and have no neighbors outside , we know that is adjacent to the extremity of at distance from (and to no other vertex on ). Hence, the vertices on and those in induce a path of length in , a contradiction.

In summary, the following value is a more precise upper bound on the total weight of the vertices outside :

 B−∑v∈V1,2∪VD32Dρ(v)−∑v∈VD−13(2D−1)ρ(v)−2DnD3 ≤ (n−D−1)D(n−D)+nD−13(2D−n−1)−DnD3−2Dr∗+Dmin{1,ρ∗} −∑v∈V1,2∪VD3∪VD−13(2D−1)ρ(v).

Let us now consider the vertices on . We have , , and for . Since , the total weight of the vertices on is

 2D+D(o0+oD)+D−1∑i=1(δi+ri)(2+oi) = 2D−1∑i=0δi+2D−1∑i=1ri+D−1∑i=1rioi+D∑i=0δioi.

Each edge that links a vertex outside to a vertex in contributes for in the sum . Hence,

 D−1∑i=1rioi≤∑v∈V1,22ρ(v)+∑v∈VD3∪VD−133ρ(v)≤∑v∈V1,2∪VD3∪VD33ρ(v).

Since , we get the following valid upper bound on the total weight of the vertices on :

 2D−1∑i=0δi+D∑i=0δioi+2r∗(D−1)+∑v∈V1,2∪VD3∪VD33ρ(v).

Summing up the bounds for the vertices outside with those on , we get the following upper bound for the total weight of the vertices in :

 (n−D−1)D(n−D)+nD−13(2D−n−1)−DnD3+2D−1∑i=0δi+D∑i=0δioi−∑v∈V1,2∪VD3∪VD−13(2D−4)ρ(v)−2r∗+Dmin{1,ρ∗}.

Let us decompose this bound into two parts with being equal to the sum of the first terms of the above upper bound, and being equal to the sum of the last ones:

 A1 =(n−D−1)D(n−D)+nD−13(2D−n−1)−DnD3+2D−1∑i=0δi+D∑i=0δioi A2 =−∑v∈V1,2∪VD3∪VD−13(2D−4)ρ(v)−2r∗+Dmin{1,ρ∗}.

If , then , which implies .

If , then , which implies .

If and , then