Constructing Classic Graphs in Graph Theory Using Python and Generative AI: A Case Study in Computational Visualization and Prompt Engineering
This study explores the construction of several classic graphs in graph theory through Python programming, offering a hands-on computational approach to understanding their mathematical properties. The selected graphs-including the Wagner, Desargues, Herschel, Möbius-Kantor, Franklin, truncated icosahedral, and triangular grid graphs-are chosen for their historical significance and structural complexity. Using Python’s turtle graphics module, each graph is visualized through trigonometric and geometric logic, illustrating core concepts such as regularity, symmetry, Hamiltonicity, and planarity. In addition to manual code development, the study integrates generative AI, specifically ChatGPT, to reproduce graph constructions via prompt engineering. This dual approach showcases the educational potential of AI-assisted programming and reinforces algorithmic thinking. The work aims to bridge the gap between theoretical graph concepts and their algorithmic applications. It provides a replicable methodology that enhances student engagement, supports active learning, and promotes interdisciplinary exploration across mathematics, computer science, and education.