The Number of Spanning Trees in some Special Self-Similar Graphs
Abstract
In this paper, we introduce two families of planar and self-similar graphs which have small-world properties. The constructed models are based on an iterative process where each step of a certain formulation of modules results in a final graph with a self-similar structure. The number of spanning trees of a graph is one of the most graph-theoretical parameters, where its applications range from the theory of networks to theoretical chemistry. Two explicit formulas are introduced for the number of spanning trees for the two models. With explicit formulas for some of their topological parameters as well.
Keywords: Self-Similar Graphs, Cycle Graphs, Wheel Graphs, Spanning Trees, Clustering Coefficients, Entropy of Graph.
I Introduction
Having information about the number of spanning trees is not just valuable for mathematics; however, it is also valuable for many different fields, in physics, it is beneficial with regular lattice, Sierpinski gaskets, and more, it has a direct relation to the probability theory, related to the chemistry through the chemical isomers, in biology, social sciences, and of course, networks, as the number of spanning tree is the crucial measure of network reliability Anema and Tsougkas (2016). According to Dhar (2006, 1990), the number of spanning trees of a connected network is precisely equal to the number of recurrent configurations of the Abelian sand-pile model on the network, which is equivalent to the chip-firing game 17 under certain constraints and is a paradigm for self-organized criticality.
Enumerating the number of spanning trees in finite graphs is not a recent problem. It started over 100 years ago as one of the graph’s most critical and valuable invariants. In 1847, Kirchhoff came up with the theorem of matrix-tree that can compute the number of the spanning tree concerning the determinant of the Laplacian matrix of the graph, and the Laplacian matrix calculated through the subtraction of the adjacency matrix of the graph from its degree matrix . The Degree matrix is a diagonal matrix with the degree of each vertex on the diagonals.
However, counting the number of spanning trees using this method for large graphs will be complicated. Therefore, finding a way to compute the spanning tree without Kirchhoff’s determinant will be helpful.
Many attempts try to compute this, especially the trial of El Atik et al. (2021), which successfully calculated the number of spanning trees in a class of self-similar graphs. However, it is for only one case of cycle graphs; and there can be so many cycles and wheels with number of vertices and fractals that contain as the length of the path in fractals. Moreover, many types of graphs, such as complete graphs or general graphs overall, still need to be studied. This paper solves the problem of counting the spanning trees of the self-similar graphs constructed by starting with and , with specific operations and general for the length path. Moreover, it gives insight into the entropy of the self-similar graphs, how they got affected by these operations of fractals, and studies some topological properties of the constructed graphs.
In the remainder of this paper, section II introduces the needed preliminary for this paper, setting the definitions provided with the needed figures, and the table of notations. Section III talks about the first models which are the self-similar graphs based on cycle graphs; sub-section(A) is for how the fractals or the self-similar graph grows, sub-section(B) is for the theorem of the number of spanning trees for this model, sub-section(C) is for the Entropy of this model’s graphs, and sub-section(D) is for the clustering coefficients for this model’s graphs. Section IV is the order of section III but the second models which are the self-similar graphs based on wheel graphs.
II Preliminary
In this section, we set some important requirements and definitions before the main theorem and results, and firstly, we stick to the terms and definitions of Bondy and Murty Bondy and Murty (1976). All graphs of the paper are simple graphs, and for all e in , there exists such that:
Definition 1. A spanning tree of any given graph is a sub-graph of the graph which is connected and has no cycles. It is a tree if it has no cycles. Graph is connected if it contains spanning tree because any two vertices have a connection by a path in , and hence in . However, if is a connected graph that is not a tree and is an edge of one of its cycles. Then is a spanning sub-graph of that is likewise connected since an edge of a graph is a cut edge if and only if belongs to no cycle of . We get a spanning tree of by repeatedly eliminating edges in cycles until the only edge left is a cut-edge. As a result, a graph is only considered connected if and only if it has a spanning tree.
Definition 2. An operation is called Edge-Path-Transformation and shortly as or , if we replace every edge in with path of length by adding vertices, as in the figure 1, where is applied on , with . Moreover, this leads to having a central graph donated by where is the number of times this operation has been applied to the graph, so is the graph obtained by this operation.

Definition 3. An operation is called Graph-linking-Vertex and shortly as or , if we attach every vertex in the graph to a new same graph , as in the figure 2.

Definition 4. , and , is the graph that contains of vertices and of edges. For example; in the case of cycles, that it begins from is the case with , which is , and then by applying the two operations, as in figure 3, where they are applied on .

The length of the path in the operation of . | ||
The self similar graph based on or shortly in the section III. | ||
The self similar graph based on or shortly in the section IV. | ||
The base graph whether , or according to the section. | ||
Graph with just one vertex and without any edges. | ||
, | The number of vertices, and edges in self-similar graph in stage . | |
The central graph in the stage in graph , which is the result of operating on the graph, by the operation , times. | ||
The total number of spanning trees of the graph . | ||
The entropy of the self-similar whether for the model based on or according to the section. | ||
The Average clustering coefficient of the self-similar whether for the model based on or according to the section. |
III The self-similar (Fractals) graphs based on graphs
III.1 The Fractal Growth
The fractals based on the graphs are constructed by the operations in Definition 2, 3, which is and with given . Example 1: For instance, beginning with , and .
Stage | Graphs inside | Graph |
---|---|---|
![]() |
||
![]() |
||
![]() |
From the previous example, we can observe that is copies of and , and is copies of and copies of and . Therefore, each copy of in will be transformed to in , and the number of copies will be preserved, which is illustrated in the following diagram:
Lemma 1.
In , we have ( copies of , copies of , copies of , copies of , … , copies of , and ).
Proof.
Lemma 1 is true when (i = 1, and i = 2), which is in example 1. Assume that in , we have ( copies of , copies of , copies of , copies of , … , copies of , and ), and we want to prove that in , we have ( copies of , copies of , copies of , copies of , … , copies of , and ) when we perform the operations of and , we can see that each copy of will be converted to .
Since each copy of in will be transformed to in , and the number of copies will be preserved, and a subset of vertices in will be transformed to , and those subsets are the vertices that have been added to the edges in the operation of , and the will be transformed to .
Therefore, we can assure that in that contains ( copies of , copies of , copies of , copies of , … , copies of , and ) when we perform the operations of and , we can see that each copy of will be converted to . Moreover, we have central graph which is will grow which is , so it will grow in this way using the operations in definition 2, 3, to be the graph in the definition 4. ∎
Example 2: In the figure 4 the first iteration for by applying those operations, therefore, , where with considering and , the figure 5, the second iteration for which is , thus from the observation: and , and and . Those two operations will yield that, for every existing vertex in the graph, it gives edges and vertices in the next iteration. Moreover, for every existing edge in the graph, it gives edges and vertices.


Lemma 2.
The number of vertices and edges in any fractals based on graphs that were built previously can be given by the following two recursive formulas:
And by solving them together, it is easy to separate them as follows:
(1) | |||
(2) |
Where the indicates the original graph vertices and the is the path length in the .
Therefore, , , and we will take further initial step that , , those considered as a constants. The terms of the first recursive formula which is for the number of vertices in stage can be obtained from this equation (Which is the equation form for the recursive relation in the equation 1):
(3) |
Where the constants are: , , , (, , ).
III.2 The Number of Spanning Tree for self-similar (Fractal) graphs based on graphs
Theorem 1.
The number of spanning trees for any in any stage that is constructed in the same described way in the paper, can be given by the following equation:
(4) |
Proof.
By using Lemma 1, and 2; we can assure that we have ( copies of , copies of , copies of , copies of , … , copies of , and ) in the graph, and also, the contains similarly, ( copies of , copies of , copies of , copies of , … , copies of , and ).
Therefore, recursively, we will have the number of times, that is equivalent to , so , as it repeated number of times and it is known, so , and the central graph which is growing in the way that the number of spanning tree is , Finally, by having of that is according to lemma 1 is , , , … , , hence, we well have summation in the power as:
(5) |
And by executing the summations, using 3, we got:
∎
Example 3: Taking , and as in El Atik et al. (2021)
(6) |
In this case, the recursive formula for will be:
With substituting , and by the n and m.
The first few terms are: , the number of spanning trees in this case are given by the following:
Which can be written in another way that will illustrate the growth more clearly, as the following:
Iteration | El Atik et al. (2021) | Comp. Res. | Our Res. |
---|---|---|---|
1 | |||
2 | |||
3 | |||
4 |
The computational results is performed using a (Python).
III.3 The Entropy in self-similar graphs (Fractals) based on graphs
The entropy of a spanning tree which is known as the asymptotic complexity of the fractals is calculated explicitly from the presentation and the study of Burton and Pemantle (1993); Mokhlissi et al. (2018); LYONS (2005), it is an interesting term with a finite number that describes the network model. It can be given using the following formula:
(7) |
Corollary 1.
Using the formula for spanning trees in equation 5, and having equation 3 for the number of vertices, therefore, we get this:
(8) |
With conditions that , , and .
Therefore, as a correction of the entropy in El Atik et al. (2021), we find that, in the case of , and , the entropy is not 0.396176 as obtained, but it is .
And plot in 6, with are on the x-axis and is on y-axis, z-axis is the entropy.

III.4 The Clustering Coefficient for self-similar graphs (Fractals) based on graphs
The clustering coefficient is a measure of the degree to which vertices in a graph tend to cluster together. It is a common metric used to characterize the structure of graphs, particularly in the context of social networks. In an undirected graph, the clustering coefficient of a vertex is defined as the fraction of pairs of its neighbors that are also connected.
and it can be calculated for by the following equation:
(9) |
Where is the total number of edges between the neighbors of , and is the degree of this vertex. And the average clustering coefficient is just the average of the total of clutering coefficients.
One important property of the clustering coefficient is that it tends to be higher in graphs with a more regular structure, such as lattices and small-world networks, and lower in graphs with a more random structure, such as random graphs. This has important implications for the spread of information or diseases in a network, as vertices with a higher clustering coefficient are more likely to be connected to other vertices in their cluster and thus more likely to transmit the information or disease to other members of the cluster.
There has been a significant amount of research on the clustering coefficient in graphs, particularly in the context of social networks. For example, Watts and Strogatz (1998) showed that small-world networks, which have both high clustering and high degree of separation, can arise from relatively simple rewiring rules applied to regular lattices.
On the other hand, Barrat et al. (2004) found that the clustering coefficient in real-world social networks tends to decay with the degree of the vertex, a phenomenon known as the ”disassortative mixing” pattern.
In addition, Newman (2003) developed a method to measure the global clustering coefficient of a graph, which gives a summary statistic for the entire graph rather than just individual vertices.
Example 4: In the graph which is described in the 4, it has 12 vertex and the clustering coefficients can be easily obtained for each vertex, therefore, the set of clustering coefficients is according to the number of vertices in the figure. therefore the average clustering coefficients can be obtained by:
Example 5: In the 5 the fractal graph , it has 51 vertex and the clustering coefficients for all of them can be easily obtained for each vertex and average clustering coefficients can be obtained by:
Theorem 2.
The average clustering coefficient for any self-similar graph based on graphs of equals zero in , and with , the average clustering coefficient in stage is as follows:
(10) |
Proof.
The case when , and is illustrated in examples 4 and 5. In the fractals based on graphs of which is where , as is just the graph of . The degree is continuously increasing as multiples of . And by using the formula in equation 9 , where is the degree. As proved in how the fractals are growing, it has proven that the number of graphs that transform from to is preserved. Therefore, the number of vertices is growing as described in the formula 1, and the degree is simply changed as where zero is the degree that did not exist in the stage , that has been added by the operation .
Furthermore, the degree transforms to a certain number of edges that can be described by and there will be always the number of vertices that has a degree 2, and if they are not part of central graphs , they will have a clustering coefficient equals to 1, and the number of them is 2 per each vertex. As for calculating the average, the denominator should be the total number of vertices in this stage . Therefore, the formula in 10 is correct. ∎
IV The self-similar (Fractals) graphs based on graphs
IV.1 The fractal growth
The fractals based on the graphs are constructed by the operations in Definition 2, 3, which is and with given , similar to the way for .
Taking into consideration that the wheel graph is defined as the following: , where , and .
Example 6: For instance, beginning with is , and .
Stage | Graphs inside | Graph |
---|---|---|
![]() |
||
![]() |
||
![]() |
From the previous example, we can observe that is 5 copies of and , and is 5 copies of , copies of and .
Therefore, each copy of in will be transformed to in , and the number of copies will be preserved as in case.
Lemma 3.
In of , we have ( copies of , copies of , copies of , …, copies of , and which is the graph that resulted from operation on the , where is the result from the operation on .
Proof.
This lemma can be proved by induction, as it is true for (, and ), which is in example 6.
Assume that in , we have ( copies of , copies of , copies of , …, copies of , and ).
And we want to prove that in , we have ( copies of , copies of , copies of , …, copies of , and , when we perform the operations of and , we can see that each copy of will be converted to .
Since each copy of in will be transformed to in , and the number of copies will be preserved, and a subset of vertices in will be transformed to , and those subsets are the vertices that have been added to the edges in the operation of , and the will be transformed to .
Therefore, we can assure that in that contains ( copies of , copies of , copies of , …, copies of , and ) when we perform the operations of and , we can see that each copy of will be converted to . Moreover, we have a central graph which will grow to , so it will grow in this way using the operations in definitions 2, and 3, to be the graph in the definition 4. ∎
Lemma 4.
The number of vertices and the edges in any fractals that are built previously can be given by the following two recursive formulas:
And by solving them together, it is easy to separate them as follows:
(11) | |||
(12) |
The indicates the original graph vertices and the is the path length in the . Therefore in fractals of ; , , and we will take the same initial step as in cycles, that , , those considered as constants. The equation form for the recursive relation in the equation of the vertices:
(13) |
Where , , and is defined as before in equation 3. (, , and ).
IV.2 The Number of Spanning Tree for self-similar (Fractal) graphs based on graphs
The number of spanning trees for can be obtained by:
(14) |
And this is proved several times such as in Haghighi and Bibak (2009). Where is the Lucas number, such that: for , where . And the is the Fibonacci Number.
Theorem 3.
The number of spanning trees for any self-similar graph based on graphs in any stage can be given by the following equation:
(15) |
Proof.
By Lemma 3, and 4, we can see that in every stage , we will have such that contains ( copies of , copies of , copies of , …, copies of , and , and in the ( copies of , copies of , copies of , …, copies of , and . Recursively, we will have every time a specific number of , which is the ordinary wheel graph which has a specific formula by which we can know the number of spanning trees in equation 14, and it will be repeated and this vary from 0 to the stage itself, the same case with the cycles. The rest part will be the central graphs , which can be calculated through that, every contains , and number of that contains , and so on, till having number of , number of , …, and one . And can be calculated easily through this relation , as it is not a wheel anymore, and it can be noticed easily by considering the first wheel graph as a join between graph and as here Haghighi and Bibak (2012), then we have n number of which evolved to be , so the number of spanning trees for the central graph is . Therefore, the second part of the formula 15 is for the central graphs. ∎
And by executing the summations, using the Binet formula in equation 13, the first summation will be as follows:
(16) |
(17) |
Where , and .
Example 7: If we are going to take and as Example 6. We will find that, the number of vertices in each stage beginning from 0 is as follows: , the number of spanning trees (knowing that the number spanning trees of can be obtained by the formula 14 and it is equal to 45):
This confirms the computational results that are based on taking a graph’s vertices and edges and computing the determinant of the Laplacian matrix using a Python program.
IV.3 The Entropy in self-similar graphs (Fractals) based on graphs
Corollary 2.
By using the definition of entropy and its formula in 7, we will get the entropy but after defining some variables:
(18) |
With conditions that , and .
And plot in 7, with are on the x-axis and is on y-axis, z-axis is the entropy.

IV.4 The Clustering Coefficient for self-similar graphs (Fractals) based on graphs
Lemma 5.
Using the definition in the previous section and formula 9, it is easy to obtain a formula for the average clustering coefficients for wheel graphs .
(19) |
Proof.
As wheels can be considered as joined with , therefore we can assure that all vertices always will take degrees equal to and there will be just 2 connections with the neighbors except in the case of .
As the degree comes from the connection with the central vertex and the 2 vertices in the neighborhood, those 2 vertices by default are not connected and they are just connected with the third one which is the central. Therefore the degree is 3 and the connection between the neighbors is 2.
The degree for any central graph will be and the connection between the neighborhood will be as well, the cycle that connects all the other vertices except the central one.
For so, it is possible to ensure that the formula 19 is True. ∎
Example 8: Taking for example:

Therefore: Which is the correct and the same answer using a Python program.
Lemma 6.
The average clustering coefficient for any self-similar graph based on graphs of where in stages is as follows:
(20) |
Proof.
As previously stated the wheels can be considered as joined with , therefore the degree of each vertex will be transformed as follows:
As the zero degrees is a vertex that does not exist according to the definition of the operation , then it is developed to be 2 according to applying to each edge, and then we attach them to , so we attach each one to another 3 vertices, and so on. 3 is the original degree for any vertex and not the central vertex in any wheel, and as we apply we attach it to another 3 vertices, and so on. The central vertex has a degree of n and similarly will increase by 3 each time due to . Hence we know that each vertex contributes another vertex, so of them will have the degree 3 and with only 2 connections between the neighborhood, and of them will be the central vertex with degree , the original vertices in are represented in the last two terms, as n of them will have the doubled degree as it attached to another 3 vertices from the new graph and the edges of the previous graph was replaced by the path of length , with vertices in between the original vertices, therefore the overall degree will be 6 and with only 2 connections between the neighborhood. The last term is the original central vertex with a degree (n + 3) similar to the previous way, as it attached to another 3 vertices from the new graph, and the edges of the previous graph were replaced by the path of length , with vertices in between the original vertices, therefore the overall degree will be (n + 3) with just 2 connections between the neighborhood. Finally, we have in , vertex. ∎
Example 9: Taking ,


So, Which is the correct and the same answer using a Python program.
Theorem 4.
The average clustering coefficient for any self-similar graph based on graphs of , such that , and in any stage is as follows:
(21) |
Where the constants are as follows:
Proof.
Using lemma 6 and it’s proof that the degree of each vertex will be transformed. Therefore in each stage, we have another 3 degrees added to the set of degrees that we already have. So for example in stage 2 with , we will have the following set of degrees: {0, 2, 5, 3, 6, 9, 5, 8, 11}, consequently, the number of vertices is preserved and they are just transforming the degree by the nature of the two operations and .
As the graph begins with vertices, vertex with degree and the central vertex with degree . then with , each vertex has been added due to will have degree , and each vertex other than the central vertices have been added due to will have degree , and the central vertices have been added due to will have degree. Furthermore, the original vertices will have a degree of 6, and the original central vertex will have a degree of . And so on. Furthermore, plugging , will give us the formula in lemma 6. ∎
References
- Anema and Tsougkas (2016) J. A. Anema and K. Tsougkas, Journal of Physics A: Mathematical and Theoretical 49, 355101 (2016).
- Dhar (2006) D. Dhar, Physica A: Statistical Mechanics and its Applications 369, 29 (2006), fundamental Problems in Statistical Physics.
- Dhar (1990) D. Dhar, Phys. Rev. Lett. 64, 1613 (1990).
- El Atik et al. (2021) A. E. F. A. El Atik, A. Aboutahoun, and A. Elsaid, Information Processing Letters 170, 106117 (2021).
- Bondy and Murty (1976) A. Bondy and U. Murty, Graph Theory (The MaCmillan Press Ltd., 1976).
- Burton and Pemantle (1993) R. Burton and R. Pemantle, The Annals of Probability 21, 1329 (1993).
- Mokhlissi et al. (2018) R. Mokhlissi, D. Lotfi, J. Debnath, M. El Marraki, and N. EL Khattabi, Journal of Applied Mathematics 2018, 1017308 (2018).
- LYONS (2005) R. LYONS, Combinatorics, Probability and Computing 14, 491–522 (2005).
- Watts and Strogatz (1998) D. J. Watts and S. H. Strogatz, Nature 393, 440 (1998).
- Barrat et al. (2004) A. Barrat, M. Barthélemy, R. Pastor-Satorras, and A. Vespignani, Proceedings of the National Academy of Sciences 101, 3747 (2004), https://www.pnas.org/doi/pdf/10.1073/pnas.0400087101 .
- Newman (2003) M. E. J. Newman, SIAM Review 45, 167 (2003), https://doi.org/10.1137/S003614450342480 .
- Haghighi and Bibak (2009) M. H. S. Haghighi and K. Bibak, Applied Mathematical Sciences 3, 2263 (2009).
- Haghighi and Bibak (2012) M. Haghighi and K. Bibak, Rocky Mountain Journal of Mathematics 42 (2012), 10.1216/RMJ-2012-42-4-1183.