Can You Catch The Grasshopper?

Riddler Classic

You are trying to catch a grasshopper on a balance beam that is 1 meter long. Every time you try to catch it, it jumps to a random point along the interval between 20 centimeters left of its current position and 20 centimeters right of its current position.

If the grasshopper is within 20 centimeters of one of the edges, it will not jump off the edge. For example, if it is 10 centimeters from the left edge of the beam, then it will randomly jump to anywhere within 30 centimeters of that edge with equal probability (meaning it will be twice as likely to jump right as it is to jump left).

After many, many failed attempts to catch the grasshopper, where is it most likely to be on the beam? Where is it least likely? And what is the ratio between these respective probabilities?

Solution

Given an origin $k$, the landing locations $l$ for the jump can be defined:

Similarly, given a landing location $l$, the origins $k$ for the jump can be defined:

Combining the two, for some grasshopper located at $g$:

Dividing origins by landing locations yields 1 for all. Since the grasshopper is equally likely to be in any starting position, the probability of a single jump from any location converges to being equal.

Since multiple jumps land on a location, the distribution of probabilities should converge to be in the same ratio as the distribution of ranges.

Answer.

0 cm and 100 cm have a probability that is exactly half that of any location between 20 cm and 80 cm.

I ran a simulation of 10,000,000 grasshoppers, with locations randomly located from 0.0000 to 1.0000 meters (4 significant figures). The probability density function quickly converges to the expected trapezoidal shape.

Rohan Lewis

2022.06.13

Code can be found here.