Solving Mazes: A New Approach Based on Spectral Graph Theory
Marta Martín-Nieto,
Damián Castaño,
Sergio Horta Muñoz,
David Ruiz
Affiliations
Marta Martín-Nieto
Escuela de Ingeniería Industrial y Aeroespacial de Toledo, Universidad de Castilla-La Mancha, Av. Carlos III, Campus Fábrica de Armas, 45004 Toledo, Spain
Damián Castaño
Escuela de Ingeniería Industrial y Aeroespacial de Toledo, Universidad de Castilla-La Mancha, Av. Carlos III, Campus Fábrica de Armas, 45004 Toledo, Spain
Sergio Horta Muñoz
Escuela de Ingeniería Industrial y Aeroespacial de Toledo, Universidad de Castilla-La Mancha, Av. Carlos III, Campus Fábrica de Armas, 45004 Toledo, Spain
David Ruiz
Escuela de Ingeniería Industrial y Aeroespacial de Toledo, Universidad de Castilla-La Mancha, Av. Carlos III, Campus Fábrica de Armas, 45004 Toledo, Spain
The use of graph theory for solving labyrinths and mazes is well known, understanding the possible paths as the connections between the nodes that represent the corners or bifurcations. This work presents a new idea: minimizing the length of the optimal path formulated as a topology optimization problem. The maze is mapped with finite elements, and then, through the eigenvalues of the Laplacian matrix of the graph, a constraint is imposed over the connectivity between the input and the output. Several 2D examples are provided to support this approach, allowing for unequivocally finding the shortest path in mazes with multiple connections between entrance and exit, resulting in an nonheuristic algorithm.