October 2019
Beginner to intermediate
498 pages
14h 13m
English
Our final technique for approximating pi will make use of probability and random behavior. These types of solutions are often referred to as Monte Carlo simulations because they use features that are similar to “games of chance.” In other words, instead of knowing specifically what will happen during the simulation, a random element is introduced into the simulation so that it will behave differently each time.
To set up our simulation, consider FIGURE 2.9. Pretend that we are looking at a dartboard in the shape of a square that is 2 units wide and 2 units high. A circle has been inscribed within the square so that the radius of the circle is 1 unit.
FIGURE 2.9 Setting up the Monte Carlo simulation.
Now assume ...
Read now
Unlock full access