solution

Let S be a solid square of length l = 2 and D be a solid disk of radius r = 1 both centered at the origin (0, 0). The quotient of their inscribed areas is proportional to π since

Let S be a solid square of length l = 2 and D be a solid disk of radius r = 1 both centered at the...

As a result, a reasonable approximation of π can be determined by computing the ratio of points that fall into D when uniformly drawing n random samples in S. In the limit n → ∞ we reassemble the inscribed areas A(D) and A(S) (see Fig. 9.20). Implement the described Monte Carlo algorithm using MPI where each process draws n#processes many samples.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!