^{1}

^{*}

^{2}

^{1}

^{3}

Buffon’s needle experiment was originally devised to get the value of π. With the advent of computers, Buffon’s needle algorithm has been used pedagogically as an example of Monte Carlo methods in introduction classes, and there are many Buffon’s needle algorithm implementations available on the internet. However, for the calculation of π, the exact value of π is used in the programs for Buffon’s needle angle sampling, and hence the example is not demonstrated correctly. This brief note presents a random angle sampling algorithm for the Buffon’s needle. We then compare the Buffon’s needle and Hit-and-Miss integration algorithms using Monte Carlo laboriousness comparison, and find that the Hit-and-Miss algorithm is superior.

Buffon’s needle experiment [

and so

where

Here, we should note that the Buffon’s needle problem becomes an integration problem (see

Many variants of the original Buffon’s needle experiment [

With the advent of computers, Buffon’s needle has been pedagogically used as an example in Monte Carlo method introductory classes and many websites pro- vide Buffon’s needle algorithm implementations. However, in these programs, the value of

This note presents a sampling algorithm for the random direction of the needle that avoids using

For random direction sampling of the needle, we use a square enclosing a tightly fitted circle (see

Since the directions of the random points inside the circle are uniform, we obtain uniform needle random directions.

The Hit-and-Miss integration algorithm can also provide the value of

We use the common Monte Carlo algorithm comparison, time consumption (laboriousness): [

Buffon’s needle algorithm has been pedagogically used as an introduction to

CPU time per run (s) | Variance ( | Time consumption ( | |
---|---|---|---|

Buffon’s needle | 15.9 | 5.97 | 9.49 |

13.0 | 2.51 | 3.26 |

Monte Carlo methods. However,

This research was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (2012R1A1A2003025). Also, later this work was supported by the GIST Research Institute (GRI) in 2017. In addition, this research was a collaborative research project, supercomputing infrastructure service and application, supported by the Korea institute of science and technology information.

Hwang, C.-O., Kim, Y., Im, C. and Lee, S. (2017) Buffon’s Needle Algorithm to Estimate π. Applied Ma- thematics, 8, 275-279. https://doi.org/10.4236/am.2017.83022