# Wiener and Hyper-Wiener Indices of Polygonal Cylinder and Torus

Authors: Zhi-Ba Peng; Abdul Rauf Nizami; Zaffar Iqbal; Muhammad Mobeen Munir; Hafiz Muhammad Waqar Ahmed; Jia-Bao Liu
Journal: Complexity
 (2021)

---

## Abstract

In this study, we first introduce polygonal cylinder and torus using Cartesian products and topologically identifications and then find their Wiener and hyper-Wiener indices using a quick, interesting technique of counting. Our suggested mathematical structures could be of potential interests in representation of computer networks and enhancing lattice hardware security.


---

## Body

## 1. Introduction

The Wiener index was introduced by Harold Wiener in 1947 as the sum of distances between all pairs of vertices in the molecular graph of an alkane, with the evident aim to provide a measure of the compactness of the respective hydrocarbon molecule [1].Wiener index has remarkable variety of chemical applications. Wiener himself used it to predict boiling points, molar volumes, refractive indices, and heats of vaporization of alkanes [2–5]. Gutman showed in [6] that the Wiener index measures the area of the surface of the respective molecule and thus reflects its compactness. As a consequence, it is related to intermolecular forces, especially in the case of hydrocarbons where polar groups are absent [7–9]. Wagner proved that every integer greater or equal to 470 is the Wiener index for a class of trees that is connected to partitions of integers [10]. Wand and Yu proved that every integer n>108 is the Wiener index of some short caterpillar tree with at most six nonleaf vertices [11]. Hua and Wang gave a new sufficient condition for a connected graph to be traceable by means of Harary index [12]. Hua and Ning gave some tight sufficient conditions for traceability and Hamiltonicity of connected graphs with given minimum degree, in terms of Wiener and Harary indices [13]. Recently, Khalid and Idrees computed the Wiener index of Dutch windmill graph [14], and Thilaga and Sarasija found Wiener index of unitary addition Cayley graphs [15].Physical and chemical properties of organic substances, which can be expected to depend on the area of the molecular surface and/or on the branching of the molecular carbon-atom skeleton, are usually well correlated with the Wiener index. Among them are the heats of formation, vaporization and atomization, density, boiling point, critical pressure, refractive index, surface tension and viscosity of various, acyclic and cyclic, saturated and unsaturated as well as aromatic hydrocarbon species, velocity of ultra sound in alkanes and alcohols, rate of electroreduction of chlorobenzenes, etc. [16]. Of particular practical importance is the prediction of the behaviour of organic substances in gas chromatography. For instance, chromatographic retention times of monoalkyl- and 0-dialkylbenzenes can be modeled by the Wiener index [17].Since the pharmacological activity of a substance is related to some of its physico-chemical properties, it is not surprising that attempts have been made to use the Wiener index in designing new drugs [18–20] and hence has a strong impact on stock market. The Wiener index is correlated to cytostatic and antihistaminic activities of certain pharmacologically interesting compounds as well as to their estron-binding affinities [20]. It is also used to study n-octanol to water partition coefficient, a physico-chemical parameter of profound importance, for the forecasting of pharmacological activity of many compounds. To learn more about Wiener index, see [21–33].The hyper-Wiener index was introduced by Randic in 1993 [34]. It is also used to predict physico-chemical properties of organic compounds, particularly to pharmacology, agriculture, and environment protection [35]. In 2008, Khalifeh et al. gave interesting results about the hyper-Wiener index of graph operations [36]. Recently, Raghisa and Nazeran computed the hyper-Wiener index of Dutch windmill graph [14], and Thilaga and Sarasija found the hyper-Wiener index of unitary addition Cayley graphs [15]. For details, see [9, 26, 37–40].This paper is concerned with the polygonal cylinder and torus and their topological invariants, Wiener and hyper-Wiener indices. First of all, the way we are introducing the polygonal cylinder and torus is unique and useful. Although one can see such a cylinder and torus in literature, precise definitions do not exist. We give precise topological definitions so that one can clearly understand the constructions. Our cylinder depends on two parameters,m and n, which determine its base and height and hence help further study about it. Similarly, torus is obtained after identifying the ends of the cylinder. Secondly, we computed the indices directly by definition, not by the usual way of recovering them from the Hosoya polynomial. Although the Wiener and hyper-Wiener indices have profound importance because of their strong correlation to various chemical and pharmaceutical properties of chemical compounds, our purpose of computing these indices is the classification of connected graphs. Finally, we hope the cylinder and torus will play a useful role in studying those graphs which contain them as subgraphs. The lattice sheet of the cylinder can be used in enhancing security in semiconductors.


## 2. Preliminary Notes

A graphG is a pair V,E, where V is the set of vertices and E the set of edges. The edge e between two vertices u and v is denoted by u,v. A path from a vertex v to a vertex w is a sequence of vertices and edges that starts from v and stops at w. The number of edges in a path is the length of that path. The distance between two vertices u and v, denoted by du,v, is the length of the shortest path between them. The diameter of G, denoted by dG, is the longest distance in G. A graph is said to be connected if there is a path between any two of its vertices.Definition 1.
A functionI which assigns to every connected graph G a unique number IG is called a graph invariant. Instead of the function I, it is custom to say the number IG as the invariant. An invariant of a molecular graph which can be used to determine structure-property or structure-activity correlation is called the topological index. A topological index is said to be distance-based if it depends on distances of the vertices of the graph.
In the following, we shall mean bydv,G the sum of distances of v with all vertices of a connected graph G, and we shall mean by dG,k the number of pairs of vertices of G laying at distance k from each other.Definition 2.
(see [1, 41]). The Wiener index WG of a graph G is defined as(1)WG=∑i<jdvi,vj=12∑v∈Vdv,G=12∑k≥1kdG,k.Definition 3.
(see [34, 41]). The hyper-Wiener index WWG of a graph G is defined as(2)WWG=12∑i<jdvi,vj2+dvi,vj=12∑k≥1k2+kdG,k.


## 3. Main Results

### 3.1. Polygonal Cylinder

Definition 4.
Consider the Cartesian productPm×Pn of paths Pm,m≥4, and Pn,n≥2, with vertices u1,u2,…,um and v1,v2,…,vn, respectively. Identify the vertices u1,v1,u1,v2,…,u1,vn with the vertices um,v1um,v2,…,um,vn, respectively, and identify the edge u1,vi,u1,vi+1 with the edge um,vi,um,vi+1, where 1≤i≤n−1. What we receive is the polygonal (actually, Cm,n; we may call it m−1-gonal cylinder. You can see P5×P4 in Figure 1.
For brevity, we shall use the symbolwi,j (vij or simply ij) to represent the vertex ui,vj of Cm,n. In Figure 2, you can see the grid form of C5,4 along with simple labels.
P5×P4 is shown in Figure 3.
In all the following results,n≥3.
A notational digression: by#Ai, we shall mean the number of times Ai appears in D, and by #a∈Ai, we shall mean the number of times a appears in Ai.
To avoid repetitions, only the necessary parts of the proofs are given.Figure 1
P5×P4.Figure 2
C5,4.Figure 3
C5,4.Theorem 1.
Letm be odd. Then, the Wiener and hyper-Wiener indices of the polygonal cylinder Cm,n are(1)
WCm,n=n/24m−124n2+3m−3n−4(2)
WWCm,n=n/48m−12nm2+2n2+n−2m+2n3+2n2−2n−2Proof.
In order to count all distinct paths, we need to find distance of each vertex with every other vertex ofCm,n. For convenience, we shall write lengths of paths in the form of a matrix D, which we shall call the distance matrix. D corresponding to the polygonal cylinder Cm,n is symmetric of order m−1n×m−1n. Each row of D represents the distances from a vertex vij to the vertices v1,1,v1,2,…,v1,n,v2,1,v2,2,…,v2,n,…,vm−1,1,vm−1,2,…,vm−1,n, respectively. Since we need distinct paths, we shall consider only its upper-triangular part. For this, we represent the upper-triangular part by submatrices. There are m+1/2 distinct submatrices A0,A1,A2,A3,…,Am−3/2, and Am−1/2. All these submatrices are symmetric, each having order n×n. Each Ai appears m−1 times except Am−1/2, which appears m−1/2 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m−3/2, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. Am−1/2 appears only in m−1/2th secondary diagonal. Thus, the rows of the distance matrix D are(3)R1=A0,A1,A2,…,Am−3/2,Am−1/2,Am−3/2,Am−5/2,…,A2,A1,R2=A1,A0,A1,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A3,A2,R3=A2,A1,A0,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…,A4,A3,⋮Rm−1n=A1,A2,A3,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A0.
Now, we give the entries of the submatrices. SinceA0 lies on the main diagonal of D, only its upper-triangular part contributes towards counting paths and is(4)A0=0123⋯n−2n−1012⋯n−3n−201⋯n−4n−3⋱⋮⋮⋮012010.
However, all the entries ofAi,1≤i≤m−1/2, contribute towards counting. Since each Ai is symmetric, we give only its upper-triangular part:(5)ii+1i+2i+3⋯i+n−2i+n−1ii+1i+2⋯i+n−3i+n−2ii+1⋯i+n−4i+n−3⋱⋮⋮⋮ii+1i+2ii+1i.
Now, we count the number of paths inCm,n. There are m−1/2+n−1 distinct paths; we shall denote the number of paths of length i by ci,1≤i≤m−1/2+n−1. Depending on lengths, the paths can be divided into four groups: ck,1≤k≤n−1, cn+k,0≤k≤m−1/2−n−1,cm−1/2, and cm−1/2+k,1≤k≤n−1:(6)ck=#k∈A0×#A0+#k∈A1×#A1+#k∈A2×#A2+⋯+#k∈Ak−1×#Ak−1+#k∈Ak×#Ak=n−km−1+2n−k−1m−1+2n−k−2m−1+⋯+2n−1m−1+nm−1=m−1n−k+2n−k−1+2n−k−2+2n−k−3+⋯+2n−1+n=m−1n−k+2n−2k−1+2n−2k−2+2n−2k−3+⋯+2n−21+nm−12kn−21+2+3+⋯+k−1−k=m−12kn−k−1k−k=m−12kn−k2,cm−1/2=#m−12∈A0×#A0+#m−12∈A1×#A1+#m−12∈A2×#A2+#m−12∈A3×#A3+⋯+#m−12∈Am−1/2−1×#Am−1/2−1+#m−12∈Am−1/2×#Am−1/2=n−m−12m−1+2n−m−12+1m−1+n−m−12+2m−1+n−m−12+3m−1+⋯+n−m−12+m−12−1m−1+nm−12=n−m−12+212m−322n−m−12m−1+n2m−1=123n−m+1+m−3n−m−14m−1=−14m−1m2−4n+2m+6n+1.
Now,cm−1/2+k,1≤k≤n−1−m−1/2:(7)cm−1/2+k=#m−12+k∈A0×#A0+#m−12+k∈A1×#A1+#m−12+k∈A2×#A2+#m−12+k∈A3×#A3+⋯+#m−12+k∈Am−1/2−1×#Am−1/2+Am−1/2=n−m−12−km−1+2n−m−12+1−km−1+n−m−12+2−km−1+n−m−12+3−km−1+⋯+n−m−12+m−12−k−1m−1+2n−km−12=−14m−1m2−22n−2k+1m+4n−4k+1.
Finally,cn+k,0≤k≤m−1/2−1:(8)cn+k=#n+k∈Ak+1×#Ak+1+#n+k∈Ak+2×#Ak+2+#n+k∈Ak+3×#Ak+3+⋯+#n+k∈Am−1/2−1×#Am−1/2−1+#n+k∈Am−1/2×#Am−1/2=2m−1+22m−1+23m−1+⋯+2m−12−k−1m−1+2m−12−km−12=m−12−k2.1
WCm,n=∑k=1m−1/2−1kck+m−1/2cm−1/2+∑k=1n−1−m−1/2m−1/2+kcm−1/2+k+∑k=0m−1/2−1n+kcn+k=∑k=1m−1/2−1km−12nk−k2+m−1/2−1/4m−1m2−4n+2m+6n+1+∑k=1n−1−m−1/2m−1/2+k−1/4m−1m2−22n−2k+1m+4n−4k+1+∑k=0m−1/2−1n+k1/4m−1m−2k−12=−1/192m−12m−33m2−16mn−12m+32n+9+−1/8m−12m2−4mn−2m+6n+1+1/96m−12−2n+1+mm2−10mn−8n2+2m+2n−3+1/96m−12m+1m2+8mn−4m+3=n/24m−124n2+3m−3n−4.2
WWCm,n=1/2∑k=1m−1/2−1k2+kck+1/2m−1/22+m−1/2cm−1/2+1/2∑k=1n−1−m−1/2m−1/2+k2+m−1/2+kcm−1/2+k+1/2∑k=0m−1/2−1n+k2+n+kcn+k=1/2∑k=1m−1/2−1k2+km−12nk−k2+1/2m−1/22+m−1/2−1/4m−1m2−4n+2m+6n+1+1/2∑k=1n−1−m−1/2m−1/2+k2+m−1/2+k−1/4m−1m2−22n−2k+1m+4n−4k+1+1/2∑k=0m−1/2−1n+k2+n+k1/4m−1m−2k−12=−1/1920m−12m+1m−36m2−30mn−27m+70n+25+−1/32m−12m+1m2−4mn−2m+6n+1+1/384m−12−2n+1+mm3−6m2n−12mn2−8n3+3m2−12mn−12n2−m+2n−3+1/1920m−12m+1m3+10m2n+40mn2−9m+30n=n/48m−12m2n+2mn2+2n3+mn+2n2−2m−2n−2.Example 1.
Forn=5 and m=5, the distance matrix of order 20×20 is D=A0A1A2A1A1A0A1A2A2A1A0A1A1A2A1A0, where the submatrices are A0=0123410123210123210143210, A1=1234521234321234321254321, and A2=2345632345432345432365432. The Wiener and hyper-Wiener indices for odd m<2n−1 and for n=5 are, respectively, W=2m−12m+4 and WW=1/6m−122m2+17m+75. The graphs of W and WW are shown in Figure 4.Figure 4
(a) Wiener index and (b) hyper-Wiener index forn=5.
(a)(b)Theorem 2.
For evenm, we have(1)
WCm,n=n/24m−13nm2+4n2−6n−4m−4n2+4(2)
WWCm,n=n/48m−1nm3+2n2−1m2+2n3−3nm−2n3−4n2+2n+4Proof.
The rows of the distance matrixD are(9)R1=A0,A1,A2,…,Am/2−2,Am/2−1,Am/2−1,Am/2−2,Am/2−3,…,A2,A1,R2=A1,A0,A1,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A3,A2,R3=A2,A1,A0,…,Am/2−4,Am/2−3,Am/2−2,Am/2−1,Am/2−1,…,A4,A3,⋮Rm−1n=A1,A2,…,Am/2−3,Am/2−2,Am/2−1,Am/2−2,…,A2,A1,A0.
Each submatrixA0,A1,A2,A3,…,Am/2−2 and Am/2−1 appears m−1 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m/2−1, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. These submatrices are the same as in Theorem 1. The paths are divided into three groups: ck,1≤k≤n−1, ck+n,0≤k≤m/2−n−1, and cm/2+k,0≤k≤n−2. ck and ck+n are already given in Theorem 1. We need only cm/2+k:(10)cm/2+k=#m2+k∈Am/2−n+k+1×#Am/2−n+k+1+#m2+k∈Am/2−n+k+2×#Am/2−n+k+2+#m2+k∈Am/2−n+k+3×#Am/2−n+k+3+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=2m−1+22m−1+23m−1+⋯+2n−k+2m−1+2n−k+1m−1=m−121+2+3+⋯+n−k+2+n−k+1=m−1n−k+1n−k=m−1n−k2−n−k.


### 3.2. Polygonal Torus

Definition 5.
Consider the Cartesian productPm×Pn of paths Pm,m≥4, and Pn,n≥4, with vertices u1,u2,…,um and v1,v2,…,vn, respectively. Then, identify, respectively, the vertices u1,vj with the vertices um,vj for 1≤j≤n and identify, respectively, the edges u1,vi,u1,vi+1, with the edges um,vi,um,vi+1 for 1≤i≤n−1; this way we receive a polygonal cylinder. Finally, identify, respectively, the vertices ui,v1 with the vertices ui,vm for 1≤i≤m and identify, respectively, the edges ui,v1,ui+1,v1 with the edges ui,vn,ui+1,vn for 1≤i≤m. What we receive is the polygonal torus Tm,n. For instance, you can see the construction of T4,7 in Figures 5–8.
For brevity, we shall use the symbolwi,j (vij or simply ij) to represent the vertex ui,vj of Tm,n. In the following, you can see the grid form of T4,7 with simple labels.
First of all, we identify, respectively, the verticesv1,j with the vertices v4,j and identify, respectively, edges v1,j,v1,j+1 with the edges v4,j,v4,j+1 for 1≤j≤7 and receive a cylinder.
Finally, after identification of the verticesvi,1 with the vertices vi,7 and the edges vi,1,vi+1,1 with the edges vi,7,vi+1,7 for 1≤i≤3 we get the polygonal torus T4,7.
In the following,m,n≥4.Figure 5
P4×P7.Figure 6
Grid form ofT4,7.Figure 7
First fold ofP4×P7.Figure 8
T4,7.Theorem 3.
Letm and n be odd. Then,(1)
WCm,n=1/8m−1n−12m2+mn+5n−n+2(2)
WWCm,n=1/48m−1n−122m3+2m2n+2mn2+21m2−4mn−2n2+52m+n+21Proof.
We prove it using the distance matrixD corresponding to the polygonal torus Tm,n, which is symmetric and have order m−1n−1×m−1n−1. Each row of D represents the distances from a vertex vij to the vertices v1,1,v1,2,…,v1,n,v2,1,v2,2,…,v2,n,…,vm−1,1,vm−1,2,…,vm−1,n, respectively. Since we need distinct paths, we shall consider only its upper-triangular part. For this, we represent the upper-triangular part by submatrices. There are m−1/2 distinct submatrices A0,A1,A2,A3,…,Am−3/2,Am−1/2. All these submatrices are symmetric, each having order n−1×n−1. Each Ai appears m−1 times except Am−1/2, which appears m−1/2 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m−3/2, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. Am−1/2 appears only in m−1/2th secondary diagonal.
The rows ofD are(11)R1=A0,A1,A2,…,Am−3/2,Am−1/2,Am−3/2,Am−5/2,…,A2,A1,R2=A1,A0,A1,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A3,A2,R3=A2,A1,A0,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…,A4,A3,R4=A3,A2,A1,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…A5,A4,⋮Rm−1n−1=A1,A2,A3,…,Am−1/2,Am−3/2,…,A1,A0.
The rows ofAi,0≤i≤m−1/2, are(12)R1=i,i+1,i+2,i+3,…,i+n−12−1,i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,R2=i+1,i,i+1,i+2,…,i+n−12−2,i+n−12−1,i+n−12,i+n−12−1,…,i+3,i+2,R3=i+2,i+1,i,i+1,…,i+n−12−3,i+n−12−2,i+n−12−1,i+n−12,…,i+4,i+3,⋮Rn−1/2=i+n−12−1,i+n−12−2,i+n−12−3,…,i+1,i,i+1,i+2,…,i+n−12−2,i+n−12−1,i+n−12,Rn−1/2+1=i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,i,i+1,…,i+n−12−3,i+n−12−2,i+n−12−1,Rn−1/2+2=i+n−12−1,i+n−12,i+n−12−1,…,i+3,i+2,i+1,i,…,i+n−12−4,i+n−12−3,i+n−12−2,⋮Rn−2=i+2,i+3,i+4,…,i+n−12−1,i+n−12−2,i+n−12−3,…,i+1,i,i+1,Rn−1=i+1,i+2,i+3,…,i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,i.
Here, all entries of eachAi contribute towards counting except A0, whose only upper-triangular entries contribute. The remaining part of the proof is similar to the proof of Theorem 1.Theorem 4.
Letm be odd and n be even. Then,(1)
WCm,n=1/8m−1n−1m2n+mn2−m2+4mn−n2−6m+3n−1(2)
WWCm,n=1/48m−1n−12m3n+3m2n2+2mn3−2m3+18m2n−4mn2−2n3−24m2+50mn+3n2−46m+26n−24Proof.
D is the same as in Theorem 3. However, the entries of Ai,0≤i≤m−1/2, are different and are(13)R1=i,i+1,i+2,i+3,…,i+n2−2,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,R2=i+1,i,i+1,i+2,…,i+n2−3,i+n2−2,i+n2−1,i+n2−1,i+n2−2,…,i+3,i+2,R3=i+2,i+1,i,i+1,…,i+n2−4,i+n2−3,i+n2−2,i+n2−1,i+n2−1,…,i+4,i+3,⋮Rn/2−1=i+n2−2,i+n2−3,i+n2−4,…,i+1,i,i+1,i+2,…,i+n2−2,i+n2−1,i+n2−1,Rn/2=i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,i,i+1,…,i+n2−3,i+n2−2,i+n2−1,Rn/2+1=i+n2−1,i+n2−1,i+n2−2,…,i+3,i+2,i+1,i,…,i+n2−4,i+n2−3,i+n2−2,Rn/2+2=i+n2−2,i+n2−1,i+n2−1,…,i+4,i+3,i+2,i+1,…,i+n2−5,i+n2−4,i+n2−3,⋮Rn−2=i+2,i+3,i+4,…,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+1,i,i+1,Rn−1=i+1,i+2,i+3,…,i+n2−2,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,i.Theorem 5.
Letm be even and n be odd. Then,(1)
WCm,n=1/8m−1n−12m2+mn+5m−n+9(2)
WWCm,n=1/48m−1n−122m3+3m2n+2mn2+21m2−4mn−2n2+94m−2n+96Proof.
Here,D has order m−1n−1×m−1n−1, and there are m/2−1 distinct submatrices A0,A1,A2,A3,…,Am/2−2 and Am/2−1. All these submatrices are symmetric, each having order n−1×n−1. Each Ai appears m−1 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m/2−1, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. The rows of D are(14)R1=A0,A1,A2,…,Am/2−2,Am/2−1,Am/2−1,Am/2−2,Am/2−3,…,A2,A1,R2=A1,A0,A1,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A3,A2,R3=A2,A1,A0,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A4,A3,⋮Rm−1n−1=A1,A2,A3,…,Am/2−1,Am/2−1,Am/2−2,…,A2,A1,A0.
The submatricesAi,0≤i≤m/2−1, are the same as thosein Theorem 3. The proofs of ck, cn−1/2, and cn−1/2+k are already given in Theorem 3. We need only cm/2+k,0≤k≤n−1/2:(15)cm/2+k=#m2+k∈Am/2−n−1/2+k×#Am/2−n−1/2+k+#m2+k∈Am/2−n−1/2+k+1×#Am/2−n−1/2+k+1+#m2+k∈Am/2−n−1/2+k+2×#Am/2−n−1/2+k+2+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=n−1m−1+2n−1m−1+2n−1m−1+⋯+2n−1m−1+2n−1m−1=n−1m−11+2+2+⋯+2+2=n−1m−1n−2k+1.Theorem 6.
For evenm and n, we obtain(1)
WCm,n=1/8m−1n−1m+n−2mn−m−n(2)
WWCm,n=1/48m−1n−12m3n+2m2n2+2mn3−2m3−6m2n−6mn2−2n3−4mn+8m+nProof.
Here, the distance matrixD is the same as that in Theorem 5. Also, the submatrices Ai,0≤i≤m/2−1 are the same as those in Theorem 4. The proofs of ck and cn/2+k are similar to proofs given in Theorem 4. We need only cm/2+k,0≤k≤n/2−2:(16)cm/2+k=#m2+k∈Am/2−n/2+k+1×#Am/2−n/2+k+1+#m2+k∈Am/2−n/2+k+2×#Am/2−n/2+k+2+#m2+k∈Am/2−n/2+k+3×#Am/2−n/2+k+3+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=2n−1m−1+2n−1m−1+2n−1m−1+⋯+2n−1m−1+2n−1m−1=n−1m−12+2+2+⋯+2+2=n−1m−1n−2k+1.


## 3.1. Polygonal Cylinder

Definition 4.
Consider the Cartesian productPm×Pn of paths Pm,m≥4, and Pn,n≥2, with vertices u1,u2,…,um and v1,v2,…,vn, respectively. Identify the vertices u1,v1,u1,v2,…,u1,vn with the vertices um,v1um,v2,…,um,vn, respectively, and identify the edge u1,vi,u1,vi+1 with the edge um,vi,um,vi+1, where 1≤i≤n−1. What we receive is the polygonal (actually, Cm,n; we may call it m−1-gonal cylinder. You can see P5×P4 in Figure 1.
For brevity, we shall use the symbolwi,j (vij or simply ij) to represent the vertex ui,vj of Cm,n. In Figure 2, you can see the grid form of C5,4 along with simple labels.
P5×P4 is shown in Figure 3.
In all the following results,n≥3.
A notational digression: by#Ai, we shall mean the number of times Ai appears in D, and by #a∈Ai, we shall mean the number of times a appears in Ai.
To avoid repetitions, only the necessary parts of the proofs are given.Figure 1
P5×P4.Figure 2
C5,4.Figure 3
C5,4.Theorem 1.
Letm be odd. Then, the Wiener and hyper-Wiener indices of the polygonal cylinder Cm,n are(1)
WCm,n=n/24m−124n2+3m−3n−4(2)
WWCm,n=n/48m−12nm2+2n2+n−2m+2n3+2n2−2n−2Proof.
In order to count all distinct paths, we need to find distance of each vertex with every other vertex ofCm,n. For convenience, we shall write lengths of paths in the form of a matrix D, which we shall call the distance matrix. D corresponding to the polygonal cylinder Cm,n is symmetric of order m−1n×m−1n. Each row of D represents the distances from a vertex vij to the vertices v1,1,v1,2,…,v1,n,v2,1,v2,2,…,v2,n,…,vm−1,1,vm−1,2,…,vm−1,n, respectively. Since we need distinct paths, we shall consider only its upper-triangular part. For this, we represent the upper-triangular part by submatrices. There are m+1/2 distinct submatrices A0,A1,A2,A3,…,Am−3/2, and Am−1/2. All these submatrices are symmetric, each having order n×n. Each Ai appears m−1 times except Am−1/2, which appears m−1/2 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m−3/2, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. Am−1/2 appears only in m−1/2th secondary diagonal. Thus, the rows of the distance matrix D are(3)R1=A0,A1,A2,…,Am−3/2,Am−1/2,Am−3/2,Am−5/2,…,A2,A1,R2=A1,A0,A1,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A3,A2,R3=A2,A1,A0,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…,A4,A3,⋮Rm−1n=A1,A2,A3,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A0.
Now, we give the entries of the submatrices. SinceA0 lies on the main diagonal of D, only its upper-triangular part contributes towards counting paths and is(4)A0=0123⋯n−2n−1012⋯n−3n−201⋯n−4n−3⋱⋮⋮⋮012010.
However, all the entries ofAi,1≤i≤m−1/2, contribute towards counting. Since each Ai is symmetric, we give only its upper-triangular part:(5)ii+1i+2i+3⋯i+n−2i+n−1ii+1i+2⋯i+n−3i+n−2ii+1⋯i+n−4i+n−3⋱⋮⋮⋮ii+1i+2ii+1i.
Now, we count the number of paths inCm,n. There are m−1/2+n−1 distinct paths; we shall denote the number of paths of length i by ci,1≤i≤m−1/2+n−1. Depending on lengths, the paths can be divided into four groups: ck,1≤k≤n−1, cn+k,0≤k≤m−1/2−n−1,cm−1/2, and cm−1/2+k,1≤k≤n−1:(6)ck=#k∈A0×#A0+#k∈A1×#A1+#k∈A2×#A2+⋯+#k∈Ak−1×#Ak−1+#k∈Ak×#Ak=n−km−1+2n−k−1m−1+2n−k−2m−1+⋯+2n−1m−1+nm−1=m−1n−k+2n−k−1+2n−k−2+2n−k−3+⋯+2n−1+n=m−1n−k+2n−2k−1+2n−2k−2+2n−2k−3+⋯+2n−21+nm−12kn−21+2+3+⋯+k−1−k=m−12kn−k−1k−k=m−12kn−k2,cm−1/2=#m−12∈A0×#A0+#m−12∈A1×#A1+#m−12∈A2×#A2+#m−12∈A3×#A3+⋯+#m−12∈Am−1/2−1×#Am−1/2−1+#m−12∈Am−1/2×#Am−1/2=n−m−12m−1+2n−m−12+1m−1+n−m−12+2m−1+n−m−12+3m−1+⋯+n−m−12+m−12−1m−1+nm−12=n−m−12+212m−322n−m−12m−1+n2m−1=123n−m+1+m−3n−m−14m−1=−14m−1m2−4n+2m+6n+1.
Now,cm−1/2+k,1≤k≤n−1−m−1/2:(7)cm−1/2+k=#m−12+k∈A0×#A0+#m−12+k∈A1×#A1+#m−12+k∈A2×#A2+#m−12+k∈A3×#A3+⋯+#m−12+k∈Am−1/2−1×#Am−1/2+Am−1/2=n−m−12−km−1+2n−m−12+1−km−1+n−m−12+2−km−1+n−m−12+3−km−1+⋯+n−m−12+m−12−k−1m−1+2n−km−12=−14m−1m2−22n−2k+1m+4n−4k+1.
Finally,cn+k,0≤k≤m−1/2−1:(8)cn+k=#n+k∈Ak+1×#Ak+1+#n+k∈Ak+2×#Ak+2+#n+k∈Ak+3×#Ak+3+⋯+#n+k∈Am−1/2−1×#Am−1/2−1+#n+k∈Am−1/2×#Am−1/2=2m−1+22m−1+23m−1+⋯+2m−12−k−1m−1+2m−12−km−12=m−12−k2.1
WCm,n=∑k=1m−1/2−1kck+m−1/2cm−1/2+∑k=1n−1−m−1/2m−1/2+kcm−1/2+k+∑k=0m−1/2−1n+kcn+k=∑k=1m−1/2−1km−12nk−k2+m−1/2−1/4m−1m2−4n+2m+6n+1+∑k=1n−1−m−1/2m−1/2+k−1/4m−1m2−22n−2k+1m+4n−4k+1+∑k=0m−1/2−1n+k1/4m−1m−2k−12=−1/192m−12m−33m2−16mn−12m+32n+9+−1/8m−12m2−4mn−2m+6n+1+1/96m−12−2n+1+mm2−10mn−8n2+2m+2n−3+1/96m−12m+1m2+8mn−4m+3=n/24m−124n2+3m−3n−4.2
WWCm,n=1/2∑k=1m−1/2−1k2+kck+1/2m−1/22+m−1/2cm−1/2+1/2∑k=1n−1−m−1/2m−1/2+k2+m−1/2+kcm−1/2+k+1/2∑k=0m−1/2−1n+k2+n+kcn+k=1/2∑k=1m−1/2−1k2+km−12nk−k2+1/2m−1/22+m−1/2−1/4m−1m2−4n+2m+6n+1+1/2∑k=1n−1−m−1/2m−1/2+k2+m−1/2+k−1/4m−1m2−22n−2k+1m+4n−4k+1+1/2∑k=0m−1/2−1n+k2+n+k1/4m−1m−2k−12=−1/1920m−12m+1m−36m2−30mn−27m+70n+25+−1/32m−12m+1m2−4mn−2m+6n+1+1/384m−12−2n+1+mm3−6m2n−12mn2−8n3+3m2−12mn−12n2−m+2n−3+1/1920m−12m+1m3+10m2n+40mn2−9m+30n=n/48m−12m2n+2mn2+2n3+mn+2n2−2m−2n−2.Example 1.
Forn=5 and m=5, the distance matrix of order 20×20 is D=A0A1A2A1A1A0A1A2A2A1A0A1A1A2A1A0, where the submatrices are A0=0123410123210123210143210, A1=1234521234321234321254321, and A2=2345632345432345432365432. The Wiener and hyper-Wiener indices for odd m<2n−1 and for n=5 are, respectively, W=2m−12m+4 and WW=1/6m−122m2+17m+75. The graphs of W and WW are shown in Figure 4.Figure 4
(a) Wiener index and (b) hyper-Wiener index forn=5.
(a)(b)Theorem 2.
For evenm, we have(1)
WCm,n=n/24m−13nm2+4n2−6n−4m−4n2+4(2)
WWCm,n=n/48m−1nm3+2n2−1m2+2n3−3nm−2n3−4n2+2n+4Proof.
The rows of the distance matrixD are(9)R1=A0,A1,A2,…,Am/2−2,Am/2−1,Am/2−1,Am/2−2,Am/2−3,…,A2,A1,R2=A1,A0,A1,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A3,A2,R3=A2,A1,A0,…,Am/2−4,Am/2−3,Am/2−2,Am/2−1,Am/2−1,…,A4,A3,⋮Rm−1n=A1,A2,…,Am/2−3,Am/2−2,Am/2−1,Am/2−2,…,A2,A1,A0.
Each submatrixA0,A1,A2,A3,…,Am/2−2 and Am/2−1 appears m−1 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m/2−1, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. These submatrices are the same as in Theorem 1. The paths are divided into three groups: ck,1≤k≤n−1, ck+n,0≤k≤m/2−n−1, and cm/2+k,0≤k≤n−2. ck and ck+n are already given in Theorem 1. We need only cm/2+k:(10)cm/2+k=#m2+k∈Am/2−n+k+1×#Am/2−n+k+1+#m2+k∈Am/2−n+k+2×#Am/2−n+k+2+#m2+k∈Am/2−n+k+3×#Am/2−n+k+3+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=2m−1+22m−1+23m−1+⋯+2n−k+2m−1+2n−k+1m−1=m−121+2+3+⋯+n−k+2+n−k+1=m−1n−k+1n−k=m−1n−k2−n−k.


## 3.2. Polygonal Torus

Definition 5.
Consider the Cartesian productPm×Pn of paths Pm,m≥4, and Pn,n≥4, with vertices u1,u2,…,um and v1,v2,…,vn, respectively. Then, identify, respectively, the vertices u1,vj with the vertices um,vj for 1≤j≤n and identify, respectively, the edges u1,vi,u1,vi+1, with the edges um,vi,um,vi+1 for 1≤i≤n−1; this way we receive a polygonal cylinder. Finally, identify, respectively, the vertices ui,v1 with the vertices ui,vm for 1≤i≤m and identify, respectively, the edges ui,v1,ui+1,v1 with the edges ui,vn,ui+1,vn for 1≤i≤m. What we receive is the polygonal torus Tm,n. For instance, you can see the construction of T4,7 in Figures 5–8.
For brevity, we shall use the symbolwi,j (vij or simply ij) to represent the vertex ui,vj of Tm,n. In the following, you can see the grid form of T4,7 with simple labels.
First of all, we identify, respectively, the verticesv1,j with the vertices v4,j and identify, respectively, edges v1,j,v1,j+1 with the edges v4,j,v4,j+1 for 1≤j≤7 and receive a cylinder.
Finally, after identification of the verticesvi,1 with the vertices vi,7 and the edges vi,1,vi+1,1 with the edges vi,7,vi+1,7 for 1≤i≤3 we get the polygonal torus T4,7.
In the following,m,n≥4.Figure 5
P4×P7.Figure 6
Grid form ofT4,7.Figure 7
First fold ofP4×P7.Figure 8
T4,7.Theorem 3.
Letm and n be odd. Then,(1)
WCm,n=1/8m−1n−12m2+mn+5n−n+2(2)
WWCm,n=1/48m−1n−122m3+2m2n+2mn2+21m2−4mn−2n2+52m+n+21Proof.
We prove it using the distance matrixD corresponding to the polygonal torus Tm,n, which is symmetric and have order m−1n−1×m−1n−1. Each row of D represents the distances from a vertex vij to the vertices v1,1,v1,2,…,v1,n,v2,1,v2,2,…,v2,n,…,vm−1,1,vm−1,2,…,vm−1,n, respectively. Since we need distinct paths, we shall consider only its upper-triangular part. For this, we represent the upper-triangular part by submatrices. There are m−1/2 distinct submatrices A0,A1,A2,A3,…,Am−3/2,Am−1/2. All these submatrices are symmetric, each having order n−1×n−1. Each Ai appears m−1 times except Am−1/2, which appears m−1/2 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m−3/2, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. Am−1/2 appears only in m−1/2th secondary diagonal.
The rows ofD are(11)R1=A0,A1,A2,…,Am−3/2,Am−1/2,Am−3/2,Am−5/2,…,A2,A1,R2=A1,A0,A1,…,Am−5/2,Am−3/2,Am−1/2,Am−3/2,…,A3,A2,R3=A2,A1,A0,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…,A4,A3,R4=A3,A2,A1,…,Am−7/2,Am−5/2,Am−3/2,Am−1/2,…A5,A4,⋮Rm−1n−1=A1,A2,A3,…,Am−1/2,Am−3/2,…,A1,A0.
The rows ofAi,0≤i≤m−1/2, are(12)R1=i,i+1,i+2,i+3,…,i+n−12−1,i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,R2=i+1,i,i+1,i+2,…,i+n−12−2,i+n−12−1,i+n−12,i+n−12−1,…,i+3,i+2,R3=i+2,i+1,i,i+1,…,i+n−12−3,i+n−12−2,i+n−12−1,i+n−12,…,i+4,i+3,⋮Rn−1/2=i+n−12−1,i+n−12−2,i+n−12−3,…,i+1,i,i+1,i+2,…,i+n−12−2,i+n−12−1,i+n−12,Rn−1/2+1=i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,i,i+1,…,i+n−12−3,i+n−12−2,i+n−12−1,Rn−1/2+2=i+n−12−1,i+n−12,i+n−12−1,…,i+3,i+2,i+1,i,…,i+n−12−4,i+n−12−3,i+n−12−2,⋮Rn−2=i+2,i+3,i+4,…,i+n−12−1,i+n−12−2,i+n−12−3,…,i+1,i,i+1,Rn−1=i+1,i+2,i+3,…,i+n−12,i+n−12−1,i+n−12−2,…,i+2,i+1,i.
Here, all entries of eachAi contribute towards counting except A0, whose only upper-triangular entries contribute. The remaining part of the proof is similar to the proof of Theorem 1.Theorem 4.
Letm be odd and n be even. Then,(1)
WCm,n=1/8m−1n−1m2n+mn2−m2+4mn−n2−6m+3n−1(2)
WWCm,n=1/48m−1n−12m3n+3m2n2+2mn3−2m3+18m2n−4mn2−2n3−24m2+50mn+3n2−46m+26n−24Proof.
D is the same as in Theorem 3. However, the entries of Ai,0≤i≤m−1/2, are different and are(13)R1=i,i+1,i+2,i+3,…,i+n2−2,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,R2=i+1,i,i+1,i+2,…,i+n2−3,i+n2−2,i+n2−1,i+n2−1,i+n2−2,…,i+3,i+2,R3=i+2,i+1,i,i+1,…,i+n2−4,i+n2−3,i+n2−2,i+n2−1,i+n2−1,…,i+4,i+3,⋮Rn/2−1=i+n2−2,i+n2−3,i+n2−4,…,i+1,i,i+1,i+2,…,i+n2−2,i+n2−1,i+n2−1,Rn/2=i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,i,i+1,…,i+n2−3,i+n2−2,i+n2−1,Rn/2+1=i+n2−1,i+n2−1,i+n2−2,…,i+3,i+2,i+1,i,…,i+n2−4,i+n2−3,i+n2−2,Rn/2+2=i+n2−2,i+n2−1,i+n2−1,…,i+4,i+3,i+2,i+1,…,i+n2−5,i+n2−4,i+n2−3,⋮Rn−2=i+2,i+3,i+4,…,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+1,i,i+1,Rn−1=i+1,i+2,i+3,…,i+n2−2,i+n2−1,i+n2−1,i+n2−2,i+n2−3,…,i+2,i+1,i.Theorem 5.
Letm be even and n be odd. Then,(1)
WCm,n=1/8m−1n−12m2+mn+5m−n+9(2)
WWCm,n=1/48m−1n−122m3+3m2n+2mn2+21m2−4mn−2n2+94m−2n+96Proof.
Here,D has order m−1n−1×m−1n−1, and there are m/2−1 distinct submatrices A0,A1,A2,A3,…,Am/2−2 and Am/2−1. All these submatrices are symmetric, each having order n−1×n−1. Each Ai appears m−1 times. A0 appears only on the main diagonal of D. Ai,1≤i≤m/2−1, appears m−i+1 times in ith secondary diagonal and i times in m−i−1th secondary diagonal. The rows of D are(14)R1=A0,A1,A2,…,Am/2−2,Am/2−1,Am/2−1,Am/2−2,Am/2−3,…,A2,A1,R2=A1,A0,A1,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A3,A2,R3=A2,A1,A0,…,Am/2−3,Am/2−2,Am/2−1,Am/2−1,Am/2−2,…,A4,A3,⋮Rm−1n−1=A1,A2,A3,…,Am/2−1,Am/2−1,Am/2−2,…,A2,A1,A0.
The submatricesAi,0≤i≤m/2−1, are the same as thosein Theorem 3. The proofs of ck, cn−1/2, and cn−1/2+k are already given in Theorem 3. We need only cm/2+k,0≤k≤n−1/2:(15)cm/2+k=#m2+k∈Am/2−n−1/2+k×#Am/2−n−1/2+k+#m2+k∈Am/2−n−1/2+k+1×#Am/2−n−1/2+k+1+#m2+k∈Am/2−n−1/2+k+2×#Am/2−n−1/2+k+2+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=n−1m−1+2n−1m−1+2n−1m−1+⋯+2n−1m−1+2n−1m−1=n−1m−11+2+2+⋯+2+2=n−1m−1n−2k+1.Theorem 6.
For evenm and n, we obtain(1)
WCm,n=1/8m−1n−1m+n−2mn−m−n(2)
WWCm,n=1/48m−1n−12m3n+2m2n2+2mn3−2m3−6m2n−6mn2−2n3−4mn+8m+nProof.
Here, the distance matrixD is the same as that in Theorem 5. Also, the submatrices Ai,0≤i≤m/2−1 are the same as those in Theorem 4. The proofs of ck and cn/2+k are similar to proofs given in Theorem 4. We need only cm/2+k,0≤k≤n/2−2:(16)cm/2+k=#m2+k∈Am/2−n/2+k+1×#Am/2−n/2+k+1+#m2+k∈Am/2−n/2+k+2×#Am/2−n/2+k+2+#m2+k∈Am/2−n/2+k+3×#Am/2−n/2+k+3+⋯+#m2+k∈Am/2−2×#Am/2−2+#m2+k∈Am/2−1×#Am/2−1=2n−1m−1+2n−1m−1+2n−1m−1+⋯+2n−1m−1+2n−1m−1=n−1m−12+2+2+⋯+2+2=n−1m−1n−2k+1.


## 4. Conclusion and Discussion

In this paper, we introduced two objects, polygonal cylinder and polygonal torus, using Cartesian product of pathsPmandPn and using topological identifications. We hope that it will play a useful role in studying molecular graphs, particularly, nanotubes and nanocones, involving them as subgraphs. Secondly, we gave the general closed forms their Wiener and hyper-Wiener indices. We found all possible cases of the indices depending on odd and even mandn. The approach to compute these indices was simple, quick, and interesting.Actually, we first enlisted all the distances as entries of a matrix and then found its submatrices to count the paths. You can see the values of these indices for several different values ofm and n in Tables 1 and 2 and can see the graphs of Wiener and hyper-Wiener indices in Figures 9–11. To simplify long expressions we used MAPLE.Figure 9
(a) Wiener index and (b) hyper-Wiener index for evenm.
(a)(b)Figure 10
(a) Wiener index and (b) hyper-Wiener index for oddmandn.
(a)(b)Figure 11
(a) Wiener index and (b) hyper-Wiener index for evenmandn.
(a)(b)Table 1
Wiener and hyper-Wiener indices the cylinder.
ResultnmWWWTheorem1555201130Theorem169454432280Theorem2385741211Theorem2412385011275Table 2
Wiener and hyper-Wiener indices of the torus.
ResultnmWWWTheorem3513710446080Theorem372161920593040Theorem4411241513530Theorem461723440187360Theorem59201033601001072Theorem511242754253142950Theorem681842126343196Theorem610221332451323000



---

*Source: 8882646-2021-04-09.xml*