Product Design, Manufacturing & Innovation Resources
家 » 蒙特卡罗估计 Pi

蒙特卡罗估计 Pi

1950
Classroom demonstration of Monte Carlo method for estimating Pi in numerical analysis.

(图片仅供参考)

A classic illustration of the 蒙特卡罗方法 正在估算π的值。通过在边长为2r的正方形内作一个半径为r的圆,它们的面积之比为πr²/(2r)² = π/4。随机地 scattering 计算正方形内的点数,并计算落在圆内的分数 [latex]p[/latex],可以得到估计值:[latex]pi approx 4p[/latex]。

The procedure for estimating [latex]\pi[/latex] is straightforward and highlights the core Monte Carlo principle. Consider a unit square in the Cartesian plane with vertices at (0,0), (1,0), (1,1), and (0,1). A quarter circle of radius 1 is inscribed within this square, centered at the origin. The area of the square is 1, and the area of the quarter circle is [latex]\frac{\pi(1)^2}{4} = \frac{\pi}{4}[/latex]. The ratio of the quarter circle’s area to the square’s area is therefore [latex]\frac{\pi}{4}[/latex].

为了估计这个比例,我们生成大量随机点 [latex]N[/latex],其中 [latex]x[/latex] 和 [latex]y[/latex] 均均匀分布在 0 到 1 之间。每个点落在正方形内任意位置的概率均等。如果点 [latex](x, y)[/latex] 到原点的距离小于或等于 1,则该点位于四分之一圆内,这由条件 [latex]x^2 + y^2 le 1[/latex] 确定。我们统计满足此条件的点的数量 [latex]M[/latex]。比例 [latex]frac{M[/latex]/N[/latex] 是对面积比 [latex]frac{pi}{4}[/latex] 的估计。因此,我们可以将π近似为π ≈ 4 M/N。根据大数定律,当N趋于无穷大时,该近似值收敛于π的真实值。然而,收敛速度很慢,误差与1/√N成正比减小,这使得它与确定性算法相比,在高精度计算π方面效率非常低。

UNESCO Nomenclature: 1202
– Computer sciences

类型

Software/Algorithm

中断

Incremental

用法

广泛使用

前体

  • 圆周率的概念是指圆的周长与其直径之比。
  • 笛卡尔坐标系 系统
  • pythagorean theorem
  • 均匀概率分布
  • 伪随机数生成器的开发

应用程序

  • 用于教授概率和模拟的教学工具
  • 随机数生成器的简单基准
  • 计算科学课程的入门问题

专利:

NA

潜在创新理念

  • 数据分析中高维几何对象的体积估算
  • 计算复杂系统中罕见事件的概率
  • 一种简化的方法,让学生测试和可视化大数定律
  • 开发用于教授统计概念的直观界面
  • 使用用户生成的随机数来近似常数的游戏化应用程序
  • 并行计算架构的基准性能
  • 估算分形的面积
  • 更复杂的随机几何算法的基础
  • 统计实验中的抽样偏差可视化
  • 基于随机点分布创建程序艺术
相关术语:π、估算、蒙特卡罗方法、模拟、随机数、面积、概率、数值积分、圆、正方形。

历史背景

蒙特卡罗估计 Pi

1939
1940
1950
1950
1952
1956
1960
1936
1940
1943
1950
1950
1953
1960
1960

(如果日期未知或不相关,例如“流体力学”,则提供其显著出现的近似估计)

第十年 周年纪念日

只有注册会员才能免费获取完整尺寸的图片和下载内容。

> 登录 <