Abstract
\(Pi(\pi )\) occupies a central place in multiple physical phenomena such as diffraction, radiation, quantum mechanics and in various applications such as crystallography, Fourier analysis etc. Hence a suitable simulation based numerical/statistical method to determine it accurately is of great significance. Keeping this objective into consideration, we describe a simulation-based computational method to implement Monte Carlo (MC) simulations in a non-Euclidean 3D geometry for the first time in this paper. To visualize the MC simulations and generate data, codes in the python programming language were developed efficiently. The data were generated by (i) varying the number of simulations, that is, the number of random data points, and (ii) repeating the process I times (iterations) for a fixed number of simulations and pooling the data generated from (i) and (ii). A dual approach was adopted to analyze the data with the help of statistical methods implemented through python code, which comprised random sampling using the ‘central limit theorem’ (CLT) and ‘clustering technique’. Similar extensive studies were carried out for Euclidean 2D geometry, and the results were analyzed and compared through a detailed error analysis. It has been reported that with an increase in the number of simulations/iterations, the value of pi attains better stabilization and conforms better to the normal distribution. We report that the errors are \(\propto {n^{-0.5}}\) as a function of number of simulation n for 3D geometry, whereas the absolute error \(\epsilon (n)\) decreases exponentially in the case of 2D geometry. All the results obtained through the dual approach were consistent for both the geometries, and a stabilization in pi value up to \(10^{-5}\) in the 2D geometry and up to \(10^{-4}\) in the 3D geometry was achieved using random sampling. We also report that the simulation developed in our work has yielded better and more accurate mean values of pi between (0.99979–0.99998)\(\pi \) for both the geometries and has ‘least error’ compared to the work reported by others in literature.
Similar content being viewed by others
Data Availability
All the data and links to codes/simulators are provided in the article.
References
Blatner, D.: The Joy of Pi. Walker and Company, New York (1999)
Castellanos, D.: The ubiquitous \(\pi \). Math. Mag. 61(2), 67–98 (1988)
Wagon, S.: Pi: A Source Book, pp. 557–559. Springer, Berlin (2004)
Bailey, D., Borwein, J., Borwein, P., Plouffe, S.: The quest for pi. Math. Intell. (1996). https://www.davidhbailey.com/dhbpapers/pi-quest.pdf
Beckman, P.: A History of Pi, 5th edn. The Golem Press, Boulder (1982)
Pi, Wikipedia. https://en.wikipedia.org/wiki/Pi
Corris, G.: Experimental \(\pi \). Math. Schl. 19(1), 18–21 (1990). https://eric.ed.gov/?q=EJ407681
Lowry, P.G.: An irrational calculation of pi. Creat. Comput. 7(12), 238–39 (1981)
Bloch, S., Dressler, R.: Statistical estimation of \(\pi \) using random vectors. Am. J. Phys. 67(4), 298–303 (1999). https://doi.org/10.1119/1.19252
Cohen, G., Shannon, A.: John ward’s method for the calculation of pi. Hist. Math. 8(2), 133–144 (1981). https://doi.org/10.1016/0315-0860(81)90025-2
Agarwal, R.P., Agarwal, H., Sen, S.K.: Birth, growth and computation of pi to ten trillion digits. Adv. Differ. Equ. 2013(100), 1687–1847 (2013). https://doi.org/10.1186/1687-1847-2013-100
Aderibigbe, A.: A term paper on Monte Carlo analysis/simulation (2014). https://core.ac.uk/download/pdf/154230379.pdf
Sen, S.K., Agarwal, R.P., Shaykhian, G.A.: Golden ratio versus pi as random sequence sources for Monte Carlo integration. Math. Comput. Model. 48(1–2), 161–178 (2008)
Mohazzabi, P.: Monte Carlo estimations of e. Am. J. Phys. 66(2), 138–140 (1998). https://doi.org/10.1119/1.18831
Yavoruk, O.: How does the Monte Carlo method work? arXiv preprint arXiv:1909.13212 (2019)
Öksüz, I.: Basis quantum Monte Carlo theory. J. Chem. Phys. 81(11), 5005–5012 (1984). https://doi.org/10.1063/1.447486
Sokolowski, J.A., Banks, C.M.: Modeling and Simulation Fundamentals: Theoretical Underpinnings and Practical Domains. Wiley, New York (2010)
Hart, D., Roberts, T.: Buffon’s needle—a simulation. Math. Schl. 18(1), 16–17 (1989). https://eric.ed.gov/?q=EJ389723
Schroeder, L.L.: Uffon’s needle problem: an exciting application of many mathematical concepts. Math. Teach. 67(2), 183–186 (1974). https://doi.org/10.5951/MT.67.2.0183
Wang, A.L., Kicey, C.J.: In: Proceedings of the 49th Annual Southeast Regional Conference, pp. 233–236 (2011). https://doi.org/10.1145/2016039.2016100
Strbac-Savic, S., Miletic, A., Stefanović, H.: In: 8th International Scientific Conference" Science and Higher Education in Function of Sustainable Development-SED 2015 (2015)
Simanek, D.E.: The measure of pi. Phys. Teach. 52(2), 68–68 (2014). https://doi.org/10.1119/1.4862097
Sharma, R., Singhal, P., Agrawal, M.K.: In: IOP Conference Series: Materials Science and Engineering, vol. 1116, p. 012130. IOP Publishing (2021)
Williamson, T.: Calculating pi using the Monte Carlo method. Phys. Teach. 51(8), 468–469 (2013). https://doi.org/10.1119/1.4824938
Kosobutskyy, P., Kovalchuk, A., Kuzmynykh, M., Shvarts, M.: In: Perspective Technologies and Methods in MEMS Design (MEMSTECH), 2016 XII International Conference on, IEEE, pp. 167–169 (2016)
Mason, S., Hill, R., Mönch, L., Rose, O., Carlo, M., et al.: Proceedings of the 2008 Winter Simulation Conference (2008)
Sheet, A.A.K.I.: Evaluating the area of a circle and the volume of a sphere by using Monte Carlo simulation. Iraqi J. Stat. Sci. 8(2), 48–62 (2008). https://stats.mosuljournals.com/article_31429.html
Walpole, R.E., Myers, R.H., Myers, S.L., Ye, K.: Probability & Statistics for Engineers & Scientists, 9th edn., p. 234. Pearson Education, London (2011)
Ross, S.M.: Introduction to Probability and Statistics for Engineers and Scientists, 5th edn., p. 210. Academic Press, Berkeley (2014)
Ardenghi, J.S.: An estimation of the moon radius by counting craters: a generalization of Monte-Carlo calculation of \(\pi \) to spherical geometry. arXiv preprint arXiv:1907.13597 (2019)
Jensen, H.M.: Outline Of The Monte Carlo Strategy, Computational Physics (2010). https://courses.physics.ucsd.edu/2017/Spring/physics142/Lectures/Lecture18/Hjorth- JensenLectures2010.pdf
Oberle, W.: Monte Carlo Simulations: number of iterations and accuracy, mathematics. https://apps.dtic.mil/sti/pdfs/ADA621501.pdf (2015)
Acknowledgements
The authors gratefully acknowledge the support and infrastructural facilities rendered by their institution.
Funding
This work was supported by DBT STAR College Scheme under the aegis of DBT, Government of India.
Author information
Authors and Affiliations
Contributions
All authors contributed equally in carrying out research and preparation of manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that no competing interests exist.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Verma, M., Thapliyal, V., Mishra, A. et al. Efficacy of 3D Monte Carlo Simulations vis-à-vis 2D in the Estimation of Pi: A Multifaceted Approach. Int. J. Appl. Comput. Math 10, 87 (2024). https://doi.org/10.1007/s40819-024-01708-6
Accepted:
Published:
DOI: https://doi.org/10.1007/s40819-024-01708-6