ON THE TRAVELING FLY PROBLEM

Svante Janson

Department of Mathematics

Uppsala University

P.O.Box 480, S-751 06 Uppsala, SWEDEN

                     (svante.janson@math.uu.se)

Gargano, LoSacco and Gargano [1] have studied the following problem: “If a fly starts at a random point inside a sphere of radius one in R^{n} and flies in a straight line in a random direction until it reaches the boundary, what is the average distance the fly travels?”

They gave exact answers for n = 1, 2, 3 and approximate answers for 4 ≤ n ≤ 9, leaving the general case as an open problem. This problem is solved here.

Theorem. Let n ≥ 1 and l_{n} be the average distance traveled by the n-dimensional fly. Then

l_{n} = \frac{2}{\sqrt{π}} \frac{Γ(n/2 + 1)}{Γ(n/2 + 3/2)} = \{ \begin{matrix}2\frac{n!!}{(n+1)!!}, & if n is odd; \\ \frac{4}{π} \frac{n!!}{(n+1)!!}, & if n is even. \end{matrix}

For example, l_{1} = 1, l_{2} = 8/3π, l_{3} = 3/4, l_{4} = 32/15π, l_{5} = 5/8, l_{6} = 64/35π, l_{7} = 35/64; moreover, it follows that l_{n} ∼ \sqrt{8/πn} as n → ∞. Proof. By symmetry, we may assume that the fly flies in a fixed direction. Assume n ≥ 2, let B_{n} be the unit ball in R^{n}, write the starting point x ∈ B_{n} as (x′, x_{n}) with x′ ∈ B_{n−1} and assume that the fly flies in the x_{n}-direction; then the flown distance is (1 − |x′|^{2})^{1/2} − x_{n}.

Since the average of x_{n} over B_{n} vanishes by symmetry, the average distance l_{n} equals the average of (1 − |x′|^{2})^{1/2} over B_{n} = {(x′, x_{n}) : x′ ∈ B_{n−1}, −(1 − |x′|^{2})^{1/2} ≤ x_{n} ≤ (1 − |x′|^{2})^{1/2}}, and thus

l_{n} = \frac{2 ∫_{B_{n−1}}(1 − |x′|^{2}) dx′}{2 ∫_{B_{n−1}}(1 − |x′|^{2})^{1/2} dx′} .

Polar coordinates followed by the change of variables r^{2} = t yield

l_{n} = \frac{∫_{0}^{1}(1 − r^{2})r^{n−2} dr}{∫_{0}^{1}(1 − r^{2})^{1/2}r^{n−2} dr} = \frac{∫_{0}^{1} t^{(n−3)/2}(1 − t) dt}{∫_{0}^{1} t^{(n−3)/2}(1 − t)^{1/2} dt} .

This exhibits l_{n} as the ratio B((n − 1)/2, 2)/B((n − 1)/2, 3/2) of two beta integrals, and the result follows.

Reference

[1] M.L. Gargano, F. LoSacco and M.R. Gargano; The traveling fly problem, Graph Theory Notes of New York XXX, New York Academy of Sciences, 47 (1996).