Mechanical ball clock puzzle (long but challenging)

Recently, I bought one of these clocks.

Here’s how it works: there’s the “arms” - single minutes 1-4 on the top arm, 5-minute increments 5-55 on the second arm, and hour increments 2-12 on the bottom arm. On the hour arm is a fixed ball bearing representing 1:00 (am or pm) that stays put.

Each minute a rotating arm picks up a ball and drops on the the feeder ramp where it comes to rest on the single minute arm. When the fifth ball is dropped, it tilts the arm sending the four minute balls down a ramp to the main feed ramp. The fifth ball then drops through a hole and rolls onto the 5-minute ramp where it will stay until the hour passes.

When the 60th ball drops, it sends the minute balls down, tilts the 5-mninute arm down sending the balls down the ramp to a blocking arm, and then drops down and rolls onto the hour arm where it waits for a 12-hour roatation.

The next ball to drop becomes the first minute of the new hour and trips the blocker arm sending the 5-minute balls to the common feeder ramp.

When the 12th hour comes, the ball trips the minute balls, the 5-minute balls to the blocking arm, and the 11 hour balls to the common feeder and then follows them. The next ball becomes the first minute again and sends the 5-minute balls to the common feeder.

Now the puzzler:

Assume it’s 1:00 and there are no balls on the arms. There are 31 balls in the set (only 28 are needed, but there’s 3 extra). You number the balls 1-31. Using the above scenarios, how long (if ever) will it take for the balls to return to their original starting order?

Take the first ten minutes:

1-31 sit in the feeder ramp.

They go like this:

1-2-3-4

Ball 5 trips the minute arm and sends 1-2-3-4 back to the feeder ramp in reverse order 4-3-2-1 and ball 5 is now sitting in the “5” position on the 5-minute ramp.

Balls 6-7-8-9 now go to the minute arm.

Ball 10 drops them to the common feeder ramp in reverse order 9-8-7-6 and drops to the 5-minute ramp where it will sit in the “10” position.

In the common feeder ramp here’s the current order:

11-31, 4, 3, 2, 1, 9, 8, 7, 6.

Any takers?

Is this too complicated a description?

I can pretty much guarantee that they will return to their original order at some point. They have to. There are only a finite number of possible orderings of balls. The entire 12 hours cycle will always perform precisely the same re-shuffling of the balls. If you keep applying that re-shuffling you can’t get new orderings forever, so the original one will reappear eventually.

(Some Group Theory tells us that the length of the cycle must be a factor of 31 factorial)

And I’m too lazy to think any further…

No takers, eh?

Ah well, just thought some Doper math geek would like a challenge.

does some quick calculator work
Longer than I’m willing to wait. There are roughly 8.2 X 10^33 possible orderings for the balls, assuming a straight line (unsure if the mecahnics of the clock will affect that, too lazy to try and reason it out). Maybe some techie could write a computer program to find the answer for us.