Simple Monte Carlo Examples
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md

README.md

Simple Monte Carlo Examples

  1. Evaluate PI (Algorithm from Wikipedia)
  2. Draw a square on the ground, then inscribe a circle within it.
  3. Uniformly scatter some objects of uniform size (grains of rice or sand) over the square.
  4. Count the number of objects inside the circle and the total number of objects.
  5. The ratio of the two counts is an estimate of the ratio of the two areas, which is π/4. Multiply the result by 4 to estimate π.