# On the Harary index of graph operations

## Abstract

The Harary index is defined as the sum of reciprocals of distances between all pairs of vertices of a connected graph. In this paper, expressions for the Harary indices of the join, corona product, Cartesian product, composition and disjunction of graphs are derived and the indices for some well-known graphs are evaluated. In derivations some terms appear which are similar to the Harary index and we name them the second and third Harary index.

MSC:05C05, 05C07, 05C90.

## 1 Introduction and preliminaries

Throughout this paper we consider simple connected graphs without loops and multiple edges. Suppose that G is a graph with vertex set $V\left(G\right)=\left\{{v}_{1},{v}_{2},\dots ,{v}_{n}\right\}$ and edge set $E\left(G\right)$. The distance between the vertices ${v}_{i}$ and ${v}_{j}$ of $V\left(G\right)$ is denoted by ${d}_{G}\left({v}_{i},{v}_{j}\right)$ and it is defined as the number of edges in a minimal path connecting the vertices ${v}_{i}$ and ${v}_{j}$. The Harary index is one of very much studied topological indices and is defined as follows [1, 2]:

$H\left(G\right)=\sum _{{v}_{i},{v}_{j}\in V\left(G\right),i\ne j}\frac{1}{{d}_{G}\left({v}_{i},{v}_{j}\right)},$

where the summation goes over all unordered pairs of vertices of G. Mathematical properties and applications of H are reported in [311]. We now propose two more members of the class of Harary indices, the second Harary index and the third Harary index, which are as follows:

${H}_{1}\left(G\right)=\sum _{{v}_{i},{v}_{j}\in V\left(G\right),i\ne j}\frac{1}{{d}_{G}\left({v}_{i},{v}_{j}\right)+1}$

and

${H}_{2}\left(G\right)=\sum _{{v}_{i},{v}_{j}\in V\left(G\right),i\ne j}\frac{1}{{d}_{G}\left({v}_{i},{v}_{j}\right)+2},$

where the summation goes over all unordered pairs of the vertices of G. The Wiener index of G is defined as [12]

$W=W\left(G\right)=\sum _{\left\{{v}_{i},{v}_{j}\right\}\subseteq V}{d}_{G}\left({v}_{i},{v}_{j}\right).$

If we denote by $d\left(G,k\right)$ the number of vertex pairs of G, the distance of which is equal to k, then the Wiener index of G can be expressed as

$W\left(G\right)=\sum _{k\ge 1}kd\left(G,k\right).$

The maximum value of k, for which $d\left(G,k\right)$ is non-zero, is the diameter of the graph G, and it will be denoted by $D\left(G\right)$. The Wiener index is of certain importance in chemistry [13]. It is one of the oldest and most thoroughly studied graph-based molecular structure-descriptors (the so-called topological indices) [1214]. Numerous chemical applications of it have been reported (see, for instance, [15, 16]), and its mathematical properties are reasonably well understood [1720]. The degree of ${v}_{i}\in V\left(G\right)$, denoted by ${d}_{G}\left({v}_{i}\right)$, is the number of vertices in G adjacent to ${v}_{i}$. For other undefined notations and terminology from graph theory, the readers are referred to [21].

In [22], Khalifeh et al. computed some exact formulae for the hyper-Wiener index of the join, Cartesian product, composition, disjunction and symmetric difference of graphs. Some more properties and applications of graph products can be seen in the classical book [23].

The paper is organized as follows. In Section 2, we obtain lower and upper bounds on the Harary index of graphs. In Section 3, we give some exact expressions for the Harary index of various graph operations, such as join, corona product, Cartesian product, composition, disjunction, etc. Moreover, computations are done for some well-known graphs.

## 2 Bounds on the Harary index

We define

${H}_{t}\left(G\right)=\sum _{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t},$

where t is any non-negative real number. In this section we obtain lower and upper bounds on ${H}_{t}\left(G\right)$ of the graph G. From that we can find lower and upper bounds on the Harary index of graphs. These results are useful in the next section. We begin with the following lower and upper bounds on ${H}_{t}\left(G\right)$.

Theorem 1LetG ($\ncong {K}_{|G|}$) be a connected graph of order$|G|$, $\parallel G\parallel$edges and diameter$D\left(G\right)$. Then

${H}_{t}\left(G\right)\ge \frac{\parallel G\parallel }{t+1}+\frac{{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)}^{2}}{W\left(G\right)+\frac{|G|\left(|G|-1\right)}{2}t-\left(t+1\right)\parallel G\parallel }$
(1)

with equality holding if and only ifGis isomorphic to a graph of diameter 2. Moreover,

${H}_{t}\left(G\right)\le \frac{\parallel G\parallel }{t+1}+\frac{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left[2+\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)×\left(\frac{D\left(G\right)+t}{t+2}+\frac{t+2}{D\left(G\right)+t}\right)\right]}{2\left(W\left(G\right)+\frac{|G|\left(|G|-1\right)}{2}t-\left(t+1\right)\parallel G\parallel \right)}$
(2)

with equality holding if and only ifGis isomorphic to a graph of diameter 2.

Proof For $\left({u}_{i},{u}_{k}\right)\ne \left({u}_{j},{u}_{\ell }\right)$, $i\ne k$, $j\ne \ell$, $2\le {d}_{G}\left({u}_{i},{u}_{k}\right)\le D\left(G\right)$, $2\le {d}_{G}\left({u}_{j},{u}_{\ell }\right)\le D\left(G\right)$, we have

$2\le \left(\frac{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}{{d}_{G}\left({u}_{j},{u}_{\ell }\right)+t}+\frac{{d}_{G}\left({u}_{j},{u}_{\ell }\right)+t}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\right)\le \left(\frac{D\left(G\right)+t}{t+2}+\frac{t+2}{D\left(G\right)+t}\right).$
(3)

From the definition of the Wiener index, we have

$W\left(G\right)=\sum _{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k}{d}_{G}\left({u}_{i},{u}_{k}\right).$

Using the above, we get

$\sum _{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\left({d}_{G}\left({u}_{i},{u}_{k}\right)+t\right)=W\left(G\right)+\frac{|G|\left(|G|-1\right)}{2}t-\left(t+1\right)\parallel G\parallel .$
(4)

Now,

$\begin{array}{l}{\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\left({d}_{G}\left({u}_{i},{u}_{k}\right)+t\right){\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\\ \phantom{\rule{1em}{0ex}}=\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\\ \phantom{\rule{2em}{0ex}}+{\sum }_{\left({u}_{i},{u}_{k}\right)\ne \left({u}_{j},{u}_{\ell }\right),i\ne k,j\ne \ell ,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2,{d}_{G}\left({u}_{j},{u}_{\ell }\right)\ge 2}\left(\frac{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}{{d}_{G}\left({u}_{j},{u}_{\ell }\right)+t}+\frac{{d}_{G}\left({u}_{j},{u}_{\ell }\right)+t}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\right).\end{array}$
(5)

Using (3) in the above, we get

$\begin{array}{l}{\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\left({d}_{G}\left({u}_{i},{u}_{k}\right)+t\right){\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\\ \phantom{\rule{1em}{0ex}}\ge \left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)+\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)\phantom{\rule{1em}{0ex}}\text{by (3)}\\ \phantom{\rule{1em}{0ex}}={\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)}^{2},\end{array}$
(6)

and

$\begin{array}{l}{\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\left({d}_{G}\left({u}_{i},{u}_{k}\right)+t\right){\sum }_{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\\ \phantom{\rule{1em}{0ex}}\le \left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)+\frac{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)}{2}\\ \phantom{\rule{2em}{0ex}}×\left(\frac{D\left(G\right)+t}{t+2}+\frac{t+2}{D\left(G\right)+t}\right)\phantom{\rule{1em}{0ex}}\text{by (3)}.\end{array}$
(7)

Now,

$\begin{array}{rl}{H}_{t}\left(G\right)& =\sum _{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}\\ =\frac{\parallel G\parallel }{t+1}+\sum _{{u}_{i},{u}_{k}\in V\left(G\right),i\ne k,{d}_{G}\left({u}_{i},{u}_{k}\right)\ge 2}\frac{1}{{d}_{G}\left({u}_{i},{u}_{k}\right)+t}.\end{array}$

Using (4), (6) and (7) in the above, we get the lower bound in (1) and upper bound in (2) on ${H}_{t}\left(G\right)$ of the graph G.

Now suppose that the equality holds in (1) and (2). Then all inequalities in the above argument must be equalities. For the lower bound, we must have

For the upper bound, we must have

Thus G is isomorphic to a graph of diameter 2.

Conversely, one can see easily that both equalities hold in (1) and (2) for graphs of diameter 2. □

Corollary 1LetG ($\ncong {K}_{|G|}$) be a connected graph of order$|G|$, $\parallel G\parallel$edges and diameter$D\left(G\right)$. Then

${H}_{1}\left(G\right)\ge \frac{\parallel G\parallel }{2}+\frac{{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)}^{2}}{W\left(G\right)-2\parallel G\parallel +\frac{|G|\left(|G|-1\right)}{2}}$

with equality holding if and only ifGis isomorphic to a graph of diameter 2. Moreover,

${H}_{1}\left(G\right)\le \frac{\parallel G\parallel }{2}+\frac{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left[2+\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)×\left(\frac{D\left(G\right)+1}{3}+\frac{3}{D\left(G\right)+1}\right)\right]}{2\left(W\left(G\right)+\frac{|G|\left(|G|-1\right)}{2}-2\parallel G\parallel \right)}$

with equality holding if and only ifGis isomorphic to a graph of diameter 2.

Proof Putting $t=1$ in (1) and (2), we get the required result. By Theorem 1, we have that both equalities hold if and only if G is isomorphic to a graph of diameter 2. □

Corollary 2LetG ($\ncong {K}_{|G|}$) be a connected graph of order$|G|$, $\parallel G\parallel$edges and diameter$D\left(G\right)$. Then

${H}_{2}\left(G\right)\ge \frac{\parallel G\parallel }{3}+\frac{{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)}^{2}}{W\left(G\right)-3\parallel G\parallel +|G|\left(|G|-1\right)}$

with equality holding if and only ifGis isomorphic to a graph of diameter 2. Moreover,

${H}_{2}\left(G\right)\le \frac{\parallel G\parallel }{3}+\frac{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left[2+\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)×\left(\frac{D\left(G\right)+2}{4}+\frac{4}{D\left(G\right)+2}\right)\right]}{2\left(W\left(G\right)+|G|\left(|G|-1\right)-3\parallel G\parallel \right)}$

with equality holding if and only ifGis isomorphic to a graph of diameter 2.

Proof Putting $t=2$ in (1) and (2), we get the required result. By Theorem 1, we have that both equalities hold if and only if G is isomorphic to a graph of diameter 2. □

From the above Theorem 1, we get the lower and upper bounds on the Harary index of graphs.

Theorem 2LetG ($\ncong {K}_{|G|}$) be a connected graph of order$|G|$, $\parallel G\parallel$edges and diameter$D\left(G\right)$. Then

$H\left(G\right)\ge \parallel G\parallel +\frac{{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)}^{2}}{W\left(G\right)-\parallel G\parallel }$

with equality holding if and only ifGis isomorphic to a graph of diameter 2. Moreover,

$H\left(G\right)\le \parallel G\parallel +\frac{\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel \right)\left[2+\left(\frac{|G|\left(|G|-1\right)}{2}-\parallel G\parallel -1\right)×\left(\frac{D\left(G\right)}{2}+\frac{2}{D\left(G\right)}\right)\right]}{2\left(W\left(G\right)-\parallel G\parallel \right)}$

with equality holding if and only ifGis isomorphic to a graph of diameter 2.

Proof Putting $t=0$ in (1) and (2), we get the required result. By Theorem 1, we have that both equalities hold if and only if G is isomorphic to a graph of diameter 2. □

## 3 Harary index of graph operations

In this section, some exact formulae for the Harary index of some graph operations are presented.

Let ${G}_{1}$ and ${G}_{2}$ be two graphs with $|{G}_{1}|$ and $|{G}_{2}|$ vertices, and $\parallel {G}_{1}\parallel$ and $\parallel {G}_{1}\parallel$ edges, respectively. The join ${G}_{1}\vee {G}_{2}$ of graphs ${G}_{1}$ and ${G}_{2}$ with disjoint vertex sets $V\left({G}_{1}\right)$ and $V\left({G}_{2}\right)$, and edge sets $E\left({G}_{1}\right)$ and $E\left({G}_{2}\right)$ is the graph union ${G}_{1}\cup {G}_{2}$ together with all the edges joining $V\left({G}_{1}\right)$ and $V\left({G}_{2}\right)$. Thus, for example, ${\overline{K}}_{p}\vee {\overline{K}}_{q}={K}_{p,q}$, the complete bipartite graph.

Theorem 3Let${G}_{1}$and${G}_{2}$be two graphs. Then

$H\left({G}_{1}\vee {G}_{2}\right)=\frac{1}{2}\left(|{G}_{1}||{G}_{2}|+\parallel {G}_{1}\parallel +\parallel {G}_{2}\parallel \right)+\frac{1}{4}\left(|{G}_{1}|+|{G}_{2}|\right)\left(|{G}_{1}|+|{G}_{2}|-1\right).$

Proof By the definition of the Harary index, we have

□

For two cycles ${C}_{m}$ and ${C}_{n}$, we have the following.

Example 1

$\begin{array}{rcl}H\left({C}_{m}\vee {C}_{n}\right)& =& \frac{1}{2}\left(mn+m+n\right)+\frac{1}{4}\left(m+n\right)\left(m+n-1\right)\\ =& \frac{1}{4}\left({m}^{2}+{n}^{2}\right)+mn+\frac{1}{4}\left(m+n\right).\end{array}$

The corona product ${G}_{1}\circ {G}_{2}$ of two graphs ${G}_{1}$ and ${G}_{2}$ is defined to be the graph Γ obtained by taking one copy of ${G}_{1}$ (which has $|{G}_{1}|$ vertices) and $|{G}_{1}|$ copies of ${G}_{2}$, and then joining the i th vertex of ${G}_{1}$ to every vertex in the i th copy of ${G}_{2}$, $i=1,2,\dots ,|{G}_{1}|$. Let ${G}_{1}=\left(V,E\right)$ and ${G}_{2}=\left(V,E\right)$ be two graphs such that $V\left({G}_{1}\right)=\left\{{u}_{1},{u}_{2},\dots ,{u}_{{p}_{1}}\right\}$, ${p}_{1}=|{G}_{1}|$, $|E\left({G}_{1}\right)|=\parallel {G}_{1}\parallel$ and $V\left({G}_{2}\right)=\left\{{v}_{1},{v}_{2},\dots ,{v}_{{p}_{2}}\right\}$, ${p}_{2}=|{G}_{2}|$, $|E\left({G}_{2}\right)|=\parallel {G}_{2}\parallel$. Then it follows from the definition of the corona that ${G}_{1}\circ {G}_{2}$ has $|{G}_{1}|\left(1+|{G}_{2}|\right)$ vertices and $\parallel {G}_{1}\parallel +|{G}_{1}|\parallel {G}_{2}\parallel +|{G}_{1}||{G}_{2}|$ edges, where

$\begin{array}{c}V\left({G}_{1}\circ {G}_{2}\right)=\left\{\left({u}_{i},{v}_{j}\right),i=1,2,\dots ,|{G}_{1}|;j=0,1,2\dots ,|{G}_{2}|\right\}\phantom{\rule{1em}{0ex}}\text{and}\hfill \\ E\left({G}_{1}\circ {G}_{2}\right)=\left\{\left(\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{0}\right)\right),\left({u}_{i},{u}_{k}\right)\in E\left({G}_{1}\right)\right\}\hfill \\ \phantom{E\left({G}_{1}\circ {G}_{2}\right)=}\cup \left\{\left(\left({u}_{i},{v}_{j}\right),\left({u}_{i},{v}_{\ell }\right)\right),\left({v}_{j},{v}_{\ell }\right)\in E\left({G}_{2}\right),i=1,2,\dots ,|{G}_{1}|\right\}\hfill \\ \phantom{E\left({G}_{1}\circ {G}_{2}\right)=}\cup \left\{\left(\left({u}_{i},{v}_{0}\right),\left({u}_{i},{v}_{\ell }\right)\right),\ell =1,2,\dots ,|{G}_{2}|,i=1,2,\dots ,|{G}_{1}|\right\}.\hfill \end{array}$

It is clear that if ${G}_{1}$ is connected, then ${G}_{1}\circ {G}_{2}$ is connected, and in general ${G}_{1}\circ {G}_{2}$ is not isomorphic to ${G}_{2}\circ {G}_{1}$.

Theorem 4The Harary index of the corona product is computed as follows:

$H\left({G}_{1}\circ {G}_{2}\right)=H\left({G}_{1}\right)+|{G}_{2}|{H}_{1}\left({G}_{1}\right)+{|{G}_{2}|}^{2}{H}_{2}\left({G}_{1}\right)+\frac{1}{4}\left(|{G}_{2}|+3\right)|{G}_{1}||{G}_{2}|+\frac{1}{2}|{G}_{1}|\parallel {G}_{2}\parallel ,$

where${H}_{1}\left({G}_{1}\right)={\sum }_{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),{u}_{i}\ne {u}_{k}}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+1}$and${H}_{2}\left({G}_{1}\right)={\sum }_{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),{u}_{i}\ne {u}_{k}}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+2}$.

Proof Note that

By the definition of the Harary index, we have

$\begin{array}{rcl}H\left({G}_{1}\circ {G}_{2}\right)& =& \sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),\left({u}_{i},{v}_{j}\right)\ne \left({u}_{k},{v}_{\ell }\right)}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ =& \sum _{\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{0}\right)\in V\left({G}_{1}\circ {G}_{2}\right),i\ne k}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{0}\right)\right)}\\ +\sum _{\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),\ell \ne 0}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ +\sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),\left({u}_{i},{v}_{j}\right)\ne \left({u}_{k},{v}_{\ell }\right),j\ne 0\ne \ell }\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ =& \sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)}\\ +\sum _{\left({u}_{i},{v}_{0}\right),\left({u}_{i},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),\ell \ne 0}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{0}\right),\left({u}_{i},{v}_{\ell }\right)\right)}\\ +\sum _{\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),\ell \ne 0,i\ne k}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{0}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ +\sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{i},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),0\ne j\ne \ell \ne 0}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{i},{v}_{\ell }\right)\right)}\\ +\sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\circ {G}_{2}\right),j\ne 0\ne \ell ,i\ne k}\frac{1}{{d}_{{G}_{1}\circ {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ =& H\left({G}_{1}\right)+\sum _{{u}_{i}\in V\left({G}_{1}\right)}|{G}_{2}|+\sum _{{v}_{j}\in V\left({G}_{2}\right)}\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+1}\\ +\sum _{{u}_{i}\in V\left({G}_{1}\right)}\frac{1}{2}\sum _{j=1}^{|{G}_{2}|}\left[{d}_{{G}_{2}}\left({v}_{j}\right)+\frac{1}{2}\left(|{G}_{2}|-{d}_{{G}_{2}}\left({v}_{j}\right)-1\right)\right]\\ +\sum _{{v}_{j}\in V\left({G}_{2}\right)}\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{|{G}_{2}|}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+2}\\ =& H\left({G}_{1}\right)+|{G}_{1}||{G}_{2}|+|{G}_{2}|\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+1}\\ +\frac{1}{4}|{G}_{1}|\sum _{j=1}^{|{G}_{2}|}\left(|{G}_{2}|+{d}_{{G}_{2}}\left({v}_{j}\right)-1\right)+{|{G}_{2}|}^{2}\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+2}\\ =& H\left({G}_{1}\right)+|{G}_{2}|{H}_{1}\left({G}_{1}\right)+{|{G}_{2}|}^{2}{H}_{2}\left({G}_{1}\right)\\ +\frac{1}{4}\left(|{G}_{2}|+3\right)|{G}_{1}||{G}_{2}|+\frac{1}{2}|{G}_{1}|\parallel {G}_{2}\parallel .\end{array}$

□

Theorem 5Let${G}_{1}$ ($\ncong {K}_{|{G}_{1}|}$) and${G}_{2}$be two connected graphs with diameter of${G}_{1}$, $D\left({G}_{1}\right)$. Then the lower and upper bounds on the Harary index of the corona product are as follows:

$\begin{array}{c}H\left({G}_{1}\circ {G}_{2}\right)\hfill \\ \phantom{\rule{1em}{0ex}}\ge \left[\frac{1}{W\left({G}_{1}\right)-\parallel {G}_{1}\parallel }+\frac{|{G}_{2}|}{W\left({G}_{1}\right)-2\parallel {G}_{1}\parallel +\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}}\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{{|{G}_{2}|}^{2}}{W\left({G}_{1}\right)-3\parallel {G}_{1}\parallel +|{G}_{1}|\left(|{G}_{1}|-1\right)}\right]\hfill \\ \phantom{\rule{2em}{0ex}}×{\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)}^{2}+\parallel {G}_{1}\parallel \left(1+\frac{|{G}_{2}|}{2}+\frac{{|{G}_{2}|}^{2}}{3}\right)\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{1}{4}\left(|{G}_{2}|+3\right)|{G}_{1}||{G}_{2}|+\frac{1}{2}|{G}_{1}|\parallel {G}_{2}\parallel \hfill \end{array}$

with equality holding if and only if${G}_{1}$is isomorphic to a graph of diameter 2. Moreover,

$\begin{array}{c}H\left({G}_{1}\circ {G}_{2}\right)\hfill \\ \phantom{\rule{1em}{0ex}}\le \left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)×\left[\frac{2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel -1\right)\left(\frac{D\left({G}_{1}\right)}{2}+\frac{2}{D\left({G}_{1}\right)}\right)}{2\left(W\left({G}_{1}\right)-\parallel {G}_{1}\parallel \right)}\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{|{G}_{2}|\left(2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel -1\right)\left(\frac{D\left({G}_{1}\right)+1}{3}+\frac{3}{D\left({G}_{1}\right)+1}\right)\right)}{2\left(W\left({G}_{1}\right)-2\parallel {G}_{1}\parallel +\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}\right)}\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{{|{G}_{2}|}^{2}\left(2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel -1\right)\left(\frac{D\left({G}_{1}\right)+2}{4}+\frac{4}{D\left({G}_{1}\right)+2}\right)\right)}{2\left(W\left({G}_{1}\right)-3\parallel {G}_{1}\parallel +|{G}_{1}|\left(|{G}_{1}|-1\right)\right)}\right]\hfill \\ \phantom{\rule{2em}{0ex}}+\parallel {G}_{1}\parallel \left(1+\frac{|{G}_{2}|}{2}+\frac{{|{G}_{2}|}^{2}}{3}\right)+\frac{1}{4}\left(|{G}_{2}|+3\right)|{G}_{1}||{G}_{2}|+\frac{1}{2}|{G}_{1}|\parallel {G}_{2}\parallel \hfill \end{array}$

with equality holding if and only if${G}_{1}$is isomorphic to a graph of diameter 2.

Proof Using Corollaries 1 and 2 with Theorem 2, from Theorem 4, we get the lower and upper bounds on the Harary index of the corona product. Moreover, the equality holds if and only if ${G}_{1}$ is isomorphic to a graph of diameter 2. □

Given a graph G with vertex set $V=\left\{{v}_{1},{v}_{2},\dots ,{v}_{n}\right\}$, the thorn graph $G\left({p}_{1},{p}_{2},\dots ,{p}_{n}\right)$ first introduced by Gutman [24], is a graph obtained by attaching ${p}_{i}$ pendent vertices to vertex ${v}_{i}$ for $i=1,2,\dots ,n$. In particular, if ${p}_{1}={p}_{2}=\cdots ={p}_{n}=p$, we denote by ${G}^{\left(p\right)}$ the thorn graph $G\left({p}_{1},{p}_{2},\dots ,{p}_{n}\right)$ for short. Recall the definition of the corona product, the graph ${G}^{\left(p\right)}\cong G\circ \overline{{K}_{p}}$, where $\overline{{K}_{p}}$ denotes the complement of a complete graph ${K}_{p}$. Therefore, for a connected graph G of order n, we have the following.

Example 2

$H\left({G}^{\left(p\right)}\right)=H\left(G\circ \overline{{K}_{p}}\right)=H\left(G\right)+p{H}_{1}\left(G\right)+{p}^{2}{H}_{2}\left({G}_{1}\right)+\frac{1}{4}\left(p+3\right)np.$

The Cartesian product ${G}_{1}×{G}_{2}$ of graphs ${G}_{1}$ and ${G}_{2}$ has the vertex set $V\left({G}_{1}×{G}_{2}\right)=V\left({G}_{1}\right)×V\left({G}_{2}\right)$ and $\left({u}_{i},{v}_{j}\right)\left({u}_{k},{v}_{\ell }\right)$ is an edge of ${G}_{1}×{G}_{2}$ if ${u}_{i}={u}_{k}$ and ${v}_{j}{v}_{\ell }\in E\left({G}_{2}\right)$, or ${u}_{i}{u}_{k}\in E\left({G}_{1}\right)$ and ${v}_{j}={v}_{\ell }$.

Theorem 6Let${G}_{1}$and${G}_{2}$be two connected graphs with diameter$D\left({G}_{2}\right)$of the graph${G}_{2}$. Then

$\begin{array}{l}|{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)+|{G}_{2}|\left(|{G}_{2}|-1\right){H}_{D}\left({G}_{1}\right)\\ \phantom{\rule{1em}{0ex}}\le H\left({G}_{1}×{G}_{2}\right)\\ \phantom{\rule{1em}{0ex}}\le |{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)+|{G}_{2}|\left(|{G}_{2}|-1\right){H}_{1}\left({G}_{1}\right),\end{array}$
(8)

where

$\begin{array}{r}{H}_{D}\left({G}_{1}\right)=\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+D\left({G}_{2}\right)}\phantom{\rule{1em}{0ex}}\mathit{\text{and}}\\ {H}_{1}\left({G}_{1}\right)=\sum _{{u}_{i},{u}_{k}\in V\left({G}_{1}\right),i\ne k}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+1}.\end{array}$

Moreover, both sides of the equality hold in (8) if and only if${G}_{2}$is isomorphic to a complete graph of order$|{G}_{2}|$.

Proof By the definition of the Harary index, we have

(9)

where ${H}_{1}\left({G}_{1}\right)$ is given in the statement of the theorem. Since ${d}_{{G}_{2}}\left({v}_{j},{v}_{\ell }\right)\le D\left({G}_{2}\right)$, similarly, we get

$\begin{array}{rcl}H\left({G}_{1}×{G}_{2}\right)& \ge & |{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)\\ +\sum _{\left({u}_{i},{u}_{k}\right)\in V\left({G}_{1}\right)}\sum _{\left({v}_{j},{v}_{\ell }\right)\in V\left({G}_{2}\right)}\frac{1}{{d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)+D\left({G}_{2}\right)}\\ =& |{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)+|{G}_{2}|\left(|{G}_{2}|-1\right){H}_{D}\left({G}_{1}\right),\end{array}$

where ${H}_{D}\left({G}_{1}\right)$ is given in the statement of the theorem. The first part of the proof is over.

Suppose that both sides of the equality hold in (8). Then we must have ${d}_{{G}_{2}}\left({v}_{j},{v}_{\ell }\right)=1$, ${v}_{j}\ne {v}_{\ell }$, for all ${v}_{j},{v}_{\ell }\in V\left({G}_{2}\right)$ or ${d}_{{G}_{2}}\left({v}_{j},{v}_{\ell }\right)=D\left({G}_{2}\right)$, ${v}_{j}\ne {v}_{\ell }$, for all ${v}_{j},{v}_{\ell }\in V\left({G}_{2}\right)$. Hence ${G}_{2}$ is isomorphic to a complete graph of order $|{G}_{2}|$.

Conversely, one can see easily that (8) holds for ${G}_{2}$, a complete graph of order $|{G}_{2}|$. This completes the proof. □

Theorem 7Let${G}_{1}$ ($\ncong {K}_{|{G}_{1}|}$) and${G}_{2}$ ($\ncong {K}_{|{G}_{2}|}$) be two connected graphs with diameter$D\left({G}_{1}\right)$of the graph${G}_{1}$and$D\left({G}_{2}\right)$of the graph${G}_{2}$. Then

$\begin{array}{rcl}H\left({G}_{1}×{G}_{2}\right)& >& |{G}_{1}|\parallel {G}_{2}\parallel +|{G}_{2}|\parallel {G}_{1}\parallel +\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)\parallel {G}_{1}\parallel }{D\left({G}_{2}\right)+1}+\frac{{\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel \right)}^{2}|{G}_{1}|}{W\left({G}_{2}\right)-\parallel {G}_{2}\parallel }\\ +\left[\frac{|{G}_{2}|}{W\left({G}_{1}\right)-\parallel {G}_{1}\parallel }+\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{W\left({G}_{1}\right)+\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}D\left({G}_{2}\right)-\left(D\left({G}_{2}\right)+1\right)\parallel {G}_{1}\parallel }\right]\\ ×{\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)}^{2}.\end{array}$

Moreover,

$\begin{array}{rcl}H\left({G}_{1}×{G}_{2}\right)& <& |{G}_{1}|\parallel {G}_{2}\parallel +|{G}_{2}|\parallel {G}_{1}\parallel +\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)\parallel {G}_{1}\parallel }{2}\\ +\frac{|{G}_{1}|\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel \right)\left[2+\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel \right)×\left(\frac{D\left({G}_{2}\right)}{2}+\frac{2}{D\left({G}_{2}\right)}\right)\right]}{2\left(W\left({G}_{2}\right)-\parallel {G}_{2}\parallel \right)}\\ +\left[\frac{|{G}_{2}|\left(2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel -1\right)\left(\frac{D\left({G}_{1}\right)}{2}+\frac{2}{D\left({G}_{1}\right)}\right)\right)}{2\left(W\left({G}_{1}\right)-\parallel {G}_{1}\parallel \right)}\\ +\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)\left(2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel -1\right)\left(\frac{D\left({G}_{1}\right)+1}{3}+\frac{3}{D\left({G}_{1}\right)+1}\right)\right)}{2\left(W\left({G}_{1}\right)+\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-2\parallel {G}_{1}\parallel \right)}\right]\\ ×\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right).\end{array}$

Proof Using Theorems 1 and 2 with Corollary 1 in Theorem 6, we get the lower and upper bounds on the Cartesian product ${G}_{1}×{G}_{2}$ of the graphs ${G}_{1}$ and ${G}_{2}$. Moreover, both inequalities are strict as ${G}_{1}\ncong {K}_{|{G}_{1}|}$, ${G}_{2}\ncong {K}_{|{G}_{2}|}$ and by Theorem 6. □

Theorem 8Let${G}_{1}$and${G}_{2}$be two connected graphs with diameter$D\left({G}_{1}\right)$of the graph${G}_{1}$. Then

$\begin{array}{l}|{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)+|{G}_{1}|\left(|{G}_{1}|-1\right){H}_{D}\left({G}_{2}\right)\\ \phantom{\rule{1em}{0ex}}\le H\left({G}_{1}×{G}_{2}\right)\\ \phantom{\rule{1em}{0ex}}\le |{G}_{1}|H\left({G}_{2}\right)+|{G}_{2}|H\left({G}_{1}\right)+|{G}_{1}|\left(|{G}_{1}|-1\right){H}_{1}\left({G}_{2}\right),\end{array}$
(10)

where

$\begin{array}{c}{H}_{D}\left({G}_{2}\right)=\sum _{{v}_{j},{v}_{\ell }\in V\left({G}_{2}\right),j\ne \ell }\frac{1}{{d}_{{G}_{2}}\left({v}_{j},{v}_{\ell }\right)+D\left({G}_{1}\right)}\phantom{\rule{1em}{0ex}}\mathit{\text{and}}\hfill \\ {H}_{1}\left({G}_{2}\right)=\sum _{{v}_{j},{v}_{\ell }\in V\left({G}_{1}\right),j\ne \ell }\frac{1}{{d}_{{G}_{2}}\left({v}_{j},{v}_{\ell }\right)+1}.\hfill \end{array}$

Moreover, both sides of the equality hold in (10) if and only if${G}_{1}$is isomorphic to a complete graph of order$|{G}_{1}|$.

Proof Since $1\le {d}_{{G}_{1}}\left({u}_{i},{u}_{k}\right)\le D\left({G}_{1}\right)$, $i\ne k$, from (9) we get the required result in (10). Moreover, both sides of the equality hold in (10) if and only if ${G}_{1}$ is isomorphic to a complete graph of order $|{G}_{1}|$. □

Theorem 9Let${G}_{1}$ ($\ncong {K}_{|{G}_{1}|}$) and${G}_{2}$ ($\ncong {K}_{|{G}_{2}|}$) be two connected graphs with diameter$D\left({G}_{1}\right)$of the graph${G}_{1}$and$D\left({G}_{2}\right)$of the graph${G}_{2}$. Then

$\begin{array}{rcl}H\left({G}_{1}×{G}_{2}\right)& >& |{G}_{1}|\parallel {G}_{2}\parallel +|{G}_{2}|\parallel {G}_{1}\parallel +\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)\parallel {G}_{2}\parallel }{D\left({G}_{1}\right)+1}\\ +\frac{{\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)}^{2}|{G}_{2}|}{W\left({G}_{1}\right)-\parallel {G}_{1}\parallel }\\ +\left[\frac{|{G}_{1}|}{W\left({G}_{2}\right)-\parallel {G}_{2}\parallel }+\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{W\left({G}_{2}\right)+\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}D\left({G}_{1}\right)-\left(D\left({G}_{1}\right)+1\right)\parallel {G}_{2}\parallel }\right]\\ ×{\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel \right)}^{2}.\end{array}$

Moreover,

$\begin{array}{rcl}H\left({G}_{1}×{G}_{2}\right)& <& |{G}_{1}|\parallel {G}_{2}\parallel +|{G}_{2}|\parallel {G}_{1}\parallel +\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)\parallel {G}_{2}\parallel }{2}\\ +\frac{|{G}_{2}|\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)\left[2+\left(\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)}{2}-\parallel {G}_{1}\parallel \right)×\left(\frac{D\left({G}_{1}\right)}{2}+\frac{2}{D\left({G}_{1}\right)}\right)\right]}{2\left(W\left({G}_{1}\right)-\parallel {G}_{1}\parallel \right)}\\ +\left[\frac{|{G}_{1}|\left(2+\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel -1\right)\left(\frac{D\left({G}_{2}\right)}{2}+\frac{2}{D\left({G}_{2}\right)}\right)\right)}{2\left(W\left({G}_{2}\right)-\parallel {G}_{2}\parallel \right)}\\ +\frac{|{G}_{1}|\left(|{G}_{1}|-1\right)\left(2+\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel -1\right)\left(\frac{D\left({G}_{2}\right)+1}{3}+\frac{3}{D\left({G}_{2}\right)+1}\right)\right)}{2\left(W\left({G}_{2}\right)+\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-2\parallel {G}_{2}\parallel \right)}\right]\\ ×\left(\frac{|{G}_{2}|\left(|{G}_{2}|-1\right)}{2}-\parallel {G}_{2}\parallel \right).\end{array}$

Proof Using Theorems 1 and 2 with Corollary 1 in Theorem 8, we get the lower and upper bound on the Cartesian product ${G}_{1}×{G}_{2}$ of graphs ${G}_{1}$ and ${G}_{2}$. Moreover, both inequalities are strict as ${G}_{1}\ncong {K}_{|{G}_{1}|}$, ${G}_{2}\ncong {K}_{|{G}_{2}|}$ and by Theorem 8. □

Corollary 3LetGbe a connected graph of order$|G|$. Then

$H\left(G×{K}_{2}\right)=2H\left(G\right)+|G|+2{H}_{1}\left(G\right),$

where${H}_{1}\left(G\right)={\sum }_{{v}_{i},{v}_{j}\in V\left(G\right),i\ne j}\frac{1}{{d}_{G}\left({v}_{i},{v}_{j}\right)+1}$.

Proof Choosing ${G}_{1}=G$ and ${G}_{2}={K}_{2}$ in Theorem 6, this theorem follows immediately. □

The lattice graph ${L}_{2,n}$ (see [25]) is just ${P}_{n}×{K}_{2}$. It is well known that [2]$H\left({P}_{n}\right)=n{\sum }_{i=1}^{n-1}\frac{1}{i}-n+1$. So, we have the following example.

Example 3

$\begin{array}{rl}H\left({L}_{2,n}\right)& =2H\left({P}_{n}\right)+n+2{H}_{1}\left({P}_{n}\right)=2n\sum _{i=1}^{n-1}\frac{1}{i}-2n+2+n+2{H}_{1}\left({P}_{n}\right)\\ =4n\sum _{i=3}^{n-1}\frac{1}{i}+n+6.\end{array}$

The composition (also called lexicographic product [26]) $G={G}_{1}\left[{G}_{2}\right]$ of graphs ${G}_{1}$ and ${G}_{2}$ with disjoint vertex sets $V\left({G}_{1}\right)$ and $V\left({G}_{2}\right)$ and edge sets $E\left({G}_{1}\right)$ and $E\left({G}_{2}\right)$ is the graph with vertex set $V\left({G}_{1}\right)×V\left({G}_{2}\right)$ and $\left({u}_{i},{v}_{j}\right)$ is adjacent with $\left({u}_{k},{v}_{\ell }\right)$ whenever ${u}_{i}$ is adjacent with ${u}_{k}$, or ${u}_{i}={u}_{k}$ and ${v}_{j}$ is adjacent with ${v}_{\ell }$.

Theorem 10Let${G}_{1}$and${G}_{2}$be two connected graphs. Then

$H\left({G}_{1}\left[{G}_{2}\right]\right)=\frac{1}{4}|{G}_{1}||{G}_{2}|\left(|{G}_{2}|-1\right)+\frac{1}{2}|{G}_{1}|\parallel {G}_{2}\parallel +{|{G}_{2}|}^{2}H\left({G}_{1}\right).$

Proof By the definition of the Harary index, we have

□

The double graph of a given graph G, denoted by ${G}^{⊛}$, is constructed by making two copies of G (including the initial edge set of each), denoted by ${G}_{1}$ and ${G}_{2}$, and adding edges ${u}_{1}{v}_{2}$ and ${u}_{2}{v}_{1}$ for every edge uv of G. From the definition of composition, we conclude that ${G}^{⊛}\cong G\left[{K}_{2}\right]$ for any connected graph G. Therefore the following corollary can be easily obtained.

Corollary 4LetGbe a connected graph. Then

$H\left(G\left[{K}_{2}\right]\right)=\frac{3|G|}{2}+4H\left(G\right).$

For a complete graph ${K}_{n}$, we find that ${K}_{n}^{⊛}$ is a graph obtained by deleting a perfect matching from the complete graph ${K}_{2n}$, which is just the well-known cocktail party graph (see [27]).

Example 4

$H\left({K}_{n}^{⊛}\right)=\frac{3n}{2}+4H\left({K}_{n}\right)=2{n}^{2}-\frac{n}{2}.$

The disjunction ${G}_{1}\otimes {G}_{2}$ of graphs ${G}_{1}$ and ${G}_{2}$ is the graph with vertex set $V\left({G}_{1}\right)×V\left({G}_{2}\right)$ and $\left({u}_{i},{v}_{j}\right)$ is adjacent with $\left({u}_{k},{v}_{\ell }\right)$ whenever ${u}_{i}{u}_{k}\in E\left({G}_{1}\right)$ or ${v}_{j}{v}_{\ell }\in E\left({G}_{2}\right)$.

Theorem 11Let${G}_{1}$and${G}_{2}$be two connected graphs. Then

$H\left({G}_{1}\otimes {G}_{2}\right)=\frac{1}{4}|{G}_{1}||{G}_{2}|\left(|{G}_{1}||{G}_{2}|-1\right)+\frac{1}{2}\left(\parallel {G}_{1}\parallel {|{G}_{2}|}^{2}+\parallel {G}_{2}\parallel {|{G}_{1}|}^{2}\right)-\parallel {G}_{1}\parallel \parallel {G}_{2}\parallel .$

Proof In [22], it has been proved that

(11)

Moreover, it has been showed that

$\begin{array}{l}|\left\{v\in V\left({G}_{1}\otimes {G}_{2}\right)|{d}_{{G}_{1}\otimes {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),v\right)=1\right\}|\\ \phantom{\rule{1em}{0ex}}={d}_{{G}_{1}}\left({u}_{i}\right)|{G}_{2}|+{d}_{{G}_{2}}\left({v}_{j}\right)|{G}_{1}|-{d}_{{G}_{1}}\left({u}_{i}\right){d}_{{G}_{2}}\left({v}_{j}\right).\end{array}$
(12)

By the definition of the Harary index, we have

$\begin{array}{rcl}H\left({G}_{1}\otimes {G}_{2}\right)& =& \sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({G}_{1}\otimes {G}_{2}\right),\left({u}_{i},{v}_{j}\right)\ne \left({u}_{k},{v}_{\ell }\right)}\frac{1}{{d}_{{G}_{1}\otimes {G}_{2}}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ =& \frac{1}{2}\sum _{\left({u}_{i},{v}_{j}\right)\in V\left({G}_{1}\otimes {G}_{2}\right)}\left[{d}_{{G}_{1}\otimes {G}_{2}}\left(\left({u}_{i},{v}_{j}\right)\right)+\frac{1}{2}\left(|{G}_{1}||{G}_{2}|-{d}_{{G}_{1}\otimes {G}_{2}}\left(\left({u}_{i},{v}_{j}\right)\right)-1\right)\right]\\ \text{by (11)}\\ =& \frac{1}{4}|{G}_{1}||{G}_{2}|\left(|{G}_{1}||{G}_{2}|-1\right)\\ +\frac{1}{4}\sum _{\left({u}_{i},{v}_{j}\right)\in V\left({G}_{1}\otimes {G}_{2}\right)}\left({d}_{{G}_{1}}\left({u}_{i}\right)|{G}_{2}|+{d}_{{G}_{2}}\left({v}_{j}\right)|{G}_{1}|-{d}_{{G}_{1}}\left({u}_{i}\right){d}_{{G}_{2}}\left({v}_{j}\right)\right)\phantom{\rule{1em}{0ex}}\text{by (12)}\\ =& \frac{1}{4}|{G}_{1}||{G}_{2}|\left(|{G}_{1}||{G}_{2}|-1\right)\\ +\frac{1}{4}\sum _{{u}_{i}\in V\left({G}_{1}\right)}\sum _{{v}_{j}\in V\left({G}_{2}\right)}\left({d}_{{G}_{1}}\left({u}_{i}\right)|{G}_{2}|+{d}_{{G}_{2}}\left({v}_{j}\right)|{G}_{1}|-{d}_{{G}_{1}}\left({u}_{i}\right){d}_{{G}_{2}}\left({v}_{j}\right)\right)\\ =& \frac{1}{4}|{G}_{1}||{G}_{2}|\left(|{G}_{1}||{G}_{2}|-1\right)+\frac{1}{2}\left(\parallel {G}_{1}\parallel {|{G}_{2}|}^{2}+\parallel {G}_{2}\parallel {|{G}_{1}|}^{2}\right)-\parallel {G}_{1}\parallel \parallel {G}_{2}\parallel .\end{array}$

□

The construction of the extended double cover was introduced by Alon [28] in 1986. For a simple graph G with vertex set $V=\left\{{v}_{1},{v}_{2},\dots ,{v}_{n}\right\}$, the extended double cover of G, denoted by ${G}^{\star }$, is the bipartite graph with bipartition $\left(X;Y\right)$ where $X=\left\{{x}_{1},{x}_{2},\dots ,{x}_{n}\right\}$ and $Y=\left\{{y}_{1},{y}_{2},\dots ,{y}_{n}\right\}$, in which ${x}_{i}$ and ${y}_{j}$ are adjacent if and only if $i=j$ or ${v}_{i}$ and ${v}_{j}$ are adjacent in G. Note that for a graph G, ${G}^{\star }\cong G\otimes {K}_{2}$. So, the corollary below follows immediately.

Corollary 5LetGbe a connected graph of ordern. Then

$H\left(G\otimes {K}_{2}\right)=\frac{1}{2}n\left(2n-1\right)+\frac{1}{2}\left(4\parallel G\parallel +{n}^{2}\right)-\parallel G\parallel .$

For a complete graph ${K}_{n}$, by the definition listed above, we find that ${K}_{n}\otimes {K}_{2}$ is just ${K}_{n,n}$.

Example 5

$H\left({K}_{n}\otimes {K}_{2}\right)=\frac{1}{2}n\left(2n-1\right)+\frac{1}{2}\left(4\parallel {K}_{n}\parallel +{n}^{2}\right)-\parallel {K}_{n}\parallel =2{n}^{2}-n.$

Let $G=\left(V,E\right)$ be a connected graph of $|G|$ vertices with $\parallel G\parallel$ edges. If we put two similar graphs G side by side, and any vertex of the first graph G is connected by edges with those vertices which are adjacent to the corresponding vertex of the second graph G and the resultant graph is denoted by ${K}_{2}\uplus G$, then we have $|{K}_{2}\uplus G|=2|G|$ and $\parallel {K}_{2}\uplus G\parallel =\parallel G\parallel +\parallel G\parallel +2\parallel G\parallel =4\parallel G\parallel$. Moreover, ${K}_{2}\uplus G$ is the graph of ${K}_{2}$ and G with the vertex set $V\left({K}_{2}×G\right)=V\left({K}_{2}\right)×V\left(G\right)$ and $\left({u}_{i},{v}_{j}\right)\left({u}_{k},{v}_{\ell }\right)$ is an edge of ${K}_{2}×G$ whenever (${u}_{i}={u}_{k}$ and ${v}_{j}$ is adjacent with ${v}_{\ell }$) or (${u}_{i}\ne {u}_{k}$ and ${v}_{j}$ is adjacent with ${v}_{\ell }$).

Theorem 12LetGbe a connected graph. Then

$H\left({K}_{2}\uplus G\right)=4H\left(G\right)+\frac{|G|}{2}.$

Proof By the definition of the Harary index, we have

□

Let $G=\left(V,E\right)$ be a connected graph of $|G|$ vertices with $\parallel G\parallel$ edges. If we put two similar graphs G side by side, and any vertex of the first graph G is connected by edges with those vertices which are nonadjacent to the corresponding vertex (including the corresponding vertex itself) of the second graph G and the resultant graph is denoted by ${K}_{2}\bigsqcup G$, then we have $|{K}_{2}\bigsqcup G|=2|G|$ and $\parallel {K}_{2}\bigsqcup G\parallel =\parallel G\parallel +\parallel G\parallel +{|G|}^{2}-2\parallel G\parallel ={|G|}^{2}$. Moreover, ${K}_{2}\bigsqcup G$ is the graph of ${K}_{2}$ and G with the vertex set $V\left({K}_{2}\bigsqcup G\right)=V\left({K}_{2}\right)×V\left(G\right)$ and $\left({u}_{i},{v}_{j}\right)\left({u}_{k},{v}_{\ell }\right)$ is an edge of ${K}_{2}×G$ whenever (${u}_{i}={u}_{k}$ and ${v}_{j}$ is adjacent with ${v}_{\ell }$) or (${u}_{i}\ne {u}_{k}$ and ${v}_{j}$ is nonadjacent with ${v}_{\ell }$).

Theorem 13LetGbe a connected graph of order$|G|$. Then

$H\left({K}_{2}\bigsqcup G\right)=\frac{|G|\left(3|G|-1\right)}{2}.$

Proof In ${K}_{2}\bigsqcup G$, for each vertex $\left({u}_{i},{v}_{j}\right)$, there are ${d}_{G}\left({v}_{j}\right)+|G|-1-{d}_{G}\left({v}_{j}\right)+1=|G|$ neighbors, and ${d}_{G}\left({v}_{j}\right)+n-1-{d}_{G}\left({v}_{j}\right)=|G|-1$ vertices with the distance 2 from itself. By the definition of the Harary index, we have

$\begin{array}{rcl}H\left({K}_{2}\bigsqcup G\right)& =& \sum _{\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\in V\left({K}_{2}\bigsqcup {G}_{2}\right),\left({u}_{i},{v}_{j}\right)\ne \left({u}_{k},{v}_{\ell }\right)}\frac{1}{{d}_{{K}_{2}\bigsqcup G}\left(\left({u}_{i},{v}_{j}\right),\left({u}_{k},{v}_{\ell }\right)\right)}\\ =& \sum _{{u}_{i}\in {K}_{2}}\frac{1}{2}\sum _{{v}_{j}\in G}\left({d}_{{K}_{2}\bigsqcup G}\left({u}_{i},{v}_{j}\right)+\frac{2|G|-{d}_{{K}_{2}\bigsqcup G}\left({u}_{i},{v}_{j}\right)-1}{2}\right)\\ =& \sum _{{u}_{i}\in {K}_{2}}\frac{1}{2}\sum _{{v}_{j}\in G}\left(|G|+\frac{|G|-1}{2}\right)\\ =& \frac{|G|\left(3|G|-1\right)}{2}.\end{array}$

□

## References

1. Ivanciuc O, Balaban TS, Balaban AT: Reciprocal distance matrix, related local vertex invariants and topological indices. J. Math. Chem. 1993, 12: 309–318. 10.1007/BF01164642

2. Plavšić D, Nikolić S, Trinajstić N, Mihalić Z: On the Harary index for the characterization of chemical graphs. J. Math. Chem. 1993, 12: 235–250. 10.1007/BF01164638

3. Das KC, Zhou B, Trinajstić N: Bounds on Harary index. J. Math. Chem. 2009, 46: 1369–1376. 10.1007/s10910-009-9520-x

4. Das KC, Xu K, Gutman I: On Zagreb and Harary indices. MATCH Commun. Math. Comput. Chem. 2013, 70(1):301–314.

5. Ilić A, Yu G, Feng L: The Harary index of trees. Util. Math. 2012, 87: 21–32.

6. Lučić B, Miličević A, Nikolić S, Trinajstić N: Harary index - twelve years later. Croat. Chem. Acta 2002, 75: 847–868.

7. Xu K: Trees with the seven smallest and eight greatest Harary indices. Discrete Appl. Math. 2012, 160: 321–331. 10.1016/j.dam.2011.08.014

8. Xu K, Das KC: Extremal unicyclic and bicyclic graphs with respect to Harary index. Bull. Malays. Math. Soc. 2013, 36(2):373–383.

9. Xu K, Das KC: On Harary index of graphs. Discrete Appl. Math. 2011, 159: 1631–1640. 10.1016/j.dam.2011.06.003

10. Xu K, Trinajstić N: Hyper-Wiener and Harary indices of graphs with cut edges. Util. Math. 2011, 84: 153–163.

11. Zhou B, Cai X, Trinajstić N: On the Harary index. J. Math. Chem. 2008, 44: 611–618. 10.1007/s10910-007-9339-2

12. Wiener H: Structural determination of paraffin boiling points. J. Am. Chem. Soc. 1947, 69: 17–20. 10.1021/ja01193a005

13. Gutman I, Polansky OE: Mathematical Concepts in Organic Chemistry. Springer, Berlin; 1986.

14. Todeschini R, Consonni V: Handbook of Molecular Descriptors. Wiley, Weinheim; 2000.

15. Needham DE, Wei IC, Seybold PG: Molecular modeling of the physical properties of alkanes. J. Am. Chem. Soc. 1988, 110: 4186–4194. 10.1021/ja00221a015

16. Rücker G, Rücker C: On topological indices, boiling points, and cycloalkanes. J. Chem. Inf. Comput. Sci. 1999, 39: 788–802. 10.1021/ci9900175

17. Das KC, Gutman I: Estimating the Wiener index by means of number of vertices, number of edges, and diameter. MATCH Commun. Math. Comput. Chem. 2010, 64(3):647–660.

18. Dobrynin AA, Entringer R, Gutman I: Wiener index of trees: theory and applications. Acta Appl. Math. 2001, 66: 211–249. 10.1023/A:1010767517079

19. Liu H, Pan XF: On the Wiener index of trees with fixed diameter. MATCH Commun. Math. Comput. Chem. 2008, 60: 85–94.

20. Zhang XD, Xiang QY, Xu LQ, Pan RY: The Wiener index of trees with given degree sequence. MATCH Commun. Math. Comput. Chem. 2008, 60: 623–644.

21. Bondy JA, Murty USR: Graph Theory with Applications. Macmillan Press, New York; 1976.

22. Khalifeh MH, Azari HY, Ashrafi AR: The hyper-Wiener index of graph operations. Comput. Math. Appl. 2008, 56: 1402–1407. 10.1016/j.camwa.2008.03.003

23. Imrich W, Klavžar S: Product Graphs: Structure and Recognition. Wiley, New York; 2000.

24. Gutman I: Distance in theory of graphs. Publ. Inst. Math. (Belgr.) 1998, 63: 31–36.

25. Brouwer AE, Cohen AM, Neumaier A: Distance-Regular Graphs. Springer, Berlin; 1989.

27. Biggs NL: Algebraic Graph Theory. 2nd edition. Cambridge University Press, Cambridge; 1993. pp. 17 and 68

28. Alon N: Eigenvalues and expanders. Combinatorica 1986, 6: 83–96. 10.1007/BF02579166

## Acknowledgements

KCD was supported by the Faculty research Fund, Sungkyunkwan University, 2012, and National Research Foundation funded by the Korean government with the grant no. 2013R1A1A2009341; and KX was supported by China Postdoctoral Science Foundation (2013M530253) and the NNSF of China with the number 11201227. Moreover, INC and ASC were supported by the Scientific Project Office Funds (BAP) of Uludag (with Project Code F2012/15, F2012/19 and F2012/20) and Selcuk (with Project Code 13701071) Universities, respectively.

## Author information

Authors

### Corresponding author

Correspondence to Ismail Naci Cangul.

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

All authors completed the paper together. All authors read and approved the final manuscript.

## Rights and permissions

Reprints and permissions

Das, K.C., Xu, K., Cangul, I.N. et al. On the Harary index of graph operations. J Inequal Appl 2013, 339 (2013). https://doi.org/10.1186/1029-242X-2013-339