Comparison of Spectral Properties in Sierpiński and Hanoi Graphs Using Python
The spectrum of a graph, derived from the eigenvalues of its adjacency matrix or various other matrices, provides a deep insight into its structural and dynamical properties, such as connectivity, stability, and symmetry. This article provides comprehensive details on the spectral properties of two well-known fractal graphs, the Sierpiński and Hanoi graphs, and shows how Python can be used to manipulate and analyze recursive structures effectively. Python, with libraries such as NumPy, SymPy, and SciPy, enables efficient computation of these spectral properties. We generate the graph structures, visualize them with Matplotlib, and the adjacency, Laplacian, first and second Zagreb matrix, and Seidel matrices are computed and examined to explore the eigenvalue distributions, spectral energies, and spectral radii. The Comparative analysis reveals that the Sierpiński graph consistently exhibits higher energy values and a larger spectral radius than the Hanoi graph, reflecting its denser connectivity and stronger structural complexity. These results demonstrate how Python can serve as an effective computational framework for spectral graph analysis, providing an accessible approach to exploring the mathematical properties of self-similar and recursive networks.
Authors
- Muhammad Imran (ORCID: https://orcid.org/0000-0002-2827-0462)
- S. A. U. H. Bokhary
- A. Nawaz
Institutions
- Bahauddin Zakariya University (PK)
- Prince Mohammad bin Fahd University (SA)
Publication Details
- Journal
- Malaysian Journal of Mathematical Sciences
- Published
- 2026-12-02
- DOI
- https://doi.org/10.47836/mjms.20.4.07
- Primary Topic
- Graph theory and applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00