The Coded Maze

Join Our Community of Science Lovers!

A conventional maze is a set of walls or hedges enclosing a roughly rectangular plot of space. One enters from outside of the rectangle and the goal is to exit somewhere else. A well-known strategy for defeating such a maze is to put your left hand on the wall and walk forward, always touching the wall with your left hand. Eventually you will reach the exit.

For example consider this simple maze:

Putting your left hand on the wall at the entrance at the bottom and walking will lead you under the T-shaped wall (though you will never touch it), up and above the entrance to the right, eventually to the bottom left corner (labeled A), then B, and then the dead end at C. But the left hand strategy will then lead you out of this dead end, until you finally approach the exit from the left. This is certainly not the most efficient way to go through the maze, but it is guaranteed to work.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


Warm-up for mathematicians:
Can you see why this strategy will always work on any maze whose entrance and exit are gaps in the outside wall?

Solution to warm-up:
Imagine that the exterior wall surfaces of the maze are painted black and the interior wall surfaces are painted white. Imagine that as you walk, you draw a line with your left hand using a crayon. Even though your path may not seem to be efficient, it is in the sense that you never go over the same section of white wall twice until you get to the exterior of the maze (and hit a black surface). There is clearly only a finite amount of white wall surface between the entrance and the first exterior point of the maze. Therefore you will eventually get out. (By symmetry, a right hand on the right wall will also work.)

This next puzzle, however, escapes the limitations of the physical world because the maze is on the web. There is no analogue to putting your left hand on the wall -- even if you always go left, you could go in a circle. The first web page is here. You want to get to a web page that tells you (albeit in code) that you have arrived. The challenge is to find the most efficient route to the final page. Hints to that route are hidden in the encrypted words and phrases that you encounter along the way, as well as in other parts of the web pages. Good luck!

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe