Monday, September 27, 2010

mazes and labyrinths

One of the not-so-subtly-pagen rituals of autumn that seems to be gaining popularity is labyrinth walking. Walking around in circles, preferably by candlelight, has been de rigueur around here for a few years at local fall festivals.

Maze-walking generally stands in stark contrast to this seemingly-closely related labyrinthine activity. For most people, to say that maze-walking is less soothing than labyrinth walking is an under-statement: instead of a growing sense of calm and mental stillness, you get a rising sense of panic and an increase in muttering. When going through a bunch of outdoor mazes a short while ago (right here!) I tried out a suggestion that Marcus du Sautoy casually mentioned in "The Story of Maths" (I think it was in the last episode): if you walk through the maze ensuring that your right hand is always touching a wall, you are sure to complete it (if there is a way to do so). It turns out that this is actually the standard algorithm for traversing a maze (it's in wikipedia, innit?)

The technique worked well, but the kids were a bit disappointed. When you say you have a method of solving a maze, those not used to the ways of math or computer science assume that it will somehow magically allow you to proceed by the shortest route through the maze avoiding every dead-end. 

Instead, the right hand rule will lead you into every dead-end in your path, but following it ensures that eventually you worm your way out, and that you do not get lost second-guessing yourself (sounds like your typical computational approach). Following a rule to get through the maze transforms it into a labyrinth - you know that you will reach your goal and you can allow yourself to become lost in the process. Maze-walking in this way provides an example of how being mindful of the opportunities to apply algorithms allows you to become calm and meditative in even the most stress-inducing situations. 

On a related note, a nice mathy way to draw a simple labyrinth is to start with a series of concentric circles. Draw a line segment from the innermost circle to a point on the outermost circle, such that the segment is tangent to the innermost circle. Then break each circle on alternate sides of the line segment to form a path.