The EdgeWiener Index and the EdgeHyperWiener Index of Phenylenes
Petra Žigert Pleteršek
Faculty of Chemistry and Chemical Engineering, University of Maribor, Slovenia
Faculty of Natural Sciences and Mathematics, University of Maribor, Slovenia
petra.zigert@um.si
(July 20, 2019)
Abstract
Besides the well known Wiener index, which sums up the distances between all the pairs of vertices, and the hyperWiener index, which includes also the squares of distances, the edge versions of both indices attracted a lot of attention in the recent years.
In this paper we consider the edgeWiener index and the edgehyperWiener index of phenylenes, which represent an important class of molecular graphs. For an arbitrary phenylene, four quotient trees based on the elementary cuts are defined in a similar way as it was previously done for benzenoid systems. The computation of the edgeWiener index of the phenylene is then reduced to the calculation of the weighted Wiener indices of the corresponding quotient trees. Furthermore, a method for computing the edgehyperWiener index of phenylenes is described. Finally, the application of these results gives closed formulas for the edgeWiener index and the edgehyperWiener index of linear phenylenes.
1 Introduction
The Wiener index of a graph is defined as the sum of distances between all pairs of vertices in the graph. It was introduced in 1947 by Wiener [33] and represents one of the most studied molecular descriptors. On the other hand, the hyperWiener index takes into account also the squares of distances and was first introduced by Randić in 1993 [30]. The research on the Wiener index, the hyperWiener index and other distancebased descriptors is still a popular topic, see papers [7, 13, 18, 29] for some recent investigations.
The edgeWiener index of a graph was introduced in [21] as the Wiener index of the line graph and has been since then intensively investigated [1, 3, 6, 12, 20, 27, 28]. However, the concept was studied even before as the Wiener index of line graphs, see [4, 17]. Similarly, the edgehyperWiener index was introduced in [22].
A cut method is a powerful method for efficient computation of topological indices of graphs. Some of the earliest results are related to the computation of the Wiener index of benzenoid systems and are presented in [8, 9, 25]. See also [26] for a survey paper on the cut method and [2, 10, 11, 32] for some recent investigations on this topic. In [23] a cut method for the edgeWiener index of benzenoid systems was proposed and in [31] a cut method for the edgehyperWiener index of partial cubes was developed.
Beside benzenoid hydrocarbons, phenylenes represent another interesting class of polycyclic conjugated molecules, whose properties have been extensively studied, see [14, 15]. The Wiener index and the hyperWiener index of phenylenes were studied in [16] and [5], respectively. In this paper, we consider methods for computing the edgeWiener index and the edgehyperWiener index of phenylenes and use them to obtain closed formulas for linear phenylenes.
2 Preliminaries
The distance between two vertices of a graph, denoted by , is defined as the length of a shortest path between and . The Wiener index of a connected graph is
To point out that it is the vertexWiener index, we will also write for . From some technical reasons we also set . The distance between two edges , denoted by , is the usual shortestpath distance between vertices and of the line graph of . Here we follow this convention because in this way the pair forms a metric space. Then the edgeWiener index of a connected graph is defined as
(1) 
In other words, is just the Wiener index of the line graph of . On the other hand, for edges and of a graph it is also legitimate to set
Replacing with in (1), another variant of the edgeWiener index is obtained (see [24]) and we denote it by . However, there is an obvious connection between and :
(2) 
Finally, the vertexedge Wiener index is
where for a vertex and an edge we set
Next, we extend the above definitions to weighted graphs. Let be a connected graph and let and be given functions. Then , , and are a vertexweighted graph, an edgeweighted graph, and a vertexedge weighted graph, respectively. The corresponding Wiener indices of these weighted graphs are defined as
Again, we will often use for and is defined analogously as by using instead of .
For an efficient computation of the Wiener indices of weighted trees we need some additional notation. If is a tree and , then the graph consists of two components that will be denoted by and . For a vertexedge weighted tree , , and set
We then recall the following results:
(3) 
(4) 
(5) 
The hyperWiener index and the edgehyperWiener index of are defined as:
Let be the hexagonal (graphite) lattice and let be a cricuit on it. Then a benzenoid system is induced by the vertices and edges of , lying on and in its interior. Let be a benzenoid system. A vertex shared by three hexagons of is called an internal vertex of . A benzenoid system is said to be catacondensed if it does not possess internal vertices. Otherwise it is called pericondensed. Two distinct hexagons with a common edge are called adjacent. The inner dual of a benzenoid system is a graph which has hexagons of as vertices, two being adjacent whenever the corresponding hexagons are also adjacent. Obviously, the inner dual of a catacondensed benzenoid system is a tree.
Let be a catacondensed benzenoid system. If we add squares between all pairs of adjacent hexagons of , the obtained graph is called a phenylene. We then say that is a hexagonal squeeze of and denote it by .
Let be a phenylene and a hexagonal squeeze for . The edge set of can be naturally partitioned into sets , , and of edges of the same direction. Denote the sets of edges of corresponding to the edges in , , and by , and , respectively. Moreover, let be the set of all the edges of that do not belong to . For , set . The quotient graph , , has connected components of as vertices, two such components and being adjacent in if some edge in joins a vertex of to a vertex of . In a similar way we can define the quotient graphs of hexagonal squeeze . It is known [8] that for any benzenoid system its quotient graphs are trees. Then a tree is isomorphic to for and is isomorphic to the inner dual of .
Now we extend the quotient trees , , to weighted trees , , as follows:

for , let be the number of edges in the component of ;

for , let be the number of edges between components and .
3 A method for computing the edgeWiener index of phenylenes
In this section we show that the edgeWiener index of a phenylene can be computed as the sum of Wiener indices of its weighted quotient trees. The obtained result is similar as the result for the edgeWiener index of benzenoid systems [23], but one additional quotient tree must be considered.
Theorem 3.1
Let be a phenylene. Then
Proof. Let be a phenylene and let , , be its quotient trees. For any we define by
(6) 
We will first show that
(7) 
holds for any pair of edges . Let , such that . Select any shortest path from to in and define for . As is a shortest path, no two edges of belong to the same cut. Since it suffices to show that for it holds . Let be connected components of such that and . It follows that . In order to show that , we consider the following cases:

and .
In this case we have and and the desired conclusion is clear. 
Exactly one of and is in .
We may assume without loss of generality that and . Then for some and . Since , it follows that . 
and .
Now for some and for some . We thus get that .
Since in all possible cases , Equation (7) holds. Applying this result we obtain
The obtained sums can be divided into three sums regarding the function from Equation (6):
Application of the definition of the weighted trees finally results in
The weighted Wiener indices of trees can be computed in linear time by using Equations (3), (4), and (5). Also, the quotient trees can be obtained in linear time as well, for the details see [23]. Consequently, we obtain the following corollary.
Corollary 3.2
Let be a phenylene with edges. Then the edgeWiner index of can be computed in time.
4 A method for computing the edgehyperWiener index of phenylenes
In this section, we briefly introduce the method for computing the edgehyperWiener index of phenylenes, which is based on a general method for partial cubes, see [31]. First, we state some important definitions.
Two edges and of graph are in relation , , if
Note that this relation is also known as DjokovićWinkler relation. The relation is reflexive and symmetric, but not necessarily transitive [19].
The hypercube of dimension is defined in the following way: all vertices of are presented as tuples where for each and two vertices of are adjacent if the corresponding tuples differ in precisely one coordinate. A subgraph of a graph is called an isometric subgraph if for each it holds . Any isometric subgraph of a hypercube is called a partial cube. For an edge of a graph , let be the set of vertices of that are closer to than to . We write for the subgraph of induced by .
The following theorem gives two basic characterizations of partial cubes:
Theorem 4.1
[19] For a connected graph , the following statements are equivalent:

is a partial cube.

is bipartite, and and are convex subgraphs of for all .

is bipartite and .
Furthermore, it is known that when is a partial cube and is a class of , then has exactly two connected components, namely and , where . For more details about partial cubes see [19].
To state the method for computing the edgehyperWiener index of any partial cube, we need to introduce some more notation. If is a partial cube with classes , we denote by and the connected components of the graph , where . For any distinct set
Also, for and we define
Theorem 4.2
[31] Let be a partial cube and let be the number of its classes. Then
The sum from Theorem 4.2 will be denoted by , i.e.
Obviously, by case of Theorem 4.1 any phenylene is a partial cube. An elementary cut of a phenylene is a line segment that starts at the center of a peripheral edge of , goes orthogonal to it and ends at the first next peripheral edge of . By we sometimes also denote the set of edges that are intersected by the corresponding elementary cut. Moreover, an elementary cut of a phenylene coincides with exactly one of its classes.
Let and be two distinct elementary cuts (classes) of a phenylene . Since the elementary cuts can have an intersection or not, we obtain the following two options from Figure 1.
In the following, the contribution of the pair to is denoted as . Therefore, we get
Hence, for phenylene with elementary cuts it holds
5 Linear phenylenes
A hexagon of a phenylene is called terminal if it has a common edge with only one square of , otherwise we say that it is internal. If an internal hexagon has common edges with exactly two other squares, then it has exactly two vertices of degree two. If this two vertices are not adjacent, we say that such hexagon is linear. A phenylene is called linear if all its internal hexagons are linear. A linear phenylene with exactly hexagons will be denoted by , see Figure 2.
We first compute the edgeWiener index. Therefore, we determine the weighted quotient trees from Figure 3.
From the obtained trees it is easy to calculate the sums of weights in corresponding connected components. The results are collected in Table 1.
,  

, 
Using Table 1 we can compute the corresponding Wiener indices of (which are the same also for ):
From Table 1 we also get the corresponding Wiener indices of :
However, the computations for are trivial:
Finally, using Theorem 3.1 we conclude
and by Equation (2) it follows
Next, we consider the edgehyperWiener index of linear phenylenes. We denote the elementary cuts of with , , , and as shown in Figure 4.
The contributions of all the pairs of elementary cuts are presented in Table 2.
The expressions from Table 2 give
Finally, by Theorem 4.2 the edgehyper Wiener index of linear phenylene is equal to
Acknowledgment
The author acknowledge the financial support from the Slovenian Research Agency (research core funding No. P10297).
References
 [1] Y. Alizadeh, A. Iranmanesh, T. Došlić, M. Azari, The edge Wiener index of suspensions, bottlenecks, and thorny graphs, Glas. Mat. Ser. III 49(69) (2014) 1–12.
 [2] M. Arockiaraj, A. J. Shalini, Extended cut method for edge Wiener, Schultz and Gutman indices with applications, MATCH Commun. Math. Comput. Chem. 76 (2016) 233–250.
 [3] M. Azari, A. Iranmanesh, A. Tehranian, A method for calculating an edge version of the Wiener number of a graph operation, Util. Math. 87 (2012) 151–164.
 [4] F. Buckley, Mean distance in line graphs, Congr. Numer. 32 (1981) 153–162.
 [5] G. Cash, S. Klavžar, M. Petkovšek, Three methods for calculation of the hyperWiener index of molecular graphs, J. Chem. Inf. Comput. Sci. 42 (2002) 571–576.
 [6] A. Chen, X. Xiong, F. Lin, Explicit relation between the Wiener index and the edgeWiener index of the catacondensed hexagonal systems, Appl. Math. Comput. 273 (2016) 1100–1106.
 [7] Y.H. Chen, H. Wang, X.D. Zhang, Properties of the hyperWiener index as a local function, MATCH Commun. Math. Comput. Chem. 76 (2016) 745–760.
 [8] V. Chepoi, On distances in benzenoid systems, J. Chem. Inf. Comput. Sci. 36 (1996) 1169–1172.
 [9] V. Chepoi, S. Klavžar, The Wiener index and the Szeged index of benzenoid systems in linear time, J. Chem. Inf. Comput. Sci. 37 (1997) 752–755.
 [10] M. Črepnjak, N. Tratnik, The Szeged index and the Wiener index of partial cubes with applications to chemical graphs, Appl. Math. Comput. 309 (2017) 324–333.
 [11] M. Črepnjak, N. Tratnik, The edgeWiener index, the Szeged indices and the PI index of benzenoid systems in sublinear time, MATCH Commun. Math. Comput. Chem. 78 (2017) 675–688.
 [12] P. Dankelmann, I. Gutman, S. Mukwembi, H. Swart, The edgeWiener index of a graph, Discrete Math. 309 (2009) 3452–3457.
 [13] A. A. Dobrynin, Hexagonal chains with segments of equal lengths having distinct sizes and the same Wiener index, MATCH Commun. Math. Comput. Chem. 78 (2017) 121–132.
 [14] B. Furtula, I. Gutman, Ž. Tomović, A. Vesel, I. Pesek, Wienertype topological indices of phenylenes, Indian J. Chem. 41A (2002) 1767–1772.
 [15] I. Gutman, A. Ashrafi, On the PI index of phenylenes and their hexagonal sqeezes, MATCH Commun. Math. Comput. Chem. 60 (2008) 135–142.
 [16] I. Gutman, G. Dömötör, Wiener number of polyphenyls and phenylenes, Z. Naturforsch 49a (1994) 1040–1044.
 [17] I. Gutman, L. Pavlović, More on distance of line graphs, Graph Theory Notes N. Y. 33 (1997) 14–18.
 [18] A. Ilić, M. Ilić, On some algorithms for computing topological indices of chemical graphs, MATCH Commun. Math. Comput. Chem. 78 (2017) 665–674.
 [19] R. Hammack, W. Imrich, S. Klavžar, Handbook of Product Graphs, Second edition, CRC Press, Taylor & Francis Group, Boca Raton, 2011.
 [20] A. Iranmanesh, M. Azari, EdgeWiener descriptors in chemical graph theory: a survey, Curr. Org. Chem. 19 (2015) 219–239.
 [21] A. Iranmanesh, I. Gutman, O. Khormali, A. Mahmiani, The edge versions of Wiener index, MATCH Commun. Math. Comput. Chem. 61 (2009) 663–672.
 [22] A. Iranmanesh, A. Soltani Kafrani, O. Khormali, A new version of hyperWiener index, MATCH Commun. Math. Comput. Chem. 65 (2011) 113–122.
 [23] A. Kelenc, S. Klavžar, N. Tratnik, The edgeWiener index of benzenoid systems in linear time, MATCH Commun. Math. Comput. Chem. 74 (2015) 521–532.
 [24] M. H. Khalifeh, H. Yousefi Azari, A. R. Ashrafi, S. G. Wagner, Some new results on distancebased graph invariants, European J. Combin. 30 (2009) 1149–1163.
 [25] S. Klavžar, I. Gutman, Wiener number of vertexweighted graphs and a chemical application, Discrete Appl. Math. 80 (1997) 73–81.
 [26] S. Klavžar, M. J. NadjafiArani, Cut method: update on recent developments and equivalence of independent approaches, Curr. Org. Chem. 19 (2015) 348–358.
 [27] M. Knor, P. Potočnik, R. Škrekovski, Relationship between the edgeWiener index and the Gutman index of a graph, Discrete Appl. Math. 167 (2014) 197–201.
 [28] M. J. NadjafiArani, H. Khodashenas, A. R. Ashrafi, Relationship between edge Szeged and edge Wiener indices of graphs, Glas. Mat. Ser. III 47(67) (2012) 21–29.
 [29] H. S. Ramane, V. V. Manjalapur, Note on the bounds on Wiener number of a graph, MATCH Commun. Math. Comput. Chem. 76 (2016) 19–22.
 [30] M. Randić, Novel molecular descriptor for structureproperty studies, Chem. Phys. Lett. 211 (1993) 478–483.
 [31] N. Tratnik, A method for computing the edgehyperWiener index of partial cubes and an algorithm for benzenoid systems, Appl. Anal. Discr. Math., to appear.
 [32] N. Tratnik, The edgeSzeged index and the PI index of benzenoid systems in linear time, MATCH Commun. Math. Comput. Chem. 77 (2017) 393–406.
 [33] H. Wiener, Structural determination of paraffin boiling points, J. Amer. Chem. Soc. 69 (1947) 17–20.
 [34] H. YousefiAzari, M. H. Khalifeh, A. R. Ashrafi, Calculating the edge Wiener and edge Szeged indices of graphs, J. Comput. Appl. Math. 235 (2011) 4866–4870.