Buffon needle

Suppose a floor made of parallel strips of wood, each with a width of 2 cm , and we drop many needles (length 1 cm) on the wood, randomly. Let n be the number of needles will lie across a line between two strips. What is the ratio of the total needles dropped to n? (total needles dropped /n)

Note: Consider for simplicity there are 3 such woods on the floor (the number of woods doesn't affect the outcome). And needles are to be dropped on them. Length of the wood doesn't affect the outcome.


The answer is 3.14159265359.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Joseph Newton
Nov 1, 2019

Let's say that the centre point of the needle falls between two of the lines, and the angle between the needle and the lines is θ \theta . Given a certain value of θ \theta , where does the needle need to fall in order to cross one of the lines?

We can see that the needle will cross a line if its centre is within 1 2 sin θ \frac12\sin\theta cm of one of the lines. Then, the probability that a needle at this angle will lie across a line is 2 ( 1 2 sin θ cm ) 2 cm = 1 2 sin θ \frac{2\left(\frac12\sin\theta\ \text{cm}\right)}{2\text{cm}}=\frac12\sin\theta Then, integrating over possible values of θ \theta , the probability that any needle will cross a line is 2 π 0 π 2 1 2 sin θ d θ = 1 π [ cos ( π 2 ) + cos ( 0 ) ] = 1 π \frac2{\pi}\int_0^{\frac{\pi}2} \frac12\sin\theta\ d\theta=\frac1{\pi}\left[-\cos\left(\frac{\pi}2\right)+\cos(0)\right]=\frac1{\pi} This gives the ratio of needles lying across lines to total needles. We want the ratio the other way round, so the answer is 1 1 / π = π \frac1{1/\pi}=\pi .

Hari Kumar
Oct 31, 2019

I've written a Python Program to figure it out.

Buffon needle

* CODE STARTS *

import random, math

p = 100

total = 20005 touch = 0

for i in range (0, total):

y = random.randrange(0*p, 6*p)/p # Dist. y from below
a = round((random.randrange(0, 360*p)/p)*math.pi/180, 5) #Angle (Rad)

h = 0.5*math.sin(a)
up = y+h
do = y-h

if up < 0:
    up = int(up)-1
else:
    up = int(up)

if do < 0:
    do = int(do)-1
else:
    do = int(do)

if up < do:
    up, do = do, up

if ((do == 0 and up == 1) or (do == 2 and up == 3) or (do == 4 and up == 5) or (do == 6 and up == 7)):
    touch += 1

print(total/touch)

* CODE ENDS*

==> 3.143463230672533

Interesting problem. I'd also be interested in an analytical solution, if anybody should have one.

Richard Desper - 1 year, 7 months ago

Looking for the same. And, Joseph Newton to our rescue...

Hari Kumar - 1 year, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...