x y x y MATH 261, Spring 2001 Due Date: Name(s): Honors Project 8: Monte Carlo Simulation A standard approach to solving problems that challenge the application of analysis, is applying Monte Carlo simulation. Monte Carlo simulation involves using random numbers and statistics to model problems. Let us say, for example, that we want to estimate by finding the area of a circle of radius 1, and we want to avoid the use of integration. We could use Monte Carlo to solve the problem as follows: First we observe that it suffices to find the area of a quarter-circle of radius 1, since 4 times this area is . To find the area of this quarter circle, we generate real numbers x and y between 0 and 1. We then check to see if x2 + y2 1: if it is, then we increment a quantity -- an accumulator -- Tally (whose initial value is 0) by 1; otherwise we do nothing. (It's as if we were throwing darts at the unit square, and we were counting -- with Tally -- the number of times the darts land inside the unit circle.) If we generate the numbers x and y completely at random, then -- after a large number of repetitions of the above process, the ratio of the area of the quarter circle to the area of the unit square (which is 1) will be the same as the ratio of Tally to the total number of repetitions. Thus is approximately 4 times the ratio of Tally to the number of repetitions. One of the advantages of the Monte Carlo method is that it is fairly easy to code, and another is that it can often avoid a complex analysis. One of its disadvantages is that a great number of repetitions are required to achieve a fair degree of accuracy, and another is that it is prone to bias in the generation of random numbers. Tasks 1. Write a Monte Carlo simulation in Maple for approximating as discussed above. How many repetitions are necessary to estimate to 2 decimal places of accuracy. 2. Use a Monte Carlo simulation to estimate the volume of the intersection of the cylinders x2 + y2 = 1, x2 + z2 = 1, and y2 + z2 = 1 to 2 decimal places of accuracy. While Monte Carlo is neither required nor the best method for approaching the first of these tasks, it is not unreasonable to try to apply it to the second since the second is much more difficult to handle by standard analytical methods. (Indeed, it is not easy to even draw a graphic of the solid described in Task 2!) Contributor: Dr. Robert Kleyle Department of Mathematical Sciences, IUPUI