Solving Mazes by Coloring
Many Demonstrations show how to solve a maze with depth-first search or breadth-first search. Another kind of solution is based on coloring the different connected components of the set of walls. Every maze is divided into two components by the solution path, which is just the boundary between the two components. This is easy to see if you color the two components with different colors. Mazes with more than two connected components have more than one solution. This Demonstration lets you generate mazes of size up to 15×15 with up to six connected components and to color them to see the solution.[more]
Large mazes are quite slow to generate in this implementation.[less]
This Demonstration was developed for an elementary school math activity at the Waseca Montessori School in Athens, Georgia.