v_{0},v_{1},...,v_{k}\right) $ such that $v_{i}\sim v_{i+1}$ for $i=0,1,...,k-1$. If $v_{0}=v_{k}$, then the walk is closed. A closed walk with no repeated nodes (with the exception of the first and last nodes) is called a *cycle*. For example, *triangles*, *quadrangles* and *pentagons* are cycles of length three, four, and five, respectively.

Graphs can be algebraically represented via matrices. The adjacency matrix of an undirected graph $\mathcal{G}$, denoted by $A_{\mathcal{G}}=[a_{ij}]$, is an $n\times n$ symmetric matrix defined entry-wise as $a_{ij}=1$ if nodes $v_{i}$ and $v_{j}$ are adjacent, and $a_{ij}=0$ otherwise[^4]. The eigenvalues of $A_{\mathcal{%
G}}$, denoted by $\lambda _{1}\geq \lambda _{2}\geq \ldots \geq \lambda _{n}$, play a key role in our paper. The spectral radius of $A_{\mathcal{G}}$, denoted by $\rho \left( A_{\mathcal{G}}\right) $, is the maximum among the magnitudes of its eigenvalues. Since $A_{\mathcal{G}}$ is a symmetric matrix with nonnegative entries, all its eigenvalues are real and the spectral radius is equal to the largest eigenvalue, $\lambda _{1}$. We define the $k$-th spectral moment of the adjacency matrix $A_{\mathcal{G}}$ as:$$m_{k}\left( A_{\mathcal{G}}\right) =\frac{1}{n}\sum_{i=1}^{n}\lambda
_{i}^{k}.  \label{Spectral Moment}$$As we shall show in Section \[Spectral Section\], there is a direct connection between the spectral moments and the presence of certain substructures in the graph, such as 