Caterpillar Tracks

Caterpillar Tracks

Some species of caterpillars have an ingenious way of getting around. Let's say that a caterpillar by itself can move at 1 unit per second. If you started with two caterpillars on top of one another, then while the bottom one is moving at the usual speed, the one on top would be going at 2 units per second relative to the ground. In a way it would be using the bottom caterpillar as a conveyor belt.

When the top caterpillar has crawled over the bottom caterpillar completely it would then be in the front of the queue at which point it would be the other caterpillar that could mount the first one and take its turn to benefit from a burst of speed. By taking it in turns to piggyback onto each other they can alternate between 1 and 2 units per second netting an average speed of 1.5 units per second.

If we start with a stack of three then things get even quicker. Caterpillars 1, 2 and 3 will eventually unstack and then restack themselves in the order 3, 2, 1. This process will repeat giving two of the caterpillars a speed of 1 and then a speed of 3 half the time each and so an average speed of 2, while the middle caterpillar would go at a speed of 2 the whole time.

Generalising the process, with n caterpillars the stack of 1, 2, ... n would keep flipping over to n, n-1, ... 1 and would maintain an average speed of n/2+1/2.

This isn't just mathematical hypothosising. Dustin from the YouTube Channel Smarter Every Day caught video of a set of caterpillars that the glorious people of the internet have analysed to confirm these numbers. The picture below is from that video and it has a block of caterpillars of approximate height 3. The layer 2 were indeed going 1.5 times the speed of the bottom layer (actually about 1.47) and the top layer slightly surpassed the prediction at about 2.1 times the speed (probably because the bottom layer had a heavy weight to lift).

One thing that amused me was that sometimes the fastest way for a caterpillar to get somewhere is to slow down. Imagine a lone caterpillar as another one lagging behind it. It could go 1 unit per second, but for long distances it is a better decision to wait and then piggy back. Neat.

The Banker's Puzzle

The Banker's Puzzle

Game Design Maths Problem

Game Design Maths Problem