Discrete Dynamics in Nature and Society
Volume 2018 (2018), Article ID 3957023, 6 pages
https://doi.org/10.1155/2018/3957023

Research Article

The Harary Index of All Unicyclic Graphs with Given Diameter

Bao-Hua Xing,¹ Gui-Dong Yu,1,2 Li-Xiang Wang,¹ and Jinde Cao³

¹School of Mathematics and Computation Sciences, Anqing Normal University, Anqing 246133, China
²Basic Department, Hefei Preschool Education College, Hefei 230013, China
³School of Mathematics, Southeast University, Nanjing 210096, China

Correspondence should be addressed to Jinde Cao; jdcao@seu.edu.cn

Received 15 June 2018; Revised 23 July 2018; Accepted 7 August 2018; Published 16 September 2018

Academic Editor: Beatrice Di Bella

Copyright © 2018 Bao-Hua Xing et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

The Harary index of is the sum of reciprocals of distance between any two vertices in . In this paper, we obtain the graphs with the maximum and second-maximum Harary indices among -vertex unicyclic graphs with diameter .

1. Introduction

In this paper, all graphs are simple, undirected, and connected. Denote by , the edge set and vertex set of and , the number of edges and vertices in , respectively. When , the graph is called a unicyclic graph. Let (or , be the degree and the neighborhood of a vertex in , respectively. When , we call is a pendant vertex. The distance between and    is denoted by The diameter of is . The graph (or ) arisen by deleting the edge (or by adding a new edge ). Let and be the path and cycle with , respectively. Denote by a path of , where (if ). When , , is an internal path of . When , is a pendant path of . If , specially, is a pendant edge. When the subgraph is itself, where is induced by in , is an induced path. For other terminologies and notations, we refer the readers to [1].

The Harary index , has been introduced independently in [2, 3]. Its calculation is as follows:

where is defined as above and the sum goes over all the pairs of vertices in .

The set of -vertex unicyclic graphs with diameter is denoted by The graph (see Figure 1) on vertices arisen from by attaching pendant edges to and adding a new vertex to be adjacent to and

Figure 1: The graphs and .

The graph (see Figure 1) arisen from by attaching pendant edges to and adding a new vertex to be adjacent to and The -vertex graph arisen from by attaching pendant edges to and adding two new adjacent vertices and to be adjacent to , denoted by (see Figure 2). So, if , the graph arisen from by attaching pendant edges to one vertex of .

Figure 2: The graphs and .

Note that -vertex graph arisen from by attaching pendant edges to and one pendant edge to and adding a new vertex to be adjacent to and . arisen from by attaching pendant edges to and adding a new vertex to be adjacent to and

Let , be the graph with vertices arisen from by adding a new vertex to be adjacent to one vertex . arisen from by attaching pendant vertices to and identifying with one vertex of , denote . Let be a -vertex unicyclic graph arisen from by adding a new vertex to be adjacent to and (see Figure 2), arisen from by attaching pendant vertices to , and denote .

Lately, the investigations on the spectral radius or eigenvalue or topological index of a special class of graphs and the topological properties of a certain class of networks remain a popular topic to researchers. For example, J.Q. Fei and J.H. Tu [4] characterized the complete characterization of the degree Kirchhoff index of bicyclic graphs. J.B. Liu et al. [5] discussed the topological properties of certain neural networks. B. Ning and B. Li [6] discussed the spectral radius of connected claw-free graphs. Y.Y. Wu and Y.J. Chen [7] analyzed the eccentric connectivity index of graphs. C. Wang et al. [8] obtained the least eigenvalue of the graphs whose complements are connected and have pendant paths. Many results can be seen in [2–16] and other papers. In particular, A. Ilic et al. [13] discussed the Harary index among the trees with fixed diameter. In this paper, we determine the graphs which have the maximum and second-maximum Harary indices among all the -vertex unicyclic graphs with diameter .

2. Lemmas

Lemma 1 (see [14]). Let , , and be three connected, pairwise disjoint graphs; note that , , . The graph is obtained by identifying the vertices , and , between , , , respectively. is obtained by identifying the vertices , , from , , and is obtained by identifying the vertices , , from , , ; then we can get

Lemma 2 (see [9]). Let be an -vertex unicyclic graph and be the graph defined as above. Then

if and only if , and the equality holds. When , then , and when , , then .

Lemma 3. Let be the graph defined as above; then

if and only if , the equality holds.

Proof. By the calculation of Harary index, we can get the following.
(1) If ,

(2) If ,

When is odd, we can get .
Thus the result holds.

Lemma 4. Let and and be the set and two graphs defined as above, respectively. ; then

if and only if , the equality holds.

Proof. Choose a graph , such that is the maximum. The following claims play a crucial role.
Claim 1. .
Proof. First, we prove . Otherwise, ; denote , ; let

using Lemma 1, we get , a contraction.
So, , let , ,
(1) If , let

if , let

(2) If or , let

(3) If , let

i.e., ;
if , let

i.e., .
From Lemma 3 and the calculation of , we can calculate that , a contraction.
Claim 2. .
Proof. Otherwise, if , let ; if , let . From Lemma 3, we can get , a contraction.
By Claims 1-2, we have the graph or .
Claim 3. .
Proof. If is even, we have

If is odd, , .
By Claims 1-3, we have .
Thus the result follows.

3. Main Results

In this section, we will list our main results.

Theorem 5. Let and be defined in Section 1, the n-vertex graph ; then

if and only if , the equality holds.

Proof. Let ; using Lemma 2, the result holds for . If , then . So, we discuss that .
Choose a graph with being the maximum. Note that is the only cycle and is the induced path in ; assume that ; we consider the following claims.
Claim 1. .
Proof. Otherwise, suppose that there exists a path connecting the cycle and the path with ; denote and . Let

Then, applying Lemma 1, , a contraction.
Using Claim 1, we note that , .
Claim 2. For any , .
Proof. Otherwise, assume that there exists a vertex with , , . Suppose that , . Let

Then, using Lemma 1, , a contraction.
By Claim 2, we have any vertex is pendant vertex.
Claim 3. .
Proof. Otherwise, suppose that , .
(1) If , denote , (if exists), . Let

(2) If , denote , (if exists), . Let

Then, applying Lemma 3 and the calculation of , , a contraction.
Claim 4. (1) , ; (2) , .
Proof. (1) Otherwise, we assume that . The graph arisen by deleting all edges in of and incidence with except the edges of , adding the edge , connecting all isolated vertices to the vertex (if ) or to the vertex (if ) of . Together with the definition of the Harary index and Lemma 3, , a contraction.
(2) Otherwise, we assume that . The graph is obtained from by deleting all edges in and incidence with except the edges , adding the edge , connecting all isolated vertices to the vertex . We can calculate that , a contraction.
By Claim 4 and Lemmas 1 and 3, we get . If , applying Lemma 3, (see Figure 2); if , applying Lemma 4, .
Claim 5. .
Proof. If is even, we have

If is odd, we have

By Claims 1-5, we have .
Thus the result follows.

Theorem 6. Let be defined in Section 1; the graph ; then
(1) If is even, we obtain

if and only if , the equality holds.

if and only if , the equality holds.
(2) If is odd, we have

if and only if , the equality holds.

Proof. Choose a graph , such that is as large as possible; together with Lemmas 1, 3, and 4 and Theorem 5, we have the following.
(1) If is even, or or .
In fact,

(1.1) When ,
(1.2) When ,
(2) If is odd, , so or or .

Thus the result follows.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This paper is supported by the Natural Science Foundation of China (11871077), the National Natural Science Foundation of China (11371028), the Natural Science Foundation of Anhui Province of Anhui (1808085MA04).

References

J. A. Bondy and U. S. R. Murty, Graph Theory with Application, Macmillan Press, New York, NY, USA, 1976.

O. Ivanciuc, T.-S. Balaban, and A. T. Balaban, “Design of topological indices. Part 4. Reciprocal distance matrix, related local vertex invariants and topological indices,” Journal of Mathematical Chemistry, vol. 12, no. 1-4, pp. 309–318, 1993.

D. Plavšić, S. Nikolić, N. Trinajstić, and Z. Mihalić, “On the Harary index for the characterization of chemical graphs,” Journal of Mathematical Chemistry, vol. 12, no. 1-4, pp. 235–250, 1993.

J. Fei and J. Tu, “Complete characterization of bicyclic graphs with the maximum and second-maximum degree Kirchhoff index,” Applied Mathematics and Computation, vol. 330, pp. 118–124, 2018.

J. Liu, J. Zhao, S. Wang, M. Javaid, and J. Cao, “On the Topological Properties of the Certain Neural Networks,” Journal of Artificial Intelligence and Soft Computing Research, vol. 8, no. 4, pp. 257–268, 2018.

B. Ning and B. Li, “Spectral radius and traceability of connected claw-free graphs,” Filomat, vol. 30, pp. 2445–2452, 2016.

Y. Wu and Y. Chen, “On the extremal eccentric connectivity index of graphs,” Applied Mathematics and Computation, vol. 331, pp. 61–68, 2018.

C. Wang, G. Yu, W. Sun, and J. Cao, “The Least Eigenvalue of the Graphs Whose Complements Are Connected and Have Pendent Paths,” Journal of Artificial Intelligence and Soft Computing Research, vol. 8, no. 4, pp. 303–308, 2018.

D. Chen, The Harary index of a unicyclic graph [M.S. thesis], Hunan Normal University, Changsha, China, 2009.

K. C. Das, B. Zhou, and N. Trinajstic, “Bounds on Harary index,” Journal of Mathematical Chemistry, vol. 46, no. 4, pp. 1377–1393, 2009.

L. Feng and A. Ilić, “Zagreb, Harary and hyper-Wiener indices of graphs with a given matching number,” Applied Mathematics Letters, vol. 23, no. 8, pp. 943–948, 2010.

S. He and S. Li, “On the signless Laplacian index of unicyclic graphs with fixed diameter,” Linear Algebra and its Applications, vol. 436, no. 1, pp. 252–261, 2012.

A. Ilic, G. Yu, and L. Feng, “The Harary index of trees,” Utilitas Mathematica, vol. 87, pp. 21–31, 2012.

K. Xu and N. Trinajstić, “Hyper-Wiener and Harary indices of graphs with cut edges,” Utilitas Mathematica, vol. 84, pp. 153–163, 2011.

K. Xu and K. C. Das, “Extremal unicyclic and bicyclic graphs with respect to Harary index,” Bulletin of the Malaysian Mathematical Sciences Society, vol. 36, no. 2, pp. 373–383, 2013.

Y. Nacaroglu and A. D. Maden, “On the eccentric connectivity index of unicyclic graphs,” Iranian Journal of Mathematical Chemistry, vol. 9, pp. 47–56, 2018.