All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Maze Master (Posted on 2004-06-21) Difficulty: 2 of 5
Given a two dimentional maze which only has one path from entrance to exit, develop an algorithm that discovers the no-dead-ends route from start to finish.

No Solution Yet Submitted by Gamer    
Rating: 4.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Straight forward way | Comment 1 of 12

Follow the righthand wall, leaving a trail alongside it.  When you reach the exit, retrace your path only where it does not contain a double trail.

X finish X

X      o  XXXXXXXXX

X      ooooooooooo X

X      ooooooooooo X

X      o  XXXXXXXXX

X start X

The o trail finds the direct path but contains a double trail down to the dead end.  Eliminating the double trail eliminates the dead end.

I can't think of a way for the simple maze described to foil this plan.

-Jer


  Posted by Jer on 2004-06-21 13:55:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information