The Lizard and the Fly

An open cylinder garbage can has a height of 4 ft and a circumference of 6 ft. On the inside of the can, 1 ft from the top, is a fly. On the opposite side of the can, 1 ft from the bottom and on the outside, is a lizard. What is the shortest distance that the lizard must walk to reach the fly?


To reach the fly, the lizard must first walk a path on the exterior surface of the garbage can to the opening. From there, it continues walking along a path on the interior surface to catch the prey.

The most salient piece of knowledge we have about minimum distance is that the shortest distance between two points comes from the straight line connecting them. However, it is not immediately apparent how to apply this knowledge in the present problem, since we are constrained to the bent lines on a curved wall. Nonetheless, the curved wall can be cut and flattened, result in a completely flat two dimensional surface. We can then connect the points by a straight line.

Fig. 1

Having flattened out the wall in the manner shown in Fig. 1, we see the lizard’s walking path consists two segments of straight line. The length of the path is

\sqrt{x^2+3^2} + \sqrt{(3-x)^2+1^2}.\quad\quad\quad(1)

Fig. 2

Three centuries before the birth of Christ, Euclid discovered the reflection law of light: if a ray of light is reflected by a mirror from point A to point B, the point of reflection P is such that the rays AP and PB make equal angles with the mirror (\theta_1 = \theta_2 in Fig. 2). However, it was Heron who first observed that if the point P on the mirror were such that \theta_2 \ne \theta_2, then the resulting total path length AP+PB would be longer; i.e.,

AP + PB is minimized when \theta_1 = \theta_2.

For the lizard, when \alpha = \beta, it walks the least (Fig. 1).

From \alpha=\beta, we have \cot(\alpha) = \cot(\beta); i.e.,

\frac{x}{3} = \frac{3-x}{1}\quad\quad\quad(2)

Solving (2) gives

x = \frac{9}{4}

so that (1) yields

\sqrt{(\frac{9}{4})^2 + 3^2} + \sqrt{(3-\frac{9}{4})^2+1^2} = 5.

Therefore, the shortest distance the lizard must walk is 5 ft.


Exercise-1 Find x that minimizes \sqrt{x^2+25} + \sqrt{(x-4)^2+4}.

Exercise-2 If x and N are real numbers such that N=\sqrt{5x+6}+\sqrt{7x+8}, then what is the smallest possible value of N?

Exercise-3 An open cylinder garbage can has a height of 4 ft and a circumference of 6 ft. On the inside of the can, 1 ft from the top, is a fly. On the opposite side of the can, 1 ft from the bottom inside the can, is a lizard. What is the shortest distance that the lizard must walk to reach the fly?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s