Buffon’s Needle Algorithm to Estimate π

HTML  XML Download Download as PDF (Size: 431KB)  PP. 275-279  
DOI: 10.4236/am.2017.83022    2,161 Downloads   4,611 Views  Citations

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.

Share and Cite:

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

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.