Cite

Introduction

Several graph polynomials have been introduced so far, as the chromatic polynomial [2], the Tutte polynomial, the Hosoya polynomial, and the M-polynomial. All these polynomials play important roles in graph theory, particularly due to their applications. The chromatic polynomial counts the number of distinct ways to color a graph with a number of given colors. The Tutte polynomial [5] became popular because of its universal property that any multiplicative graph invariant with a deletion-contraction reduction must be an evaluation of it. The Hosoya polynomial [4] counts the number of paths of different lengths in a molecular graph, and now plays a key role to find distance-based topological indices. The M-polynomial [3] plays a crucial role for degree-based topological indices parallel to the role the Hosoya polynomial plays for distance-based invariants.

In this paper we introduce the walk polynomial to find the number of walks of different lengths in a graph. We not only give a way of computing it but also give walk polynomial of the bipartite, star, wheel, and gear graphs.

Preliminaries

A graphG is a pair (V, E), where V = {v1, v2, …, vn} is the set of vertices and E = {e1, e2, …, vm} is the set of edges. An edge e between two vertices u and v is denoted by e = (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. A graph is said to be connected if there is a path between any two of its vertices. The distanced(u, v) between two vertices u, v of a connected graph G is the length of a shortest path between them. The diameter of G, denoted by d(G), is the longest distance in G.

Definition 2.1

A walk between two vertices u and v of G is finite alternating sequence u = v0, e1, v1, e2, v2, e3, v3, …, ek, vk = v of vertices and edges of G such that the edge ei joins the vertices vi–1 and vi.

Theorem 2.2

[1] If A is the adjacency matrix of simple graph G, then the entryaijAk is the number of different walks of length k between the vertices i and j.

In the following we introduce the walk polynomial as a new graph invariant, a function which assigns a single value to all isomorphic graphs.

Definition 2.3

The walk polynomial in variable x of a simple connected graph G is defined as

W(G,x)=12k=1d(G)(aijAkaijtr(Ak))xk,$$\begin{array}{} \displaystyle \mathscr{W}(G,x) =\frac{1}{2}\sum_{k=1}^{d(G)}\big(\sum_{a_{ij}\in A^{k}}a_{ij}-tr(A^{k})\big)x^{k}, \end{array}$$

where A is the adjacency matrix of G.

Main Results

In this section we give the walk polynomial of the complete bipartite, star, wheel, and gear graphs.

First of all we give the walk polynomial of the complete bipartite graph Km,n.

Theorem 3.1

The walk polynomial of the complete bipartite graphKm,n, m ≥ 2, n ≥ 1, is 𝓦 (Km,n) = mnx1 + mn2(m+n2)x2.$\begin{array}{} \displaystyle \frac{mn}{2}(m+n-2)x^{2}. \end{array}$

Proof

Since the diameter of Km,n is 2, we need only two matrices, the adjacency matrix A and its square matrix A2. In order to give the total number of walks of lengths 1 and 2, we first give the general forms of A and A2. The (m + n) × (m + n) adjacency matrix corresponding to Km,n is

A=Om,mJm,nJm,nTOn,n,$$\begin{array}{} \displaystyle A=\left( \begin{array}{cc} O_{m,m} & J_{m,n} \\ J_{m,n}^{T} & O_{n,n} \\ \end{array} \right), \end{array}$$

where O and J are respectively matrices of zeros and ones. It is better to see the adjacency matrix of the bipartite graph k2,4:

A=001111001111110000110000110000110000$$\begin{array}{} \displaystyle A=\left( \begin{array}{cccccc} 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ \end{array} \right) \end{array}$$

Since the upper triangular part of the adjacency matrix A is the matrix Jm,n, the sum of entries of this matrix is mn. Thus the number of all walks of length 1 in Jm,n is w1 = mn. Similarly, the general form of A2 is

A2=nJm,mOm,nOm,nTmJn,n,$$\begin{array}{} \displaystyle A^{2}=\left( \begin{array}{cc} nJ_{m,m} & O_{m,n} \\ O_{m,n}^{T} & mJ_{n,n} \\ \end{array} \right), \end{array}$$

where n(Jm,m) represents the multiplication of J with the number n. The following is the second power of the adjacency matrix of the bipartite graph k2,4.

A2=440000440000002222002222002222002222$$\begin{array}{} \displaystyle A^2=\left( \begin{array}{cccccc} 4 & 4 & 0 & 0 & 0 & 0 \\ 4 & 4 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 2 & 2 & 2 \\ 0 & 0 & 2 & 2 & 2 & 2 \\ 0 & 0 & 2 & 2 & 2 & 2 \\ 0 & 0 & 2 & 2 & 2 & 2 \\ \end{array} \right) \end{array}$$

The number w2 of walks of length 2 in Km,n is w2=12$\begin{array}{} \displaystyle w_{2}=\frac{1}{2} \end{array}$ [the sum of entries of, nJm,mtr(nJm,m)]+12$\begin{array}{} \displaystyle nJ_{m,m}-tr(nJ_{m,m})]+\frac{1}{2} \end{array}$ [the sum of entries of mJn,ntr(mJn,n)]=12[n(m2)n(m)]+12[m(n2)m(n)]=mn2[m+n2].$\begin{array}{} \displaystyle (mJ_{n,n})]=\frac{1}{2}[n(m^{2})-n(m)]+\frac{1}{2}[m(n^{2})-m(n)]=\frac{mn}{2}[m+n-2]. \end{array}$ This completes the proof. □

The following result gives the walk polynomial of the star graph Sn.

Theorem 3.2

Let Sn represent the star graph. ThenW(Sn)=(n1)x1+12(n23n+2)x2.$\begin{array}{} \displaystyle \mathscr{W}(S_{n})=(n-1) x^{1}+\frac{1}{2}(n^{2}-3n+2)x^{2}. \end{array}$

Proof

Since the diameter of Sn is 2, we need only two matrices, the adjacency matrix A and its square matrix A2, each of order n × n:

A=O1,1J1,n1J1,n1TOn1,n1,$$\begin{array}{} \displaystyle A=\left( \begin{array}{cc} O_{1,1} & J_{1,n-1} \\ J_{1,n-1}^{T} & O_{n-1,n-1} \\ \end{array} \right), \end{array}$$

where O and J are matrices of zeros and ones, respectively. You can see the adjacency matrix of S7:

A=0111111100000010000001000000100000010000001000000$$\begin{array}{} \displaystyle A=\left( \begin{array}{ccccccc} 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array} \right) \end{array}$$

Since the upper triangular part of the adjacency matrix A is the matrix J1,n–1, the sum of entries of this matrix is n–1. Thus the number of all walks of length 1 in J1,n–1 is w1 = n–1. Similarly, the general form of A2 is

A2=(n1)J1,1O1,n1O1,n1TJn1,n1,$$\begin{array}{} \displaystyle A^{2}=\left( \begin{array}{cc} (n-1)J_{1,1} & O_{1,n-1} \\ O_{1,n-1}^{T} & J_{n-1,n-1} \\ \end{array} \right), \end{array}$$

where n(J1,1) represents the multiplication of J1,1 with the number n–1. The following is the second power of the adjacency matrix of S7.

A2=6000000011111101111110111111011111101111110111111$$\begin{array}{} \displaystyle A^2=\left( \begin{array}{ccccccc} 6 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ \end{array} \right) \end{array}$$

Note that the walks of length 2 the contribution comes only from the matric Jn–1,n–1, and in this case the sum of all entries of this matrix is (n–1)2. Now the number of walks of length 2 in Sn is

w2=12[the sum of entries ofJn1,n1tr(Jn1,n1)]=12[(n1)2(n1)]=12[n23n+2],$$\begin{array}{} \displaystyle w_{2} &=& \frac{1}{2}[\,\mbox{the sum of entries of}\,\, J_{n-1,n-1}-tr(J_{n-1,n-1})] \\ \displaystyle &=& \frac{1}{2}[(n-1)^{2}-(n-1)] \\ \displaystyle &=& \frac{1}{2}[n^{2}-3n+2], \end{array}$$

and the proof is finished.

In the following we are going to give walk polynomial of the wheel graph Wn.

Theorem 3.3

The walk polynomial of wheel graph is 𝓦(Wn) = (2n–2)x1 + 1/2(n2 + 3n–4)x2for n ≥ 3 with 2n–2 edges and n vertices.

Proof

Here, again, the diameter of the wheel graph is 2. So, again, we need just two matrices, the adjacency matrix A and its square A2. The adjacency matrix corresponding to Wn is A = (aij), where

aij=0,i=j1,i=1orj=11,j=i+1ori=j+11,i=2,j=nandi=n,j=20,otherwise.$$\begin{array}{} \displaystyle a_{ij}=\left\{ \begin{array}{lll} 0,& i=j \\ 1,& i=1 \,\,\mbox{or}\,\, j=1 \\ 1,&j=i+1 \,\,\mbox{or}\,\, i=j+1 \\ 1,&i=2,j=n \,\,\mbox{and}\,\, i=n,j=2 \\ 0,&\mbox{otherwise}. \\ \end{array} \right. \end{array}$$

For better understanding, please the following adjacency matrix of W7.

A=0111111101000111010001010100100101010001011100010$$\begin{array}{} \displaystyle A=\left( \begin{array}{ccccccc} 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 0 & 0 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 0 & 1 & 0 \\ \end{array} \right) \end{array}$$

You can see that there are three types of entries where nonzero entries appear; the nonzero entries are actually 1s. The first type of entries appear at positions where either i = 1 or j = 1, and their count is 2(n–1); The second type of entries appear at positions where either i = j + 1 or j = 1 + 1, and their count is 2((n–1)–1); The third type of entries appear at positions where either i = 2, j = n or i = n, j = 2, and their count is 2. You may observe that all the entries of main diagonal are 0. So, the number of all distinct walks of length 1 in Wn is w1=12(2(n1))+2((n1)1))+2=2(n1).$\begin{array}{} \displaystyle w_{1}=\frac{1}{2}(2(n-1))+2((n-1)-1))+2=2(n-1). \end{array}$ The upper triangular entries of A2 = (bij) are

bij=1,j=i+1,i=2,,n11,i=2,j=n2,j=i+2,i=2,,n22,i=2,j=n12,i=3,j=n12,i=1,j=2,,n1,j=i+3,,i+(n4),2in3,i+n4n$$\begin{array}{} \displaystyle b_{ij}=\left\{ \begin{array}{lll} 1,& j=i+1,i=2,\ldots,n-1 \\ 1,& i=2,j=n \\ 2,& j=i+2,i=2,\ldots,n-2 \\ 2,& i=2,j=n-1 \\ 2,& i=3,j=n-1 \\ 2,& i=1,j=2,\ldots,n \\ 1,& j=i+3,\ldots,i+(n-4), 2\leq i \leq n-3, i+n-4\leq n \\ \end{array} \right. \end{array}$$

The following is A2 of W7.

A2=6222222231212121312122213121212131222121312121213$$\begin{array}{} \displaystyle A^2=\left( \begin{array}{ccccccc} 6 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 3 & 1 & 2 & 1 & 2 & 1 \\ 2 & 1 & 3 & 1 & 2 & 1 & 2 \\ 2 & 2 & 1 & 3 & 1 & 2 & 1 \\ 2 & 1 & 2 & 1 & 3 & 1 & 2 \\ 2 & 2 & 1 & 2 & 1 & 3 & 1 \\ 2 & 1 & 2 & 1 & 2 & 1 & 3 \\ \end{array} \right) \end{array}$$

Now we give the sum of all the entries: and the first type of entries are all 1s and appear at the positions where j = i + 1, and their count is (n–2). The second type of entries are all 1s and appear at the positions where i = 2, j = n, and their count is 1. The third type of entries are all 2s and appear at the positions where j = i + 2, i = 2 and their count is (n–3); The fourth type of entries are all 2s and appear at the positions wherei = 2, j = n–1, and their count is 1; the fifth type of entries are all 2s and appear at the positions where i = 3, j = n–1, and their count is 1; the sixth type of entry is are all 2s and appear at the positions where i = 1, j = 2, …, n, and their count is (n–1); the seventh type of entries are all 1s and appear at the positions where j = i + 3, …, i + (n–4), 2 ≤ in–3, i + n–4 ≤ n, and their count is 4n3(ni).$\begin{array}{} \sum_{4}^{n-3}(n-i). \end{array}$. You may observe that all the entries are of upper triangular entries. So, the number of all distinct walks of length 2 in Wn is w2=((n2)+1+(n3)+1+1+(n1)+4n3(ni))=12(n2+3n4)$\begin{array}{} w_{2}=((n-2)+1+(n-3)+1+1+(n-1)+\sum_{4}^{n-3}(n-i))=\frac{1}{2}(n^2+3n-4) \end{array}$

In the following we are going to give walk polynomial of the gear graph Gn.

Theorem 3.4

The walk polynomial of the gear graphGn, n ≥ 6, is

W(Gn)=3nx1+(n2+7n2)x2+(3n2+12n)x3+(n3+15n2+24n2)x4.$$\begin{array}{} \displaystyle \mathscr{W}(G_{n})=3nx^{1}+(\frac{n^{2}+7n}{2})x^{2}+(3n^{2}+12n)x^{3}+(\frac{n^{3}+15n^{2}+24n}{2})x^{4}. \end{array}$$

Proof

Since the diameter of the gear graph is 4, we need four matrices, A, A2, A3, and A4.

Walks of lengths 1: Since only the upper-triangular entries contribute towards the walk polynomial, we give only the nonzero upper-triangular entries of the (2n + 1) × (2n + 1) adjacency matrix A = (aij) of Gn:

aij=1,i=1,,2n1,j=i+11,i=1,j=2n1,i=odd,i<2n+1,j=2n+10,otherwise.$$\begin{array}{} \displaystyle a_{ij}=\left\{ \begin{array}{lll} 1,& i=1,\ldots,2n-1, j=i+1 \\ 1,& i=1,j=2n \\ 1,& i=odd, i\lt2n+1,j=2n+1 \\ 0,&\mbox{otherwise}. \\ \end{array} \right. \end{array}$$

Let us have a look at the adjacency matrix of G7:

A=010000000000011101000000000000010100000000001001010000000000000101000000001000010100000000000001010000001000000101000000000000010100001000000001010000000000000101001000000000010100000000000001011100000000000100101010101010100$$\begin{array}{} \displaystyle A=\left( \begin{array}{ccccccccccccccc} 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ \end{array} \right) \end{array}$$

You can see that there are three types of entries where nonzero entries appear; the nonzero entries are actually 1s. The first type of entries appear at positions where i = 1, …, 2n–1 and j = i + 1, and so their count is 2n–1; the second type of entries appear at positions where i = 1 and j = 2n, and so their count is 1; the third type of entries appear at positions where i is odd and is less than 2n + 1 and j = 2n + 1, and so their count is n. So, the number of all distinct walks of length 1 in Gn is w1 = ((2n–1) + 1 + n) = (3n).

Walks of lengths 2: Now we find walks of lengths 2. The upper triangular entries of A2 = (bij) are

bij=2,i=odd,1i(2n3),j=i+21,i=even,2i(2n2),j=i+22,i=even,2i(2n),j=2n+11,i=odd,1i(2n5),j=i+41,i=odd,1i(2n7),j=i+61,i=odd,1i3,j=i+82,i=1,j=2n11,i=2,j=2n$$\begin{array}{} \displaystyle b_{ij}=\left\{ \begin{array}{lll} 2,& i=odd,1\leq i\leq (2n-3),j=i+2 \\ 1,& i=even,2\leq i\leq (2n-2),j=i+2 \\ 2,& i=even,2\leq i\leq (2n),j=2n+1 \\ 1,& i=odd,1\leq i\leq (2n-5),j=i+4 \\ 1,& i=odd,1\leq i\leq (2n-7),j=i+6 \\ 1,& i=odd,1\leq i\leq 3,j=i+8 \\ 2,& i=1,j=2n-1 \\ 1,& i=2,j=2n \\ \end{array} \right. \end{array}$$

For better understanding you may have a look at the walks of lengths 2 in the matrix A2 of G7.

A2=302010101010200020100000000012203020101010100010201000000002102030201010100000102010000002101020302010100000001020100002101010203020100000000010201002101010102030200000000000102012201010101020300010000000001022020202020202027$$\begin{array}{} \displaystyle A^{2}=\left( \begin{array}{ccccccccccccccc} 3 & 0 & 2 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 2 & 0 & 0 \\ 0 & 2 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 2 \\ 2 & 0 & 3 & 0 & 2 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 2 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 2 \\ 1 & 0 & 2 & 0 & 3 & 0 & 2 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 2 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 2 \\ 1 & 0 & 1 & 0 & 2 & 0 & 3 & 0 & 2 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2 & 0 & 1 & 0 & 0 & 0 & 0 & 2 \\ 1 & 0 & 1 & 0 & 1 & 0 & 2 & 0 & 3 & 0 & 2 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2 & 0 & 1 & 0 & 0 & 2 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 2 & 0 & 3 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2 & 0 & 1 & 2 \\ 2 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 2 & 0 & 3 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 2 & 2 \\ 0 & 2 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 2 & 7 \\ \end{array} \right) \end{array}$$

Now we give the sum of all these entries. The first type of entries are all 2s and appear at positions where i is odd and 1 ≤ i ≤ (2n–3), j = i + 2, and their count is (n–1). the second type of entries are all 1s and appear at positions where i is even and 2 ≤ i ≤ (2n–2) and j = i + 2, and their count is (n–1); the third type of entries are all 2s and appear at positions where i is even and 2 ≤ i ≤ (2n) and j = 2n + 1, and their count is n; the fourth type of entries are all 1s and appear at positions where i is odd and 1 ≤ i ≤ (2n–5) and j = i + 4, and their count is n–2; the fifth type of entry is are all 1s and appear at positions where i is odd and 1 ≤ i ≤ (2n–7) and j = i + 6, and their count is (n–3); the sixth type of entries are all 1s and appear at positions where i is odd and 1 ≤ i ≤ 3 and j = i + 8, and their count is (n–4); the seventh type of entries are all 2s and appear at positions where i = 1, j = 2n–1, and their count is 1. The eighth type of entries are all 1s and appear at positions where i = 2, j = 2n, and their count is 1. So, the number of all distinct walks of length 2 is w2=n2+7n2.$\begin{array}{} \displaystyle w_{2}=\frac{n^2+7n}{2}. \end{array}$

Walks of lengths 3: In order to find walks of length 3, we need upper triangular entries of the matrix A3:

cij=5,1i(2n1),j=i+13,1i3,j=i+(2n3)3,1i2n3,j=i+32,1i2n5,j=i+52,1i2n7,,j=i+75,i=1,j=n1n+4,iis odd,1i<2n+1,j=2n+1$$\begin{array}{} \displaystyle c_{ij}=\left\{ \begin{array}{lll} 5,& 1\leq i\leq (2n-1),j=i+1 \\ 3,& 1\leq i\leq 3,j=i+(2n-3) \\ 3,& 1\leq i\leq 2n-3,j=i+3\\ 2,& 1\leq i\leq 2n-5,j=i+5 \\ 2,& 1\leq i\leq 2n-7,,j=i+7 \\ 5,& i=1,j=n-1 \\ n+4,& i\,\, \mbox{is odd}, 1\leq i \lt2n+1, j=2n+1 \\ \end{array} \right. \end{array}$$

The following is the matrix A3 of G7.

A3=05030202020305115050302020203000505030202020311305050302020200030505030202021120305050302020002030505030202112020305050302000202030505030211202020305050300020202030505031130202020305050003020202030505115030202020305001101101101101101101100$$\begin{array}{} \displaystyle A^3=\left( \begin{array}{ccccccccccccccc} 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 11 \\ 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 0 \\ 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 11 \\ 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 0 \\ 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 11 \\ 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 0 \\ 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 2 & 11 \\ 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 0 & 0 \\ 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 2 & 11 \\ 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 0 & 0 \\ 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 3 & 11 \\ 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 0 & 0 \\ 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 5 & 11 \\ 5 & 0 & 3 & 0 & 2 & 0 & 2 & 0 & 2 & 0 & 3 & 0 & 5 & 0 & 0 \\ 11 & 0 & 11 & 0 & 11 & 0 & 11 & 0 & 11 & 0 & 11 & 0 & 11 & 0 & 0 \\ \end{array} \right) \end{array}$$

Now we give the sum of all entries of above diagonals. The first type of entries are 2s. These entries appear in n–4 secondary diagonals, and the entries appear as follows:

cij=2,1i2n5,j=i+52,1i2n7,j=i+72,1i5,j=i+(2n5)$$\begin{array}{} \displaystyle c_{ij}=\left\{ \begin{array}{lll} 2,& 1\leq i\leq 2n-5,j=i+5 \\ 2,& 1\leq i\leq 2n-7,j=i+7\\ \vdots & \vdots \\ 2,& 1\leq i\leq 5,j=i+(2n-5) \end{array} \right. \end{array}$$

Since the number of 2s appearing at these positions is n(n–4), their sum is 2n(n–4).

The second type of entries are 5s. These numbers appear on secondary diagonal with 1 ≤ i ≤ 2n–1 and j = i + 1, and their count is 2n–1. Moreover, one 5 appears at the position where i = 1, j = 2n. Since the total number of 5s is 2n, their sum is 10n.

The third type of entries are 3s. These entries appear only in 2 secondary diagonals, and their positions are:

cij=3,1i3,j=i+(2n3)3,1i2n3,j=i+3$$\begin{array}{} \displaystyle c_{ij}=\left\{ \begin{array}{lll} 3,& 1\leq i\leq 3,j=i+(2n-3) \\ 3,& 1\leq i\leq 2n-3,j=i+3\\ \end{array} \right. \end{array}$$

Since the total number of 3s is 2n, their sum is 6n.

The fourth type of entries are n + 4s and appear at positions where i is odd and 1 ≤ i < 2n + 1 and j = 2n + 1. Since their count is n, the sum of these numbers is n(n + 4).

Finally, the number of all distinct walks of length 3 in Wn is 2n(n–4) + 10n + 6n + n(n + 4) = 3n(n + 4).

Walks of lengths 4: Now we go for distinct walks of length 4 by giving upper triangular entries of the matrix A4 = (dij). You may observe that these entries will form secondary diagonals, which are divided into three types:

Type I.

dij=n+12,i=odd,1i(2n3),j=i+28,i=even,2i(2n2),j=i+2n+9,i=odd,1i(2n5),j=i+45,i=even,2i(2n4),j=i+4n+8,i=odd,1i(2n7),j=i+64,i=even,2i(2n6),j=i+60,otherwise$$\begin{array}{} \displaystyle d_{ij}=\left\{ \begin{array}{lll} n+12,& i=odd,1\leq i\leq (2n-3),j=i+2 \\ 8,& i=even,2\leq i\leq (2n-2),j=i+2 \\ n+9,& i=odd,1\leq i\leq (2n-5),j=i+4 \\ 5,& i=even,2\leq i\leq (2n-4),j=i+4 \\ n+8,& i=odd,1\leq i\leq (2n-7),j=i+6 \\ 4,& i=even,2\leq i\leq (2n-6),j=i+6 \\ 0,& otherwise \\ \end{array} \right. \end{array}$$

Type II. The last two nonzero secondary diagonals are:

dij=n+12,i=1,j=2n18,i=2,j=2nn+9,i=1,j=2n35,i=2,j=2n2n+9,i=3,j=2n15,i=4,j=2n$$\begin{array}{} \displaystyle d_{ij}=\left\{ \begin{array}{lll} n+12,& i=1,j=2n-1 \\ 8,& i=2,j=2n \\ n+9,& i=1,j=2n-3 \\ 5,& i=2,j=2n-2 \\ n+9,& i=3,j=2n-1 \\ 5,& i=4,j=2n \\ \end{array} \right. \end{array}$$

Type III. There are n–5 secondary diagonals such that the first entry of each of these diagonals is n + 8. In the following m denotes the number of such diagonals, i.e., 1 ≤ mn–5.

dij=n+8,i=odd,1i2(nm)5,j=2(m+2)+i4,i=even,1i2(nm2),j=2(m+2)+i$$\begin{array}{} \displaystyle d_{ij}=\left\{ \begin{array}{lll} n+8,& i=odd,1\leq i\leq 2(n-m)-5,j=2(m+2)+i \\ 4,& i=even,1\leq i\leq 2(n-m-2),j=2(m+2)+i \\ \end{array} \right. \end{array}$$

The entries which are not covered yet are the entries of the last column of A4:

dij=2n+8,i=even,2i2n,j=2n+1$$\begin{array}{} \displaystyle d_{ij}=\left\{ \begin{array}{lll} 2n+8,& i=even,2\leq i\leq 2n,j=2n+1 \\ \end{array} \right. \end{array}$$

The following is the matrix A4 of G7.

A4=21019016015015016019000100805040405082219021019016015015016000801008050404052216019021019016015015000508010080504042215016019021019016015000405080100805042215015016019021019016000404050801008052216015015016019021019000504040508010082219016015015016019021000805040405080102202202202202202202202277$$\begin{array}{} \displaystyle A^4=\left( \begin{array}{ccccccccccccccc} 21 & 0 & 19 & 0 & 16 & 0 & 15 & 0 & 15 & 0 & 16 & 0 & 19 & 0 & 0 \\ 0 & 10 & 0 & 8 & 0 & 5 & 0 & 4 & 0 & 4 & 0 & 5 & 0 & 8 & 22 \\ 19 & 0 & 21 & 0 & 19 & 0 & 16 & 0 & 15 & 0 & 15 & 0 & 16 & 0 & 0 \\ 0 & 8 & 0 & 10 & 0 & 8 & 0 & 5 & 0 & 4 & 0 & 4 & 0 & 5 & 22 \\ 16 & 0 & 19 & 0 & 21 & 0 & 19 & 0 & 16 & 0 & 15 & 0 & 15 & 0 & 0 \\ 0 & 5 & 0 & 8 & 0 & 10 & 0 & 8 & 0 & 5 & 0 & 4 & 0 & 4 & 22 \\ 15 & 0 & 16 & 0 & 19 & 0 & 21 & 0 & 19 & 0 & 16 & 0 & 15 & 0 & 0 \\ 0 & 4 & 0 & 5 & 0 & 8 & 0 & 10 & 0 & 8 & 0 & 5 & 0 & 4 & 22 \\ 15 & 0 & 15 & 0 & 16 & 0 & 19 & 0 & 21 & 0 & 19 & 0 & 16 & 0 & 0 \\ 0 & 4 & 0 & 4 & 0 & 5 & 0 & 8 & 0 & 10 & 0 & 8 & 0 & 5 & 22 \\ 16 & 0 & 15 & 0 & 15 & 0 & 16 & 0 & 19 & 0 & 21 & 0 & 19 & 0 & 0 \\ 0 & 5 & 0 & 4 & 0 & 4 & 0 & 5 & 0 & 8 & 0 & 10 & 0 & 8 & 22 \\ 19 & 0 & 16 & 0 & 15 & 0 & 15 & 0 & 16 & 0 & 19 & 0 & 21 & 0 & 0 \\ 0 & 8 & 0 & 5 & 0 & 4 & 0 & 4 & 0 & 5 & 0 & 8 & 0 & 10 & 22 \\ 0 & 22 & 0 & 22 & 0 & 22 & 0 & 22 & 0 & 22 & 0 & 22 & 0 & 22 & 77 \\ \end{array} \right) \end{array}$$

Now we give the sum of all these upper-triangular entries. There are four diagonals that appear once in the matrix. The entries of the first such diagonal are n + 12 and 8 and each of these appear n–1 times, and so there sum is (n–1)(n + 12) + 8(n–1). The entries of the second such diagonal are n + 9 and 5 and each of these appear n–2 times, and so there sum is (n–2)(n + 9) + 5(n–2). The entries of the third such diagonal are n + 9 and 5 and each of these appear 2 times, and so there sum is 2n + 28. The entries of the fourth such diagonal are n + 12 and 8 and each of these appears 1 time, and so there sum is n + 20.

Now we find the sum of those n–5 diagonals whose entries are same but appear with different number of times. Each such diagonal has two types of entries, n + 8 and 4. The largest of these diagonals contains n–3 entries of value n + 8, the next contains n–4 entries of value n + 8, and so on the last such diagonal contains 3 entries. Thus the sum of all these entries is

Sum1=(n3)(n+8)+(n4)(n+8)++(3)(n+8)=(n+8)[(n3)+(n4)++3]=n2(n+8)(n5).$$\begin{array}{} \displaystyle Sum_{1} \!\!\!\!\!&= (n-3)(n+8)+ (n-4)(n+8)+\cdots + (3)(n+8)\\ \displaystyle &= (n+8)[(n-3)+(n-4)+\cdots + 3]\\ \displaystyle &= \frac{n}{2}(n+8)(n-5). \end{array}$$

Similarly, since 4 appears the same number of times the n + 8 appears, their sum is Sum2 = 2n(n–5).

Since the entries 2n + 8 in the last column appear n times, their sum is n(2n + 8).

Finally, the sum of all upper-triangular entries of A4 is

w4=[(n1)(n+12)+8(n1)]+[(n2)(n+9)+5(n2)]+[2n+28]+[n+20]+n2(n+8)(n5)+2n(n5)+n(2n+8)=12[n3+15n2+24n].$$\begin{array}{} w_{4} \!\!\!\!\!&=\displaystyle \big[(n-1)(n+12)+8(n-1)\big]+\big[(n-2)(n+9)+5(n-2)\big]\\ &\displaystyle\quad+\big[2n+28\big]+\big[n+20\big]+\frac{n}{2}(n+8)(n-5)+2n(n-5)+n(2n+8)\\ &\displaystyle= \frac{1}{2}[n^{3}+15n^{2}+24n]. \end{array}$$

Corollary 3.5

The walk polynomial of the Jahangir graphJ2,m, m ≥ 6, is

W(J2,m)=3mx1+(m2+7m2)x2+(3m2+12m)x3+(m3+15m2+24m2)x4.$$\begin{array}{} \displaystyle \mathscr{W}(J_{2,m})=3mx^{1}+(\frac{m^{2}+7m}{2})x^{2}+(3m^{2}+12m)x^{3}+(\frac{m^{3}+15m^{2}+24m}{2})x^{4}. \end{array}$$

Proof

Just substitute m for n in the walk polynomial of the gear graph Gn.

eISSN:
2444-8656
Language:
English
Publication timeframe:
Volume Open
Journal Subjects:
Life Sciences, other, Mathematics, Applied Mathematics, General Mathematics, Physics