EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 15, No. 2, 2022, 602-619 ISSN 1307-5543 – ejpam.com Published by New York Business Global On the Weiner and Harary Index of Splitting Graphs Francis Joseph H. Campeña1, Ma. Christine G. Egan1,∗, John Rafael M. Antalan1,2 1 Mathematics and Statistics Department College of Science, De La Salle University, 2401 Taft Avenue Malate Manila, Philippines. 2 Department of Mathematics and Physics, College of Science, Central Luzon State University, Science City of Muñoz, 3120 Nueva Ecija, Philippines. Abstract. In this study we define a graph operation on a finite simple graph G = (V,E) called the S-splitting graph of G where S is a non-empty subset of vertices of G. If S = V , then it is the splitting graph of G defined by E. Sampathkumar, and H.B. Walikar in the 1980’s. This paper investigates the Wiener and Harary indices of the S-splitting graph of G for some families of graph. 2020 Mathematics Subject Classifications: 05C50, 05C09, Key Words and Phrases: Wiener index, Harary Index, Splitting Graph 1. Introduction Mathematical objects have been used to represent the structure of a chemical com- pound. One such representation is that each atom is described by vertices and the bond between atoms is described by an edge. With this, mathematical tools can now be used to analyze the properties of chemical compounds that may be related to its structure. A mathematical formula that represents chemical species which have made a variety of methods of chemical structure is called the topological indices [18]. Topological indices are helpful when interpreting chemical constitution into numerical values which can be used for correlation with physical properties in quantitative structure- property/activity relationship (QSPR/QSAR) studies. Quantitative structure-property relationship (QSPR) mathematical modeling method connects physical or chemical prop- erties with a structure of a molecule [1]. Meanwhile, Quantitative structure-activity re- lationship (QSAR) is a mathematical modeling method that show relationships between biological activities and the structural properties of chemical compounds [13]. We have here some studies of toplogical indices in QSPR/QSAR. Shanmukha, et. al used 13 degree- based topological indices to study anticancer drugs in terms of QSPR [20]. Hosamani ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v15i2.4316 Email addresses: francis.campena@dlsu.edu.ph (F.J.H. Campeña), ma_christine_egan@dlsu.edu.ph (M.C.G. Egan), jrantalan@clsu.edu.ph (J.R.M. Antalan) https://www.ejpam.com 602 © 2022 EJPAM All rights reserved. F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 603 studied the QSPR of phytochemicals screened against SARS-CoV-2 3CLpro with the help of several topological indices [10]. In general, a topological index, also known as a graph-theoretic index, is a numerical invariant of a chemical graph. Harary index, Balaban index, molecular topological in- dex, Wiener index, Hyper-Wiener index, and Zagreb indices are some of the well-studied topological indices. Topological indices are used to represent each chemical structure with a numerical value. These values are used to model different physicochemical properties and biological activities of chemical compounds [15]. The first topological index was introduced by Harry Wiener in 1947. He computed the sum of the distances of the shortest path between all pairs of vertices of a graph called Wiener index [24]. The concept of the Wiener index was generalized by Milan Randic in 1993. It was the extension for all connected graphs and called it Hyper-Wiener index [14]. The sum of reciprocals of distances between all pairs of vertices in a graph G is called the Harary index, denoted by H(G). It was introduced independently by Plavšić et al. [17] and by Ivanciuc et al. [11] in 1993. A variety of topological indices have been studied. In particular, the Balaban index, also called J index was developed by Balaban [2]. De first derived explicit expression of reformulated first Zagreb index of generalized hierarchical product of two connected graphs [3]. Gao et. al developed some degree-based topological indices of networks derived from Honey comb networks [6]. Recently, Mondal et. al obtained some of the topological properties of some chemical structures used to inhibit the outbreak and transmission of COVID-19 in terms of some degree-based and some neighborhood degree sum-based indices [15]. While other researchers focused on the Wiener index of a graph obtained by some graph operations such as Yeh and Gutman in [25] studied the Wiener index of graphs obtained by means of certain binary operations on pairs of graphs. Stevanović generalized these results to determine the Wiener polynomial of the composite graphs [21]. The hyper-Wiener index of these operations determined by Khalifeh et. al in [12]. Eliasi et. al computed the values of the Wiener index of a graph obtained by some graph operations [5]. Moreover, a study on the Wiener index of a graph obtained from some graph operation is called sum of shadow graphs [7]. In this paper we only consider a finite simple undirected graph G = (V,E) and S ⊆ V = {x1, x2, . . . , xn} where n ≥ 1. Define a graph Γ = Γ(G,S) to be a graph obtained from G by replicating the vertices x in S as well as the edges adjacent to it, that is; V (Γ) = V ∪{x′|x ∈ S} and E(Γ) = E ∪{x′u|u ∈ NG(x)} where N(x) is the set of vertices in G adjacent to x. The graph Γ(G,S) obtained is called an S-splitting of G. If S = V, then the graph Γ(G,V ) is the splitting graph of a graph G as defined by Sampathkumar et al. [19]. It is worthwhile to note that the definition of an S-splitting graph of G is similar to the double graph D[G] defined in [16]. In particular, Γ(G) ⊆ D[G]. The case of double graphs is more simple than an S-splitting of G in terms of computing some topological indices. The preliminary concepts are presented in Section 2. The S-splitting graph of G, F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 604 denoted by Γ(G,S) is formally defined in Section 3. The computations for the Weiner index of the S-splitting graph Γ(G,S) are also included in this section. In chapter 4, we have the computations for the Harary index of Γ(G,S). 2. Preliminary Concepts In this study we only consider a simple undirected graph G with a non-empty finite set V of vertices and a finite set E of edges. We say V (G) as the vertex set and E(G) as the edge set. We denote any edge in E(G) by {xi, xj}. We call adjacent these two distinct vertices xi and xj in E(G). A set containing those vertices of G that are adjacent to some vertex a is called the neighbor set of a, denoted by N(a). A graph G is said to be a triangle free graph if no three vertices form a triangle of edges. The adjacency matrix denoted by A(G) with vertex set {x1, x2, . . . , xn} is the n × n binary matrix A = [aij ] where aij = 1 if the vertices xi, xj are adjacent, and aij = 0 otherwise. The distance d(xi, xj) between two vertices xi, and xj is the length of the shortest path between the vertices xi and xj . Note that the sum of the degree of all vertices in a graph G is twice the number of edges in G. D(G) is the matrix [dij ] where dij = d(xi, xj) is called the distance matrix of a graph G. Readers are referred to [4, 9] for other elementary Graph Theoretic concepts. In this study, we focus on the Wiener index, and Harary index of a graph. The Wiener index W (G) of a graph G is defined as W (G) = ∑ {vi,vj}⊆V (G) d(vi, vj) = 1 2 n∑ i=1 n∑ j=1 d(vi, vj). The Harary index H(G) of a graph G is defined as H(G) = ∑ {vi,vj}⊆V (G) 1 d(vi, vj) = 1 2 n∑ i=1 n∑ j=1 1 d(vi, vj) . The following are the exact values of Weiner and Harary indices for some families of graphs. We denote Hn be the nth Harmonic number. That is, Hn = ∑n k=1 1 k . Theorem 1. [17, 23] The Wiener and Harary index of the path graph on n vertices for n ≥ 1 is given by W (Pn) = 1 6n(n 2 − 1) and H(Pn) = nHn − 1. Theorem 2. [17, 23] The Wiener and Harary index of the cycle graph on n vertices for n ≥ 3 is given by W (Cn) =  n3 8 n even (n− 1)(n+ 1)n 8 n odd F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 605 and H(Cn) = 1 2 (1 + (−1)n) + nHb(n−1)/2c. Theorem 3. [22, 23] The Wiener and Harary index of the complete graph on n vertices for n ≥ 1 is given by W (Kn) = H(Kn) = n(n− 1) 2 . Theorem 4. [22, 23] The Wiener and Harary index of the star graph on n vertices for n ≥ 1 is given by W (Sn) = (n− 1)2 and H(Sn) = 1 4(n+ 2)(n− 1). Theorem 5. [22, 23] For n ≥ 4, the Wiener and Harary index of the wheel graph on n vertices is given by W (Wn) = (n− 1)(n− 2) and H(Wn) = 1 4(n+ 4)(n− 1). Theorem 6. [8, 23] For m,n ≥ 1, the Wiener and Harary index of the complete bipartite graph Km,n is given W (Km,n) = m2+mn+n2−m−n and H(Km,n) = 1 4(m 2+n2−m− n) +mn. 3. S-splitting Graphs Sampathkumar and Walikar introduced the Splitting graph in 1980 [19] and defined it as follows. For each vertex v of a graph G, we have a new vertex v′, and connect v′ to all the vertices of G adjacent to v. In this study, we look into a variation of the Splitting graph and define what we call an S-splitting graph of G where S is a non-empty subset of vertices in G. 3.1. The S-splitting Graph Γ(G,S) Throughout, we consider a finite connected simple graph G = (V,E) and S ⊆ V = {x1, x2, . . . , xn} where n ≥ 2 and |E| = m ≥ 1. The graph Γ(G,S) or simply Γ is an S-splitting graph of G is the graph obtained from G with the vertex set V (Γ) = V ∪ S′ where S′ = {x′|x ∈ S} and the edge set E(Γ) = E ∪ {{x′, u}|u ∈ NG(x)} where NG(x) is the set of vertices in G adjacent to x. If S = V , then Γ(G) or a V -splitting graph of G is splitting graph of a graph G as defined by Sampathkumar in [19]. From the definition of the S-splitting graph of G, the following statements can be easily shown. Lemma 1. Let G = (V,E) is a simple graph on n ≥ 2 vertices and m ≥ 1 edges. Let S be a non-empty subset of V and |S| = r. Consider the S-splitting graph of G, Γ(G,S) with V (Γ) = V ∪ S′, where S′ = {x′|x ∈ S}. (i) If S = V , then |V (Γ)| = 2n, |E(Γ)| = 3m. (ii) If S = V and v ∈ S, then degΓ(v) = 2degG(v). (iii) If v ∈ S′, then degΓ(v ′) = degG(v). (iv) If G is a connected graph, then Γ(G,S) is also connected. F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 606 Proof. Let Γ be the S-splitting graph of G. For (i), suppose S = V . Then |S| = |V |. Since V (Γ) = V ∪V ′ and V ′ is the new set of the vertices obtained from V (G), then V ∩V ′ = ∅. This implies that |V (Γ)| = |V |+ |V ′| = 2|V (G)|. Meanwhile, from the definition of Γ(G,S), for every edge in G, 2 new edges are formed. So, |E(Γ)| = |E(G)|+ 2|E(G)| = 3|E(G)|. For (ii), Let S = V . From Γ, suppose degG(v) = p and v ∈ S, then there are p new vertices connected to v. Thus, degΓ(v) = 2degG(v). For (iii), let v ∈ V ′. Since v′ is the new vertex that connects to all vertices of G adjacent to v, then degΓ(v ′) = degG(v). For (iv), to show that Γ is connected, we need to show that for any pair of vertices x, y in Γ, there exists a path from vertex x to vertex y. We consider three cases: x, y ∈ V ; x ∈ V, y ∈ V ′; and x, y ∈ V ′. Since G is a connected graph, then there is a path between any pair of vertices x, y in V . Let x ∈ V, y ∈ V ′, if y = x′ then d(x, y) ≥ 2 from the definition of an S-splitting of G. Moreover, y must be adjacent to a vertex in NG(x) and thus there exist a path of length 2 from x to y, which shows that d(x, y) = 2. We now consider vertex u ∈ V associated to y from the definition of Γ where y 6= x′. Since G is connected, then there must be a path from x to u. Suppose the sequence of vertices from this path is x = a1, . . . , ak = u, then there is a path from x to y using the sequence of vertices x = a1, . . . , ak−1 = y. For the last case, suppose both x, y are in V ′. Let u, v be the vertices in V associated with x, y respectively from the definition of Γ. Since G is connected, then there must be a path from u to v in G. Suppose a1, a2, . . . , ak−1, ak is the sequence of vertices from this path. From the definition of Γ, x is adjacent to a2 and y is adjacent to ak−1, thus there is a path from x to y in Γ. Therefore, Γ(G,S) is a connected graph. Lemma 2. Let G be a connected graph triangle free graph with at least two vertices. Consider Γ(G), then we have, (i) d(xi, x ′ i) = 2, for i = 1, . . . , n; (ii) d(xi, xj) = d(x′i, xj), for 1 ≤ i, j ≤ n, i 6= j; (iii) d(x′i, x ′ j) = 3 for adjacent vertices xi and xj; (iv) d(xi, xj) = d(x′i, x ′ j) where xi and xj are non-adjacent vertices where V (Γ) = {x1, . . . , xn, x′1, . . . , x′n}. Lemma 3. Let G be a connected graph with at least two vertices such that any pair of adjacent vertices has a common neighbor. Then we have the following: (i) d(xi, x ′ i) = 2 for i = 1, . . . n; (ii) d(xi, xj) = d(x′i, xj) for 1 ≤ i, j ≤ n, i 6= j; (iii) d(x′i, x ′ j) = 2 for adjacent vertices xi and xj; F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 607 (iv) d(xi, xj) = d(x′i, x ′ j) where xi and xj are non-adjacent vertices in G where V (Γ) = {x1, . . . , xn, x′1, . . . , x′n}. If G is a triangle free graph, then by Lemma 2 the distance matrix of the V -splitting of G , Γ(G) = Γ can view as a block matrix given by D(Γ) = [ D(G) D(G) + 2In (D(G) + 2In) D(G) + 2A(G) ] While, in view of Lemma 3, if every pair of adjacent vertices of a graph G has a common neighbor, then the distance matrix of Γ can be written as the block matrix given by D(Γ) = [ D(G) D(G) + 2In D(G) + 2In D(G) +A(G) ] where D(G) is the distance matrix of a graph G, A(G) is the adjacency matrix, and In is the identity matrix with size n. The following theorem now gives us a general description of the distance matrix of a V -splitting graph of G. Theorem 7. The distance matrix of the V -splitting graph of G can be viewed as a 2× 2 block matrix given by D(Γ) = [ X Y Z W ] X = D(G), Y = Z = D(G) + 2In and W where W = [wij ] is the matrix given by: wij =  2 if {xi, xj} ∈ E(G) and NG(i) ∩NG(j) 6= ∅ 3 if {xi, xj} ∈ E(G) and NG(i) ∩NG(j) = ∅ 0 if i = j d(xi, xj) otherwise. Proof. Consider the distance matrix of the V -splitting graph of G where first n rows and columns are indexed by the vertices in G say x1, . . . , xn and the last n and columns rows by the new vertices say x′1, . . . , x ′ n. From Lemma 2 and Lemma 3, it is easy to see that X = D(G), Y = Z = D(G)+2In. Let us now consider the entries in W = [wij ]. First note that in the distance matrix of G, D(G) = [dij ], dij = 1 whenever vertex xi is adjacent to vertex xj in G. Thus, the non-zero entries in D(G)−A(G) denotes the distances of two distinct non-adjacent vertices in G. By Lemma 2 and Lemma 3, wij = d(xi, xj) for any two distinct non-adjacent vertices in G. Now, we partition the set of all pairs of adjacent vertices in G say V1, V2 where V1 contains all pairs having a common neighbor and V2 contains pairs of adjacent vertices having no common neighbor. For the pair of vertices F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 608 xi, xj in V1, by Lemma 3 (iii), wij = d(x′i, x ′ j) = 2 and for the pairs of vertices xi, xj in V2, by Lemma 3 (iii), wij = d(x′i, x ′ j) = 3. Note that the matrix W in Theorem 3.1.7 can be expressed as W = D(G)−A(G) + 2A′(G) + 3A′′(G) where D(G), A(G) is the distance matrix and adjacency matrix of G respectively, and A′(G) is an n× n matrix whose ij-entry is 1 if vertex i is adjacent to vertex j in G such that NG(i) ∩NG(j) 6= ∅ and 0 otherwise; and A′′(G) is an n× n matrix whose ij-entry is 1 if vertex i is adjacent to vertex j in G such that NG(i) ∩NG(j) = ∅ and 0 otherwise. 3.2. Wiener Index of Γ(G, V ) To simplify our computations for the Wiener index of a graph we use the following notation, for any matrix A we denote the sum of all entries in A by ∑ A. Recall that for a constant c, then ∑ cA = c ∑ A. Theorem 8. Let G be a connected triangle free graph on n vertices and m edges. Suppose V = S, the splitting graph of G Γ = Γ(G) has Wiener index given by W (Γ) = 4W (G) + 2n+ 2m. Proof. Let G be any connected graph of order n such that any pair of adjacent vertices has no common neighbor, that is G is a triangle free graph. Denote the splitting graph of G by Γ. Then we can describe the distance matrix of Γ as a 2x2 block matrix entries that depends on the distance matrix, adjacency matrix and identity matrix of the graph G by D(Γ) = [ D(G) D(G) + 2In D(G) + 2In D(G) + 2A(G) ] Since the Wiener index of Γ is half of the distance matrix of Γ then we have the following: W (Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ 4D(G) + 4 ∑ In + ∑ 2A(G) ) = 4 (1 2 ∑ D(G) ) + 2 ∑ In + ∑ A(G) = 4W (G) + 2n+ ∑ A(G) Observe that the sum of the entries in an adjacency matrix is twice the number of edges m. That is, W (Γ) = 4W (G) + 2n+ 2m. We note that the path Pn , star graph Sn, and cycle Cn, n > 3, are triangle free graph. The following statements follows easily. Corollary 1. For n > 3, the Wiener index of the V -splitting graph of G, Γ is given by (i) W (Γ(Pn, V )) = 2n3+10n−6 3 ; F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 609 (ii) W (Γ(Sn, V )) = 4n2 − 4n+ 2; (iii) W (Γ(Cn, V )) = { n3+8n 2 n even n3+7n 2 n odd. Proof. For (i) The result follows from Theorem 1 and Theorem 8, and for (ii), the result follows from Theorem 4 and Theorem 8 while the result for (iii) follows from Theorem 2 and Theorem 8. Theorem 9. For a connected graph G = (V,E) on n ≥ 2 vertices and m ≥ 1 edges such that any pair of adjacent vertices have at least one common neighbor and V = S, the splitting graph of G, say Γ = Γ(G) has Wiener index given by W (Γ) = 4W (G) + 2n+m. Proof. Then distance matrix of Γ as a 2× 2 block matrix entries that depends on the distance, adjacency and identity matrices of the graph G by D(Γ) = [ D(G) D(G) + 2In D(G) + 2In D(G) +A(G) ] where D(G) and A(G) are the distance, adjacency matrices of the graph G and In is the identity matrix of size n. Notice that we can express the Wiener index of Γ using the distance matrix of Γ then have the notation: W (Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ 4D(G) + 4 ∑ In + ∑ A(G) ) = 4 (1 2 ∑ D(G) ) + 2 ∑ In + 1 2 ∑ A(G) = 4W (G) + 2n+ 1 2 ∑ A(G) Note that the sum of the entries in an adjacency matrix is twice the number of edges m. Thus we have W (Γ) = 4W (G) + 2n+ 1 2(2m) = 4W (G) + 2n+m. Corollary 2. For n > 3, the Wiener index of the V -splitting graph of G, Γ is given by (i) W (Γ(Kn, V )) = 5n2−n 2 ; (ii) W (Γ(Wn, V )) = 4n2 − 8n+ 6. Proof. For (i), the result follows from Theorem 3 and Theorem 9, while for (ii), the results are immediate from Theorem 5 and Theorem 9. The following observations can be easily verified from the definition of the S-splitting graph of G. • If G is either a complete graph Kn or a cycle graph Cn, then for any x, y ∈ V (G) we have Γ(G, {x}) ∼= Γ(G, {y}). F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 610 • Let G be a complete graph Kn and n ≥ 3. Then the graphs Γ(G,S1) and Γ(G,S2) are isomorphic for any S1, S2 ⊂ V (G) such that |S1| = |S2|. We now determine the Wiener index of Γ(G,S) where S 6= V for some families of graphs. The graphs included are complete graphs, complete bipartite graphs, cycle graphs, path graphs, star graphs and wheel graphs. The following lemma follows directly from the definition of an S-splitting of G. Lemma 4. Let G = Km,n with vertex partition V = V1 ∪ V2. Suppose S ⊆ V1, where |S| = p then Γ(G,S) ∼= Km+p,n. Theorem 10. Let G = Kn, for n ≥ 3 and let S ⊂ V (Kn) such that |S| = r where 1 ≤ r ≤ n− 1. Then the Wiener index of the splitting graph of Kn is given by W (Γ(Kn, S)) = n2−n+2r2+2nr 2 . Proof. Let V (Kn) = {x1, x2, . . . , xn}. Without loss of generality, suppose S = {x1, x2, . . . , xr}. We denote the ordering of the vertices of the graph Γ = Γ(Kn, S) by x1, x2, . . . , xn, x ′ 1, x ′ 2, . . . , x ′ r. Then we can write the distance matrix of Γ as a block matrix as follows. D(Γ) =  A(Kr) + 2Ir D(Kn) Jn−r×r A(Kr) + 2Ir Jr×n−r 2A(Kr)  where D(Kn), A(Kr), Ir, Jr×n−r are the distance matrix of Kn, adjacency matrix of Kr, identity matrix of size r, and the all one’s matrix of size r× n− r respectively. Hence, we can compute the Wiener index by W (Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ D(Kn) + 4 ∑ A(Kr) + 4 ∑ Ir + ∑ Jn−r×r + ∑ Jr×n−r ) = 1 2 D(Kn) + 2 ∑ A(Kr) + 2 ∑ Ir + 1 2 ∑ Jn−r×r + 1 2 ∑ Jr×n−r = W (Kn) + 2 ( 2|E(Kr)|) + 2 ∑ Ir + 1 2 ∑ Jn−r×r + 1 2 ∑ Jr×n−r = n(n− 1) 2 + 2r(r − 1) + 2r + 1 2 (n− r)r + 1 2 (n− r)r = n(n− 1) 2 + 2r2 − 2r + 2r + r(n− r) = n2 − n+ 2r2 + 2nr 2 . Theorem 11. Let n > 3, and S = {x} such that x ∈ V (Cn). Then the Wiener index of the S-splitting graph of Cn is given by F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 611 (i) W (Γ(Cn, S)) = n(n−1)(n+1) 8 + k2 + k + 2 if n is odd; (ii) W (Γ(Cn, S)) = n3 8 + k2 + 2 if n is even. Proof. Suppose n = 2k + 1. Let V (Cn) = {x1, x2, . . . , xn}. Without loss of generality, suppose S = {x1}. For some ordering of the vertices of Γ say, x1, x2, xn, x3, xn−1, . . . , xk+1, xk+2, x ′ 1, the distance matrix of D(Γ) can describe as a bloc matrix given by D(Γ) = [ D(Cn) A At 0 ] where D(Cn) is the distance matrix of Cn and At is the 1×n matrix [2, 1, 1, 2, 2, 3, 3, . . . , k, k]. Thus we have, W (Γ) = W (Cn) + 2 + 2 k∑ i=1 i = n(n− 1)(n+ 1) 8 + 2 + 2 (k(k + 1) 2 ) = n(n− 1)(n+ 1) 8 + 2 + k(k + 1) = n(n− 1)(n+ 1) 8 + k2 + k + 2. Now suppose n = 2k, given the ordering of the vertices of Γ by x1, x2, xn, x3, xn−1, . . . , xk−1, xk+1, xk, x ′ 1 where n = 2k. Then we can write the distance matrix of Γ by D(Γ) = [ D(Cn) A At 0 ] where D(Cn) is the distance matrix of Cn and At is the 1× n matrix [2, 1, 1, 2, 2, . . . , k − 1, k − 1, k]. Computing for the Wiener index of the graph Γ(Cn, S), we have: W (Γ) = W (Cn) + 2 + 2 k−1∑ i=1 i+ k = n3 8 + 2 + 2 (k(k − 1) 2 ) + k = n3 8 + 2 + 2 (k(k − 1) 2 ) + k = n3 8 + k2 + 2. Theorem 12. Let G be a path graph and S ⊂ V (Pn) = {x1, x2, . . . , xn} where n ≥ 2. Then (i) If S = {x1} or S = {xn}, then W (Γ(Pn, S)) = n3+3n2−4n+12 6 ; (ii) If S = {xi} such that 2 ≤ i ≤ n− 1, then W (Γ(Pn, S)) = n3+3n2+2n+6i2−6in−6i+12 6 . F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 612 Proof. Let S = {x1}. Given the ordering of the vertices x1, x2, . . . , xn, x ′ 1. We have the distance matrix for the graph Γ(S, Pn) as follows. D(Γ) = [ D(Pn) A At 0 ] where D(Pn) is the distance matrix of Pn and At is the 1 × n matrix [2, 1, 2, . . . , n − 1]. From this, we can now compute the Wiener index of Γ(Pn, S) as follows W (Γ) = W (Pn) + 2 + n−1∑ i=1 i = n(n2 − 1) 6 + 2 + n(n− 1) 2 = n3 + 3n2 − 4n+ 12 6 . Moreover, suppose S = {xi} where 2 ≤ i ≤ n − 1. Now, we consider the ordering of the vertices x1, x2, . . . , xn, x ′ i of Γ. So, the distance matrix of the graph Γ(Pn, S) is given by D(Γ) = [ D(Pn) A At 0 ] where D(Pn) is the distance matrix of Pn and At is the 1×n matrix [i−1, i−2, . . . , 2, 1, 2, . . . , n− i]. From this, we now have W (Γ) = W (Pn) + 2 + i−1∑ j=1 j + n−1∑ j=1 j = W (Pn) + 2 + i2 − 1 2 + n2 + i2 − 2in+ n− i 2 = n(n2 − 1) 6 + 2 + i2 − 1 2 + n2 + i2 − 2in+ n− i 2 = n3 + 3n2 + 2n+ 6i2 − 6in− 6i+ 12 6 . Theorem 13. Let G be the complete bipartite graph Km,n with vertex partition V = V1∪V2 such that |V1| = m and |V2| = n and S ⊂ Vk. Then the Wiener index of Γ = Γ(Km,n, S) is given by W (Γ) = m2 + n2 + i2 + j2 −m− n− i− j +mn+ ni+mj + 2mi+ 2nj + 3ij where |S ∩ V1| = i and |S ∩ V2| = j. F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 613 Proof. Let V = {x1, x2, . . . , xm, y1, y2, . . . , yn} be the vertex set of Km,n. Without loss of generality, suppose S = {x1, x2, . . . , xi, y1, y2, . . . , yj}. Now, consider the vertex set of Γ = Γ(Km,n, S) say, {x1, . . . , xm, y1, . . . , yn, x ′ 1, . . . , x ′ i, y ′ 1, . . . , y ′ j}. The distance matrix for the S-splitting of Km,n can be written as D(Γ) =  2Jm − 2Im Jm×n 2Jm×i Jm×j Jn×m 2Jn − 2In Jn×i 2Jn×j 2Ji×m Ji×n 2Ji − 2Ii 3Ji×j Jj×m 2Jj×n 3Jj×i 2Jj − 2Ij  Notice that from the distance matrix, the Wiener index of Γ is the sum of ∑ Jm − Im,∑ Jn − In, ∑ Ji − Ii, ∑ Jj − Ij , ∑ Jm×n, ∑ Jn×i, ∑ Jm×j , 3 ∑ Ji×j , 2 ∑ Jm×i, and 2 ∑ Jn×j . Thus, the result follows. 3.3. Harary Index of Γ(G, V ) Another well-known topological index of a graph studied by Plavšić et al. [17] and by Ivanciuc et al. [11] is Hararay index. We recall the Harary Index of the graph G and is defined as follows. H(G) = ∑ {vi,vj}⊆V (G) 1 dG(vi, vj) = 1 2 n∑ i=1 n∑ j=1 1 dG(vi, vj) . The Harary index of Γ = Γ(G,S) can be computed using the distance matrix of Γ viewed as a block matrix similar to the computation of the Wiener index of Γ. In order to compute the Harary index of the S-splitting graph of G, we consider a matrix whose entries are the reciprocals of the nonzero entries of its distance matrix. For any matrix A, we let A be the matrix whose entries are the reciprocals of the non zero entries in A and ∑ A be the sum of the reciprocals of the nonzero entries in A, that is, if A = [aij ], then A = [aij ] where aij = 1 aij if aij 6= 0 and 0 otherwise. If the entries in A are 0 or 1, then ∑ A = ∑ A. Additionally, for any nonzero c, we have ∑ cA = c ∑ A. We will use the following lemma in order to compute for the Harary index of Γ(G,S). Lemma 5. Let A = [aij ], B = [bij ] be n× n square matrices with real entries such that at least one of aij or bij is zero for all 0 ≤ i, j ≤ n, then∑ A+B = ∑ A+ ∑ B. Proposition 1. Let D,A be the distance matrix and adjacency matrix of a graph G on n vertices and I be the identity matrix of size n. Let c any nonzero real number. (i) ∑ cA = 1 c ∑ A (ii) ∑ D + cA = ∑ D −A+ ∑ (c+ 1)A F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 614 (iii) ∑ D + cI = ∑ D + ∑ cI Proof. Let D = [dij ], A = [aij ]. For (i) : Note that since aij is either 0 or 1, for 0 ≤ i, j ≤ n, then we have∑ cA = ∑ 1 caij = 1 c ∑ 1 aij = 1 c ∑ aij = 1 c ∑ A where the summation runs over all non-zero aij . For (ii) : We note that dij = aij = 1 whenever vertex i is adjacent to vertex j. Note that the diagonal entries of D − A and and (c+ 1)A are all zero. Moreover, the ij-entry of D − A is zero whenever vertex i is adjacent to vertex j and greater than 0 whenever vertex i is not adjacent to vertex j. Furthermore, the ij-entry in the matrix (c + 1)A is zero whenever vertex i is not adjacent to vertex j and (c + 1) whenever vertex i is adjacent to vertex j. Since D + cA = (D − A) + (c + 1)A and by Lemma 5, we have∑ D + cA = ∑ D −A+ ∑ (c+ 1)A. For (iii): From the definition of D the entries in the main diagonal are all zero and that the entries outside the main diagonal of (c+1)I are all zero. Thus, by Lemma 5, the statement follows. Theorem 14. Suppose G = (V,E) is a connected triangle free graph on n vertices and m edges, then the Harary index of Γ(G,V ) is given by H(Γ) = 4H(G) + n 2 − 2 3 m. Proof. Let G be any connected graph of order n and m edges such that any pair of adjacent vertices has no common neighbor, that is G is a triangle free graph. Denote the splitting graph of G by Γ. The distance matrix of Γ can be written as a 2×2 block matrix given by D(Γ) = [ D(G) D(G) + 2In D(G) + 2In D(G) + 2A(G) ] where D(G) and A(G) are the distance matrix, adjacency matrix of the graph G and In is the identity matrix of size n. Since the Harary index of Γ is half the sum of the entries in D(Γ) , then we have the following computations: H(Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ D(G) + ∑ D(G) + 2In + ∑ D(G) + 2In + ∑ D(G) + 2A(G) ) = 1 2 (∑ D(G) + ∑ D(G) + ∑ 2In + ∑ D(G) + ∑ 2In + ∑ D(G)−A(G) + ∑ 3A(G) ) = 1 2 ( 4 ∑ D(G) + 2 ∑ 2In + ∑ 3A(G)− ∑ A(G) ) F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 615 = 4 (1 2 ∑ D(G) ) + ∑ 2In + 1 2 ∑ 3A(G)− 1 2 ∑ A(G) = 4H(G) + n 2 + 1 2 ∑ 3A(G)− 1 2 ∑ A(G) Observe that the sum of the entries in an adjacency matrix is twice the number of edges m. That is, H(Γ) = 4H(G) + n 2 + 1 2 (2m 3 ) − 1 2 ( 2m ) = 4H(G) + n 2 + m 3 −m = 4H(G) + n 2 − 2m 3 Corollary 3. Let G be a cycle graph Cn. Then the V -splitting graph of Cn has a Harary index given by H(Γ) = 2 ( 1 + ( − 1 )n) + n ( 4Hbn−1 2 c − 1 6 ) . Corollary 4. Let G be a path graph Pn. Then the Harary index of V -splitting graph of Pn is given by H(Γ) = n ( 4Hn − 25 6 ) + 2 3 . Corollary 5. Let G be a star graph Sn. Then the V -splitting graph of Sn has a Harary index given by H(Γ) = 1 6 ( 6n2 + 5n− 8 ) . Theorem 15. Suppose G = (V,E) is a connected graph on n ≥ 2 vertices and m ≥ 1 edges such that every pair of adjacent vertices have a common neighbor, then the Harary index of Γ(G,V ) is given by H(Γ) = 4H(G) + n−m 2 . Proof. Let G be a connected graph of order n and m edges such that any pair of adjacent vertices has at least common neighbor and let Γ be the splitting graph of G. This implies that the distance matrix of Γ can be written as a 2× 2 block matrix given by D(Γ) = [ D(G) D(G) + 2In D(G) + 2In D(G) +A(G) ] where D(G) and A(G) are the distance matrix, adjacency matrix of the graph G and In is the identity matrix of size n. We can determine the Harary index of Γ using the distance matrix of Γ given by the following: F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 616 H(Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ D(G) + ∑ D(G) + 2In + ∑ D(G) + 2In + ∑ D(G) +A(G) ) = 1 2 (∑ D(G) + ∑ D(G) + ∑ 2In + ∑ D(G) + ∑ 2In + ∑ D(G)−A(G) + ∑ 2A(G) ) = 1 2 ( 4 ∑ D(G) + 2 ∑ 2In + ∑ 2A(G)− ∑ A(G) ) = 4 (1 2 ∑ D(G) ) + ∑ 2In + 1 2 ∑ 2A(G)− 1 2 ∑ A(G) = 4H(G) + n 2 + 1 2 ∑ 2A(G)− 1 2 ∑ A(G) Note that the sum of the entries in an adjacency matrix is twice the number of edges m. Then, we have H(Γ) = 4H(G) + n 2 + 1 2 (2m 2 ) − 1 2 (2m) = 4H(G) + n 2 + m 2 −m = 4H(G) + n 2 − m 2 = 4H(G) + n−m 2 . Corollary 6. Let G be a complete graph Kn. Then the V -splitting graph of Kn has a Harary index given by H(Γ) = 1 4 ( 7n2 − 5n ) . Corollary 7. Let G be the wheel graph Wn. Then the splitting graph Γ(Wn, S) has a Harary index given by W (Γ) = 1 2(2n 2 + 5n− 6). Theorem 16. Let G be a complete graph for n ≥ 3 and S ⊂ V (Kn) such that |S| = r where 1 ≤ r ≤ n − 1. Then the Harary index of the splitting graph of Kn is given by H(Γ(Kn, S)) = 2n2−2n+r2−3r+4nr 4 . Proof. Let V (Kn) = {x1, x2, . . . , xn}. Without loss of generality, suppose S = {x1, x2, . . . , xr}. Suppose the ordering of the vertices of the graph Γ = Γ(Kn, S) is x1, x2, . . . , xn, x ′ 1, x ′ 2, . . . , x ′ r. Then we can write the distance matrix of Γ as a block matrix as follows. D(Γ) =  A(Kr) + 2Ir D(Kn) Jn−r×r A(Kr) + 2Ir Jr×n−r 2A(Kr)  F.J.H. Campeña, M.C.G. Egan, J.R.M. Antalan / Eur. J. Pure Appl. Math, 15 (2) (2022), 602-619 617 where D(Kn), A(Kr), Ir, Jr×n−r are the distance matrix of Kn, adjacency matrix of Kr, identity matrix of size r, and the all one’s matrix of size r× n− r respectively. Hence, we can compute the Harary index by H(Γ) = 1 2 ∑ D(Γ) = 1 2 (∑ D(Kn) + 2 ∑ A(Kr) + 2Ir + ∑ 2A(Kr) + ∑ Jn−r×r + ∑ Jr×n−r ) = 1 2 D(Kn) + ∑ A(Kr) + 2Ir + 1 2 ∑ 2A(Kr) + 1 2 ∑ Jn−r×r + 1 2 ∑ Jr×n−r = H(Kn) + ∑ A(Kr) + ∑ 2Ir + 1 2 ∑ 2A(Kr) + 1 2 ∑ Jn−r×r + 1 2 ∑ Jr×n−r = n(n− 1) 2 + 2|E(Kr)|+ r 2 + 1 2 (2|E(Kr)| 2 ) + 1 2 (n− r)r + 1 2 (n− r)r = n(n− 1) 2 + 2|E(Kr)|+ r 2 + 1 2 |E(Kr)|+ r(n− r) = n(n− 1) 2 + 5 2 |E(Kr)|+ r 2 + nr − r2 = n(n− 1) 2 + 5 2 (r(r − 1) 2 ) + r 2 + nr − r2 = n(n− 1) 2 + 5r2 − 5r 4 + r 2 + nr − r2 = 2n2 − 2n+ r2 − 3r + 4nr 4 Using the distance matrices of the corresponding S-splitting graph in Theorems 11,12,and 13 respectively and the definition of the Harary index of a graph, the following results hold. Theorem 17. Let G be a cycle graph, and S = {x} such that x ∈ V (G). Then (i) If n = 2k + 1, then H(Γ(G,S)) = 1 2 ( 2 + (−1)n ) + nHb(n−1)/2c + 2Hk; and (ii) If n = 2k, then H(Γ(G,S)) = 1 2 ( 2 + (−1)n ) + nHb(n−1)/2c + 2Hk−1 + 1 k . Theorem 18. Let G be a path graph and S ⊂ V (Pn) = {x1, . . . , xn} where n ≥ 2. Then (i) If S = {x1} or S = {xn}, then H(Γ(Pn, S)) = (n+ 1)Hn−1 − n+ 3 2 ; (ii) If S = {xi} such that 2 ≤ i ≤ n−1, then H(Γ(Pn, S)) = n ( Hn−1 ) +Hn−i+Hi−1+ 1 2 . Theorem 19. Let G be the complete bipartite graph Km,n with vertex partition V = V1∪V2 such that |V1| = m and |V2| = n. Then the Harary index of Γ = Γ(Km,n, S) is given by H(Γ) = 1 4 ( m2 + n2 + i2 + j2 −m− n− i− j ) + ij 3 + mi 2 + nj 2 +mn+mj + ni where |S ∩ V1| = i and |S ∩ V2| = j. REFERENCES 618 Acknowledgements The realization of this paper and the research behind it would not have been possible without the support of the Philippines’ Department of Science and Technology ASTHRDP, Central Luzon State University, and De La Salle University. The authors are also thankful to the referees for their valuable comments and suggestions that helped improve the content and presentation of this paper. References [1] F. Abedin, B. Roughton, P. Spencer, Q. Ye, and K. Camarda. Computational molecu- lar design of water compatible dentin adhesive system. In Krist V. Gernaey, Jakob K. Huusom, and Rafiqul Gani, editors, 12th International Symposium on Process Systems Engineering and 25th European Symposium on Computer Aided Process Engineering, volume 37 of Computer Aided Chemical Engineering, pages 2081–2086. Elsevier, 2015. [2] A.T. Balaban. Highly discriminating distance-based topological index. Chemical Physics Letters, 89(5):399–404, 1982. [3] N. De. Computing reformulated first zagreb index of some chemical graphs as an appli- cation of generalized hierarchical product of graphs. arXiv preprint arXiv:1704.05476, 2017. [4] R. Diestel. Graph Theory(5th Edition). Springer-Verlag, Heildelberg, New York., 2017. [5] M. Eliasi, G. Raeisi, and B. Taeri. Wiener index of some graph operations. Discrete Applied Mathematics, 160(9):1333–1344, 2012. [6] W. Gao, M. Asif, and W. Nazeer. The study of honey comb derived network via topological indices. Open j. math. anal, 2(2):10–26, 2018. [7] S. Goyal, D. Jain, and V.N. Mishra. Wiener index of sum of shadowgraphs. Discrete Mathematics, Algorithms and Applications, page 2250068, 2022. [8] A. Graovac and T. Pisanski. On the wiener index of a graph. Journal of mathematical chemistry, 8(1):53–62, 1991. [9] F. Harary. Graph theory. Addison-Wesley Publishing Company, Inc., 1969. [10] S.M. Hosamani. Quantitative structure property analysis of anti-covid-19 drugs. arXiv preprint arXiv:2008.07350, 2020. [11] 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, 12(1):309–318, 1993. REFERENCES 619 [12] M.H. Khalifeh, H. Yousefi-Azari, and A.R. Ashrafi. The hyper-wiener index of graph operations. Computers & Mathematics with Applications, 56(5):1402–1407, 2008. [13] S. Kwon, H. Bae, J. Jo, and S. Yoon. Comprehensive ensemble in qsar prediction for drug discovery. BMC bioinformatics, 20(1):1–12, 2019. [14] I. Lukovits and W. Linert. A novel definition of the hyper-wiener index for cycles. Journal of Chemical Information and Computer Sciences, 34, 1994. [15] S. Mondal, N. De, and A. Pal. Topological indices of some chemical structures applied for the treatment of covid-19 patients. Polycyclic Aromatic Compounds, pages 1–15, 2020. [16] E. Munarini, C.P. Cippo, A. Scagliola, and N.Z. Salvi. Double graphs. Discrete Mathematics, 308:242–254, 2 2008. [17] D. Plavšić, S. Nikolić, N. Trinajstić, and Z. Mihalić. On the harary index for the char- acterization of chemical graphs. Journal of Mathematical Chemistry, 12(1):235–250, 1993. [18] D.H. Rouvray. The search for useful topological indices in chemistry: Topological indices promise to have far-reaching applications in fields as diverse as bonding theory, cancer research, and drug design. American Scientist, 61(6):729–735, 1973. [19] E. Sampathkumar and H.B. Walikar. On splitting graph of a graph. Journal of the Karnatak University, Science., 25(13):13–16, 1980. [20] M.C. Shanmukha, N.S. Basavarajappa, K.C. Shilpa, and A. Usha. Degree-based topological indices on anticancer drugs with qspr analysis. Heliyon, 6(6):e04235, 2020. [21] D. Stevanović. Hosoya polynomial of composite graphs. Discrete Mathematics, 235(1):237–244, 2001. Chech and Slovak 3. [22] E.W. Weisstein. Wiener index – from wolfram mathworld. https://mathworld.wol- fram.com/WienerIndex.html, 2008. [23] E.W. Weisstein. Harary index – from wolfram mathworld. https://mathworld.wol- fram.com/HararyIndex.html, 2009. [24] H. Wiener. Structural determination of paraffin boiling points. Journal of the Amer- ican Chemical Society, 69(1):17–20, 1947. PMID: 20291038. [25] Y.N. Yeh and I. Gutman. On the sum of all distances in composite graphs. Discrete Mathematics, 135(1):359–365, 1994.