One of Oskar van Deventer's puzzles is the gear maze 2x2.There are 4 gears connected together so if you move one gear all four gears rotate (two clockwise, the other two counter-clockwise).On the gears there is a maze and the object is to move a ball through this maze.

enter image description here

Now my question is:

  • Is there an (easy) way to calculate the solution by using an excel-based spreadsheet or …

To make things not too complicated let us say:

  • one gear consists of (only) 12 teeth
  • so each gear is parted in 12 segments
  • the connecting points of the gears are defined e. g.
    1(red) <-> 1(blue); 4(blue) <-> 4(green); 1(green) <->1(orange); 4(orange) <-> 4(red)
  • the paths of the maze start and end on a segment and do not cross each other


2 Answers 2


Following Ross Millikan's suggestion, I numbered the segments of the original puzzle as follows:

Gear Maze 2x2 with numbered sections (Source: http://www.laserexact.nl/images/stories/virtuemart/product/gear%20maze%202x2.jpg, modified)

The connections between the segments are given in the following table:

Table of all connections between segments in the Gear Maze 2x2

One possible solution (there are several) is marked in bold. To follow it, start at 1(orange) and

  • for a vertical line, change to the accordingly coloured gear, or
  • for a horizontal line, traverse the path on the same gear

until you reach the goal 19(green).


I count (but you should check) that there are 23 teeth on each gear. The exact number is not important, but the fact that there are the same number on each gear is. That means that the paths will line up the same way every revolution and simplifies things considerably.

Now you can label each end of a path through a gear like you are doing. On the red gear I find 16 ends. Most ends can connect with three other ends-one on the same gear and one on each neighboring gear. Make a table with each end and the ones it can connect to. Start and End can only connect to two other ends.

Now you can do a breadth-first search. I would start from both start and end. From start, list the places you can go and color them red. From end, list the places you can go and color them green. Now from each red one, list where you can go and color those red and so on. When you find a link between the red and green ends, you have a path. You will probably find a path with about seven links, as the number of colored spots about triples each time. After three links you have colored 1+2+6+18=27 vertices unless there are multiple paths to the same point. Tow of them should touch and you are done.

  • $\begingroup$ I believe (and was attempting to prove but failing) that making the equivalent of only right hand turns should eventually get the ball to the goal. The equivalent is to only go around the gear clockwise (or counterclockwise). Is there any way to determine this? I know this is only true for some mazes depending on the topology of the surface and whether the goal is external to the map. $\endgroup$
    – kaine
    Commented May 29, 2014 at 16:49
  • $\begingroup$ I think the equivalent to always turning right is to always go to the next gear clockwise. You enter a path, to to the opposite end of the path within the gear, rotate the gear so that end connects to the next gear, and continue. For that to work you need there not to be a closed path around the end. I don't know if that is true here. $\endgroup$ Commented May 29, 2014 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.