Vous êtes sur la page 1sur 11

Buffon's Needle

An Analysis and Simulation

ntroduction
Buffon's Needle is one of the oldest problems in the field of geometrical probability. It was first
stated in 1777. It involves dropping a needle on a lined sheet of paper and determining the
probability of the needle crossing one of the lines on the page. The remarkable result is that the
probability is directly related to the value of pi.
This pages will present an analytical solution to the problem along with a JavaScript applet for
simulating the needle drop in the simplest case scenario in which the length of the needle is the
same as the distance between the lines.

The Simplest Case


Let's take the simple case first. In this case, the length of the needle is one unit and the distance
between the lines is also one unit. There are two variables, the angle at which the needle falls ()
and the distance from the center of the needle to the closest line (D). Theta can vary from 0 to
180 degrees and is measured against a line parallel to the lines on the paper. The distance from
the center to the closest line can never be more that half the distance between the lines. The
graph below depicts this situation.

The needle in the picture misses the line. The needle will hit the line if the closest distance to a
line (D) is less than or equal to 1/2 times the sine of theta. That is, D (1/2)sin(). How often
will this occur?
In the graph below, we plot D along the ordinate and (1/2)sin() along the abscissa. The values
on or below the curve represent a hit (D (1/2)sin()). Thus, the probability of a success it the
ratio shaded area to the entire rectangle. What is this to value?

The shaded portion is found with using the definite integral of (1/2)sin() evaluated from zero to
pi. The result is that the shaded portion has a value of 1. The value of the entire rectangle is (1/2)
() or /2. So, the probability of a hit is 1/(/2) or 2/. That's approximately .6366197.
To calculate pi from the needle drops, simply take the number of drops and multiply it by two,
then divide by the number of hits, or 2(total drops)/(number of hits) = (approximately).

The Other Cases


There are two other possibilities for the relationship between the length of the needles and the
distance between the lines. A good discussion of these can be found in Schroeder, 1974. The
situation in which the distance between the lines is greater than the length of the needle is an
extension of the above explanation and the probability of a hit is 2(L)/(K) where L is the length
of the needle and K is the distance between the lines. The situation in which the needle is longer
than the distance between the lines leads to a more complicated result.

Simulation
In this simulation, press one of the buttons labelled "Drop" to drop a batch of needles on the
parallel lines. The measurements and calculations will be completed for you and displayed below
the illustration. Each batch of needles you drop will add to the total number of needles measured,
allowing you to approximate pi more precisely with each drop. The illustration will show the
most recent batch of needles dropped.
Further down, you can also change the scale of the needles dropped or restart the experiment
from the beginning. Note that if you change the needle scale, the experiment will automatically
reset itself the next time you drop needles, because all the needles need to be the same size and
shape for the calculations to work.

Buffon's Needle Problem

Buffon's needle problem asks to find the probability that a needle of length will land on a line,
given a floor with equally spaced parallel lines a distance apart. The problem was first posed by
the French naturalist Buffon in 1733 (Buffon 1733, pp. 43-45), and reproduced with solution by
Buffon in 1777 (Buffon 1777, pp. 100-104).
Define the size parameter by
(1
)
For a short needle (i.e., one shorter than the distance between two lines, so that
probability
that the needle falls on a line is

), the
(2
)
(3
)
(4
)
(5
)

For

, this therefore becomes


(6
)

(OEIS A060294).

For a long needle (i.e., one longer than the distance between two lines so that
), the
probability that it intersects at least one line is the slightly more complicated expression
(7
)
where (Uspensky 1937, pp. 252 and 258; Kunkel).

Writing

(8
)

then gives the plot illustrated above. The above can be derived by noting that
(9
)
where
(1
0)
(11
)
are the probability functions for the distance of the needle's midpoint from the nearest line and
the angle formed by the needle and the lines, intersection takes place when
, and
can be restricted to
by symmetry.

Let be the number of line crossings by tosses of a short needle with size parameter . Then
has a binomial distribution with parameters and
. A point estimator for
is given by
(1
2)
which is both a uniformly minimum variance unbiased estimator and a maximum likelihood
estimator (Perlman and Wishura 1975) with variance
(1
3)
which, in the case

, gives
(1
4)

The estimator
estimator given by

for is known as Buffon's estimator and is an asymptotically unbiased


(1
5)

where
variance

, is the number of throws, and is the number of line crossings. It has asymptotic
(1
6)

which, for the case

, becomes
(1
7)
(1
8)

(OEIS A114598; Mantel 1953; Solomon 1978, p. 7).

The above figure shows the result of 500 tosses of a needle of length parameter
, where
needles crossing a line are shown in red and those missing are shown in green. 107 of the tosses
cross a line, giving
.

Several attempts have been made to experimentally determine by needle-tossing. calculated


from five independent series of tosses of a (short) needle are illustrated above for one million
tosses in each trial
. For a discussion of the relevant statistics and a critical analysis of one
of the more accurate (and least believable) needle-tossings, see Badger (1994). Uspensky (1937,
pp. 112-113) discusses experiments conducted with 2520, 3204, and 5000 trials.
The problem can be extended to a "needle" in the shape of a convex polygon with generalized
diameter less than . The probability that the boundary of the polygon will intersect one of the
lines is given by
(1
9)

where is the perimeter of the polygon (Uspensky 1937, p. 253; Solomon 1978, p. 18).
A further generalization obtained by throwing a needle on a board ruled with two sets of
perpendicular lines is called the Buffon-Laplace needle problem.

Buffon-Laplace Needle Problem

The Buffon-Laplace needle problem asks to find the probability


that a needle of length
will land on at least one line, given a floor with a grid of equally spaced parallel lines distances
and apart, with
. The position of the needle can be specified with points
and its
orientation with coordinate . By symmetry, we can consider a single rectangle of the grid, so
and
. In addition, since opposite orientations are equivalent, we can take
.
The probability is given by
(1
)
where

(2
)
(Uspensky 1937, p. 256; Solomon 1978, p. 4), giving
(3
)
This problem was first solved by Buffon (1777, pp. 100-104), but his derivation contained an
error. A correct solution was given by Laplace (1812, pp. 359-362; Laplace 1820, pp. 365-369).

If
so that
lines are

and

, then the probabilities of a needle crossing 0, 1, and 2


(4
)
(5
)
(6
)

Defining as the number of times in tosses that a short needle crosses exactly lines, the
variable
has a binomial distribution with parameters and
, where
(Perlman and Wichura 1975). A point estimator for
is given by
(7
)
which is a uniformly minimum variance unbiased estimator with variance
(8
)

(Perlman and Wishura 1975). An estimator

for is then given by


(9
)

This has asymptotic variance


(1
0)
which, for

, becomes
(11
)
(1
2)

(OEIS A114602).

A set of sample trials is illustrated above for needles of length


, where needles
intersecting 0 lines are shown in green, those intersecting a single line are shown in yellow, and
those intersecting two lines are shown in red.
If the plane is instead tiled with congruent triangles with sides , , , and a needle with length
less than the shortest altitude is thrown, the probability that the needle is contained entirely
within one of the triangles is given by

(1
3)
where , , and are the angles opposite , , and , respectively, and is the area of the triangle.
For a triangular grid consisting of equilateral triangles, this simplifies to
(1
4)
(Markoff 1912, pp. 169-173; Uspensky 1937, p. 258).

Vous aimerez peut-être aussi