Homework # 7:  Monte Carlo Methods

Below are a few simple exercises that will help you understand better some of the basic ideas in Module 7.  You may use the Documentation Center to assist you with these problems.

Please format your solutions appropriately.  Use text format, not input format, when you are typing text.  Write coherent sentences and paragraphs;  part of your grade will depend on how clearly you present your ideas.

You must work on these exercises by yourself, not in pairs;  if you get stuck and cannot find the solution in the Documentation Center, you may consult the labbie or the instructor during their office hours.

Volume

The stochastic approach developed in Module 7 for computing the area of a circle can easily be extended to compute volumes.  In this exercise you are going to use a stochastic model to compute the volume of a sphere and the volume of a cone.

Develop a stochastic method to find the volume of:

1.  a unit sphere,

2.  a right circular cone with unit radius for the circle at the base and unit height from the base to the vertex.

How well do your stochastic approximations compare to the exact results? (If you do not know the exact formulas for these volumes, you may consult other texts or derive them using Calculus.)

Hypervolume

Volume in 3-dimensions is a physical quantity which can be computed experimentally.  For example, if we need to know the volume of a sphere, we could fill the sphere with water and then pour the water into a container with known volume.  Since we live in a 3-dimensional world, we cannot compute 4-dimensional volume by a physical experiment, but we can still simulate 4-dimensional volume on a computer.  In this exercise you will build a stochastic computer model to find the 4-dimensional volume of a 4-dimensional sphere.

1.  Develop a stochastic method to find the hypervolume of a unit hypersphere -- a 4-dimensional unit sphere embedded in 4-dimensional space.  (Hints:  What is the equation of the unit hypersphere?  What are the dimensions of the rectangular hypercube circumscribed about the unit hypersphere?  What is the hypervolume of this hypercube?)

2.  Your estimate in part 1 for the hypervolume of the unit hypersphere should depend on the number of trials n in your stochastic method.  Denote this estimate by hyper[n].  Plot the difference between hyper[n] and ((π^2)/2) for n varying over a wide range of integers.  What do you conclude about the actual value of the hypervolume of the unit hypersphere?

Comparisons

The figure above illustrates an inscribed square (the smaller square) and an circumscribed square (the larger square).  Also, the positions of the vertices of the inscribed square are shown for a unit circle.  You should be able to deduce the coordinates of the vertices for the circumscribed square.

Arrange each of the following three sets of three numbers from smallest to largest:

1.  ((area of unit circle)/(area of unit square)), ((volume of unit sphere)/(volume of unit cube)),((hypervolume of unit hypersphere)/(hypervolume of unit hypercube))

2.  ((area of unit circle)/(area of  inscribed square)), ((volume of unit sphere)/(volume of inscribed cube)),((hypervolume of unit hypersphere)/(hypervolume of inscribed hypercube))

3.  ((area of unit circle)/(area of  circumscribed square)), ((volume of unit sphere)/(volume of circumscribed cube)),((hypervolume of unit hypersphere)/(hypervolume of circumscribed hypercube))

Explain the geometric and stochastic meaning of these progressions.