- Research
- Open Access

# Bounds on the number of closed walks in a graph and its applications

- Xiaodan Chen
^{1}and - Jianguo Qian
^{2}Email author

**2014**:199

https://doi.org/10.1186/1029-242X-2014-199

© Chen and Qian; licensee Springer. 2014

**Received: **29 September 2013

**Accepted: **6 May 2014

**Published: **20 May 2014

## Abstract

Using graph-theoretical techniques, we establish an inequality regarding the number of walks and closed walks in a graph. This inequality yields several upper bounds for the number of closed walks in a graph in terms of the number of vertices, number of edges, maximum degree, degree sequence, and the Zagreb indices of the graph. As applications, we also present some new upper bounds on the Estrada index for general graphs, bipartite graphs, trees and planar graphs, some of which improve the known results obtained by using the algebraic techniques.

**MSC:**05C50, 94C15, 05C38.

## Keywords

- number of closed walks
- Estrada index
- Zagreb indices
- maximum degree
- degree sequence

## 1 Introduction

*i.e.*, graphs without loops and multiple edges. For a graph

*G*with

*n*($n\ge 2$) vertices, the adjacency matrix of

*G*is, as usual, defined as the $n\times n$ matrix $A(G)=[{a}_{ij}]$ in which ${a}_{ij}=1$ if the

*i*th and the

*j*th vertices are adjacent, and ${a}_{ij}=0$ otherwise. The eigenvalues of $A(G)$ are also called the eigenvalues of the graph

*G*. For a vertex

*v*in

*G*, we denote by $N(v)$ and $d(v)$ the neighbor (the set of vertices adjacent to

*v*) and the degree of

*v*, respectively. The degree sequence of

*G*, denoted by $({d}_{1},{d}_{2},\dots ,{d}_{n})$, is a list of the vertex degrees of

*G*in non-increasing order. Let $V(G)$ and $E(G)$ denote the vertex set and edge set of

*G*, respectively. The first and the second Zagreb indices of

*G*are defined as

respectively [1].

A walk *W* of length *k* starting at a vertex ${v}_{0}$ and ending at a vertex ${v}_{k}$ in *G* is a sequence of vertices, *i.e.*, ${v}_{0}{v}_{1}{v}_{2}\cdots {v}_{k}$, in which ${v}_{i}$ is adjacent to ${v}_{i+1}$ for each $i=0,1,\dots ,k-1$. In particular, if the vertices ${v}_{0},{v}_{1},{v}_{2},\dots ,{v}_{k}$ (except the possible ${v}_{0}$ and ${v}_{k}$) are pairwise distinct, then *W* is well known as a path, and if ${v}_{0}={v}_{k}$ then *W* is called a closed walk. It is well known [2] that the number of closed walks of length *k* in *G* is exactly the trace of $A{(G)}^{k}$ which, in turn, is the sum of the *k* th power of the eigenvalues of *G* (known as the *k* th spectral moment of *G*). This fact is of importance in the theory of total *π*-electron energy, for details see [3, 4] and the references cited therein. Also, the sequence of the numbers of closed walks of length *k*, $k=1,2,\dots $ , starting at a given vertex *v*, was proposed by Randić [5] for characterization of the environment of vertex *v*.

*G*, defined as

where ${\lambda}_{1},{\lambda}_{2},\dots ,{\lambda}_{n}$ are the eigenvalues of *G*. The Estrada index has successfully found applications in various fields, including biochemistry [6, 7] and complex networks [8]. Also, a number of mathematical properties, especially various lower and upper bounds on the Estrada index of a graph have been established, for details we refer the reader to [9–16]; other properties can be found in [17–19] and a latest survey paper by Gutman *et al.* [20].

In general, counting the closed walks in a graph (of large order) is not an easy work. Only a few results were obtained for some special types of graphs, *e.g.*, vertex-transitive graphs [21] and generalized de Bruijn graphs [22]. In this paper, using graph-theoretical techniques, we establish an inequality regarding the number of walks and closed walks starting at a given vertex. This inequality yields several upper bounds for the number of closed walks in a graph in terms of the number of vertices, number of edges, maximum degree, degree sequence, the first and the second Zagreb indices of the graph. As applications, in Section 3 we present some new upper bounds on the Estrada index for general graphs, bipartite graphs, trees, and planar graphs, which improve some known results obtained by using the algebraic techniques.

## 2 Main results

*G*and a vertex

*v*, let ${\mathcal{W}}_{k}(G,v)$ denote the set of walks of length

*k*starting at

*v*in

*G*, and let ${W}_{k}(G,v)=|{\mathcal{W}}_{k}(G,v)|$. Obviously, ${W}_{0}(G,v)=1$, ${W}_{1}(G,v)=d(v)$. Moreover, it is easy to check that

In general, we have the following result.

**Lemma 1**

*Let*

*G*

*be a graph of order*

*n*

*with maximum degree*Δ,

*and let*

*v*

*be an arbitrary vertex in*

*G*.

*Then*

*Each of the equalities holds in* (1)-(4) *for all* *v* *if and only if* *G* *is regular*.

*Proof* Let $W=v{v}_{1}{v}_{2}\cdots {v}_{k}$ be a walk in ${\mathcal{W}}_{k}(G,v)$. Observe that each of *k* steps of *W* has at most Δ choices, then (1) follows. We also notice that the first one, two, and three step(s) of *W* have exactly $d(v)$, ${\sum}_{u\in N(v)}d(u)$ and ${\sum}_{u\in N(v)}{\sum}_{w\in N(u)}d(w)$ choices, respectively, and each of the remaining steps has at most Δ choices, so (2), (3), and (4) follow as well. Moreover, it is not difficult to see that each of the equalities holds in (1)-(4) for all *v* in *G* if and only if *G* is a Δ-regular graph. This completes the proof. □

*k*in

*G*,

*i.e.*, ${W}_{k}(G)={\sum}_{v\in V(G)}{W}_{k}(G,v)$. It is clear that ${W}_{0}(G)=n$, ${W}_{1}(G)={\sum}_{v\in V(G)}d(v)=2m$. Moreover, one can deduce easily that

where $Z{g}_{1}(G)$, $Z{g}_{2}(G)$ are the first and the second Zagreb indices of *G*, respectively. Using these facts and Lemma 1, for general $k\ge 1$, we have the following.

**Theorem 2**

*Let*

*G*

*be a graph with*

*n*

*vertices*,

*m*

*edges*,

*and maximum degree*Δ.

*Then*

*Each of the equalities holds in* (5)-(8) *if and only if* *G* *is regular*.

*Proof* This proof is trivial. □

**Remark**Bounds (6)-(8) can be seen as some slight improvements of bound (5). Here, we also list two other improvements of bound (5) for using later.

- (i)[23] Let
*G*be a graph of order*n*with degree sequence $({d}_{1},{d}_{2},\dots ,{d}_{n})$. Then for $k\ge 1$,${W}_{k}(G)\le \sum _{i=1}^{n}{d}_{i}^{k},$(9)with equality if and only if

*G*is regular or $k\le 2$. - (ii)[24] Let
*G*be a graph of order*n*with maximum degree Δ. If*G*admits an orientation with maximum outdegree $d\le \mathrm{\Delta}/2$, then for $k\ge 1$,${W}_{k}(G)\le n{2}^{k}{d}^{k/2}{(\mathrm{\Delta}-d)}^{k/2}.$(10)Moreover, from the proof of (10) (see Theorem 16 in [24]), one can deduce that the equality holds in (10) if and only if

*G*is a Δ-regular Euler graph.

Now we turn to the number of closed walks. Let ${\mathcal{CW}}_{k}(G,v)$ denote the set of closed walks of length *k* starting and ending at *v* in *G*, and let $C{W}_{k}(G,v)=|{\mathcal{CW}}_{k}(G,v)|$. It is obvious that $0=C{W}_{1}(G,v)<{W}_{0}(G,v)=1$, $C{W}_{2}(G,v)={W}_{1}(G,v)=d(v)$. In general, for $k\ge 3$ we establish the following simple but useful result.

**Lemma 3**

*Let*

*G*

*be a graph of order*

*n*

*and let*

*v*

*be an arbitrary vertex in*

*G*.

*Then*,

*for any*$k\ge 3$,

*with equality if and only if* *k* *is even*, *and the component of* *G* *containing* *v* *is bipartite and* *v* *is adjacent to each of the vertices in the other partition part*.

*Proof*Let

*f*be the map from ${\mathcal{CW}}_{k}(G,v)$ into ${\mathcal{W}}_{k-1}(G,v)$ such that, for any closed walk $v{v}_{1}{v}_{2}\cdots {v}_{k-1}v\in {\mathcal{CW}}_{k}(G,v)$,

*f*, which yields

Further, the equality holds if and only if the end vertex of each walk in ${\mathcal{W}}_{k-1}(G,v)$ is adjacent to *v*. In this case, if *k* is odd then, for any edge *vu*, ${\mathcal{W}}_{k-1}(G,v)$ contains a walk of the form $W=vuvu\cdots vuv$ while *v* is not adjacent to itself, a contradiction. So if the equality holds in (11), then *k* must be even.

Now we consider the component ${C}_{v}$ of *G* containing *v*, under the assumption that the equality holds in (11) and *k* is even. Let ${N}_{l}(G,v)$ denote the set of vertices at distance *l* from *v* in *G*. We claim that ${N}_{l}(G,v)$ is an empty set, for any $l\ge 3$. Otherwise there would be a path $P=v{v}_{1}{v}_{2}{v}_{3}$ such that ${v}_{3}$ is not adjacent to *v*, but the walk $W=v{v}_{1}v{v}_{1}\cdots v{v}_{1}{v}_{2}{v}_{3}$ defined on the path *P* belongs to ${\mathcal{W}}_{k-1}(G,v)$, which implies that ${v}_{3}$ is adjacent to *v*, a contradiction. We next show that there are no edges with both end vertices in ${N}_{l}(G,v)$, $l\in \{1,2\}$. For contradiction, assume that there is an edge, say ${v}_{1}{v}_{2}$, with ${v}_{1},{v}_{2}\in {N}_{1}(G,v)$. Then $T=v{v}_{1}{v}_{2}v$ is a triangle and consequently the walk $W=v{v}_{1}v{v}_{1}\cdots v{v}_{1}{v}_{2}v$ defined on *T* belongs to ${\mathcal{W}}_{k-1}(G,v)$, which implies that *v* is adjacent to *v*, again a contradiction. Similarly, if there are some edges with both end vertices in ${N}_{2}(G,v)$, then there must exist a path $P=v{v}_{1}{v}_{2}{v}_{3}$ such that ${v}_{3}$ is not adjacent to *v*, which also yields a contradiction as the above argument. Thus, it follows that the component ${C}_{v}$ is bipartite with partition $({N}_{1}(G,v),{N}_{2}(G,v)\cup \{v\})$.

The converse is obvious, completing the proof. □

Let $C{W}_{k}(G)$ denote the number of closed walks of length *k* in *G*, *i.e.*, $C{W}_{k}(G)={\sum}_{v\in V(G)}C{W}_{k}(G,v)$. Clearly, $C{W}_{0}(G)=n$, $C{W}_{1}(G)=0$ and $C{W}_{2}(G)=2m$. For any $k\ge 3$, using Lemma 3, we have

**Theorem 4**

*Let*

*G*

*be a graph of order*

*n*

*with maximum degree*Δ

*and degree sequence*$({d}_{1},{d}_{2},\dots ,{d}_{n})$.

*Then*,

*for any*$k\ge 3$,

*Each of the equalities holds in*(12)-(16)

*if and only if*

*k*

*is even and each component of*

*G*

*is the complete bipartite graph*${K}_{\mathrm{\Delta},\mathrm{\Delta}}$.

*Moreover*,

*if*

*G*

*admits an orientation with maximum outdegree*$d\le \mathrm{\Delta}/2$,

*then*,

*for any*$k\ge 3$,

*with equality if and only if both* *k* *and* Δ *are even and each component of* *G* *is the complete bipartite graph* ${K}_{\mathrm{\Delta},\mathrm{\Delta}}$.

*Proof*For $k\ge 3$, it follows from Lemma 3 that

with equality if and only if *k* is even, and each component of *G* is a complete bipartite graph. This result together with bounds (5)-(10) yield bounds (12)-(17) directly; also the equality cases follow by noting that *G* is Δ-regular (Δ is even in the case of (17)). The proof is completed. □

Recall that an orientation of a graph *G* is a digraph *D* obtained from *G* by choosing an orientation for each edge. The outdegree of a vertex *v* in *D* is the number of edges with tail *v*. It is well known [24] that a tree (or forest) admits an orientation with maximum outdegree $d=1$ and a planar graph with $d=3$. In fact, for a forest, fixing a root for each component and orienting each edge in each component toward its root would yield an orientation with $d=1$; furthermore, a planar graph has an orientation with $d=3$ since its edges can be partitioned into three forests (see, *e.g.*, [25]). Thus, by (17) we get an immediate corollary.

**Corollary 5**

*Let*

*G*

*be a graph of order*

*n*

*with maximum degree*Δ.

*If*

*G*

*is a tree*(

*or forest*)

*and*$\mathrm{\Delta}\ge 2$,

*then*,

*for any*$k\ge 3$,

*If*

*G*

*is a planar graph and*$\mathrm{\Delta}\ge 6$,

*then*,

*for any*$k\ge 3$,

Remark that if *G* is a bipartite graph (including tree and forest), then there are no closed walks of odd length in *G*, and hence $C{W}_{k}(G)=0$ when *k* is odd. Formally this is stated in the following proposition.

**Proposition 6** *Let* *G* *be a bipartite graph*. *Then*, *for any* $k\ge 1$, $C{W}_{2k-1}(G)=0$.

## 3 Applications

In this section we apply the results in the previous section to estimate the Estrada index of graphs.

*k*th spectral moment of

*G*,

*i.e.*, ${M}_{k}(G)={\sum}_{i=1}^{n}{\lambda}_{i}^{k}$, where ${\lambda}_{1},{\lambda}_{2},\dots ,{\lambda}_{n}$ are the eigenvalues of

*G*. Then ${M}_{k}(G)=C{W}_{k}(G)$ [2]. On the other hand, recalling the power-series expansion of the function ${e}^{x}$, we have another expression for the Estrada index of

*G*as follows:

*G*is a bipartite graph, then by Proposition 6, we get

We are now ready to give some new upper bounds for $EE(G)$.

**Theorem 7**

*Let*

*G*

*be a graph with*

*n*

*vertices*,

*m*

*edges*,

*t*

*triangles*,

*maximum degree*Δ

*and degree sequence*$({d}_{1},{d}_{2},\dots ,{d}_{n})$.

*Then*

*Moreover*,

*if*

*G*

*admits an orientation with maximum outdegree*$d\le \mathrm{\Delta}/2$,

*then*

*Proof*We first consider (22). By (20), Theorem 4 and noticing that $C{W}_{0}(G)=n$, $C{W}_{1}(G)=0$, $C{W}_{2}(G)=2m\le n\mathrm{\Delta}$, we have

The discussion for (23)-(27) is analogous by observing that $C{W}_{2}(G)=2m={\sum}_{i=1}^{n}{d}_{i}$, $C{W}_{3}(G)=6t<{W}_{2}(G)=Z{g}_{1}(G)$ and, $C{W}_{2}(G)={W}_{1}(G)\le n\sqrt{4d(\mathrm{\Delta}-d)}$ with equality if and only if *G* is a Δ-regular Euler graph. □

For bipartite graphs, from (21) and the power-series expansion of the hyperbolic cosine $cosh(x)=({e}^{x}+{e}^{-x})/2$, one can easily obtain the following result by a similar reasoning as in the proof of Theorem 7.

**Theorem 8**

*Let*

*G*

*be a bipartite graph with*

*n*

*vertices*,

*m*

*edges*,

*maximum degree*Δ

*and degree sequence*$({d}_{1},{d}_{2},\dots ,{d}_{n})$.

*Then*

*Each of the equalities holds in*(28)-(32)

*if and only if each component of*

*G*

*is the complete bipartite graph*${K}_{\mathrm{\Delta},\mathrm{\Delta}}$.

*Moreover*,

*if*

*G*

*admits an orientation with maximum outdegree*$d\le \mathrm{\Delta}/2$,

*then*

*with equality if and only if* Δ *is even and each component of* *G* *is the complete bipartite graph* ${K}_{\mathrm{\Delta},\mathrm{\Delta}}$.

Similar to Corollary 5, substituting $d=1$ and $d=3$ in (33) and (27), respectively, we have the following corollary.

**Corollary 9**

*Let*

*G*

*be a graph of order*

*n*

*with maximum degree*Δ.

*If*

*G*

*is a tree*(

*or forest*)

*and*$\mathrm{\Delta}\ge 2$,

*then*

*If*

*G*

*is a planar graph and*$\mathrm{\Delta}\ge 6$,

*then*

**Remark**In the past few years, a number of upper bounds on the Estrada index of graphs have been established by using the algebraic techniques (see, for example, [10, 11, 14, 16]). In comparison to the algebraic techniques, the bounds based on our graph-theoretical method are related to the degree parameters (mainly the maximum degree), which are somewhat different from the previous ones. Moreover, our method would be more effective in some cases. For example, in [10] de la Peña

*et al.*showed that, for any graph

*G*,

*x*since ${f}^{\prime}(x)=[(x-2){e}^{x}+x+2]/{x}^{3}>0$ when $x\ge 2$. Then for $2\le \mathrm{\Delta}<\sqrt{2m}$, we get

*G*, the authors in [10] proved that

*x*since ${f}^{\prime}(x)=[(x-2)({e}^{x}-{e}^{-x})+4(1-{e}^{-x})]/2{x}^{3}>0$. Therefore, for $2\le \mathrm{\Delta}<\sqrt{m}$, we have

## Declarations

### Acknowledgements

The authors would like to thank the anonymous referees for their extremely helpful comments and suggestions towards improving the original version of this paper. The first author was supported partially by the Scientic Research Foundation of Guangxi University (Grant No. XBZ130083) and NNSF of China (No. 11361007). The second author was supported by NNSF of China (No. 10831001).

## Authors’ Affiliations

## References

- Gutman I, Trinajstić N:
**Graph theory and molecular orbitals. Total**π**-electron energy of alternant hydrocarbons.***Chem. Phys. Lett.*1972,**17:**535–538. 10.1016/0009-2614(72)85099-1View ArticleGoogle Scholar - Cvetković D, Doob M, Sachs H:
*Spectra of Graphs-Theory and Application*. Academic Press, New York; 1980.Google Scholar - Gutman I:
**Remark on the moment expansion of total**π**-electron energy.***Theor. Chim. Acta*1992.,**83:**Article ID 313318Google Scholar - Gutman I, Marković S, Vesović A, Estrada E:
**Approximating total**π**-electron energy in terms of spectral moments. A quantitative approach.***J. Serb. Chem. Soc.*1998,**63:**639–646.Google Scholar - Randić M:
**Random walks and their diagnostic value for characterization of atomic environment.***J. Comput. Chem.*1980,**1:**386–399. 10.1002/jcc.540010410View ArticleGoogle Scholar - Estrada E:
**Characterization of 3D molecular structure.***Chem. Phys. Lett.*2000,**319:**713–718. 10.1016/S0009-2614(00)00158-5View ArticleGoogle Scholar - Estrada E, Rodríguez-Valázquez JA, Randić M:
**Atomic branching in molecules.***Int. J. Quant. Chem.*2006,**106:**823–832. 10.1002/qua.20850View ArticleGoogle Scholar - Estrada E, Rodríguez-Valázquez JA:
**Subgraph centrality in complex networks.***Phys. Rev. E*2005.,**71:**Article ID 056103Google Scholar - Das KC, Lee SG:
**On the Estrada index conjecture.***Linear Algebra Appl.*2009,**431:**1351–1359. 10.1016/j.laa.2009.05.007MathSciNetView ArticleGoogle Scholar - de la Peña JA, Gutman I, Rada J:
**Estimating the Estrada index.***Linear Algebra Appl.*2007,**427:**70–76. 10.1016/j.laa.2007.06.020MathSciNetView ArticleGoogle Scholar - Fath-Tabar GH, Ashrafi AR:
**New upper bounds for Estrada index of bipartite graphs.***Linear Algebra Appl.*2011,**435:**2607–2611. 10.1016/j.laa.2011.01.034MathSciNetView ArticleGoogle Scholar - Gutman I, Estrada E, Rodríguez-Valázquez JA:
**On a graph-spectrum-based structure descriptor.***Croat. Chem. Acta*2007,**80:**151–154.Google Scholar - Gutman I:
**Lower bounds for Estrada index.***Publ. Inst. Math. (Belgr.)*2008,**83:**1–7. 10.2298/PIM0897001GView ArticleGoogle Scholar - Liu J, Liu B:
**Bounds of the Estrada index of graphs.***Appl. Math. J. Chin. Univ. Ser. B*2010,**25:**325–330. 10.1007/s11766-010-2237-6View ArticleGoogle Scholar - Zhao H, Jia Y:
**On the Estrada index of bipartite graph.***MATCH Commun. Math. Comput. Chem.*2009,**61:**495–501.MathSciNetGoogle Scholar - Zhou B:
**On Estrada index.***MATCH Commun. Math. Comput. Chem.*2008,**60:**485–492.MathSciNetGoogle Scholar - Du Z, Zhou B:
**The Estrada index of unicyclic graphs.***Linear Algebra Appl.*2012,**436:**3149–3159. 10.1016/j.laa.2011.10.020MathSciNetView ArticleGoogle Scholar - Ilic A, Stevanović D:
**The Estrada index of chemical trees.***J. Math. Chem.*2010,**47:**305–314. 10.1007/s10910-009-9570-0MathSciNetView ArticleGoogle Scholar - Zhang J, Zhou B, Li J:
**On Estrada index of trees.***Linear Algebra Appl.*2011,**434:**215–223. 10.1016/j.laa.2010.08.025MathSciNetView ArticleGoogle Scholar - Gutman I, Deng H, Radenković S:
**The Estrada index: an updated survey.**In*Selected Topics on Applications of Graph Spectra*. Edited by: Cvetković D, Gutman I. Math. Inst., Beograd; 2011:155–174.Google Scholar - Jajcaya R, Malniǎ A, Marušč D:
**On the number of closed walks in vertex-transitive graphs.***Discrete Math.*2007,**307:**484–493. 10.1016/j.disc.2005.09.039MathSciNetView ArticleGoogle Scholar - Shibata Y, Shirahata M, Osawa S:
**Counting closed walks in generalized de Bruijn graphs.***Inf. Process. Lett.*1994,**49:**135–138. 10.1016/0020-0190(94)90090-6MathSciNetView ArticleGoogle Scholar - Fiol MA, Garriga E:
**Number of walks and degree powers in a graph.***Discrete Math.*2009,**309:**2613–2614. 10.1016/j.disc.2008.03.025MathSciNetView ArticleGoogle Scholar - Hayes TP:
**A simple condition implying rapid mixing of single-site dynamics on spin systems.***47th Ann. IEEE Symp. Found. Comp. Sci. (FOCS’06)*2006, 39–46.Google Scholar - Gonçalves D:
**Covering planar graphs with forests, one having bounded maximum degree.***J. Comb. Theory, Ser. B*2009,**99:**314–322. 10.1016/j.jctb.2008.07.004View ArticleGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.