Buffon’s Needle Algorithm to Estimate π
- 1 Division of Liberal Arts and Sciences, GIST College, Gwangju, Korea
- 2 Concentration of Electrical Engineering and Computer Science, GIST College, Gwangju, Korea
- 3 Division of Liberal Arts and Sciences, GIST College, Gwangju, Korea
- 4 Concentration of Physics, GIST College, Gwangju, Korea
Abstract
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, G. (1777) Essai da’rithme’tique morale. Histoire Naturelle, Générale, et Particuliére, Supplément, 4, 685.
- Morton, R.A. (1966) The Expected Number and Angle of Intersections between Random Curves in a Plane. Journal of Applied Probability, 3, 559-562. https://doi.org/10.1017/S0021900200114342
- Diaconis, P. (1976) Buffon’s Problem with a Long Needle. Journal of Applied Probability, 13, 614-618.
- Periman, M.D. and Wichura, M.J. (1975) Sharpening Buffon’s Needle. Amer. Stat, 29, 157.
- Solomon, H. (1987) Geometric Probability. SIAM, Philadelphia.
- Wood, G.R. and Robertson, J.M. (1998) Information in Buffon Experiments. Journal of Statistical Planning and Inferences, 66, 415-421.
- Siniksaran, E. (2008) Throwing Buffon’s Needle with Mathematica. The Mathematical Journal, 11, 71.
- Sobol, I.M. (1994) A Primer for the Monte Carlo Method. CRC Press, Washington DC.
- Lemieux, C. (2009) Monte Carlo and Quasi-Monte Carlo Sampling. Springer-Verlag, New York.