The dart experiment can be generalized to three dimensions by generating
triplets of random numbers and calculating how many triplets land inside a
sphere that is inscribed in the cube of volume 1. In a similar way, the code
can be
generalized to any dimension. Multidimensional integrals are very common,
for example in statistical mechanics. For each dimension the probability that
the random number coordinate lands within the target is less than one, p<1,
and the
joint probability that a set of D coordinates all fall within the target is
which becomes
smaller and smaller as D is increased.
A module for running the dart experiment in arbitrary dimensions is in the file
!hannes/Chem465/dartsinDdim. You can load it by typing
 | <<dartsinDdim |
and you can run it for N darts in D dimensions by typing
 | dartsinDdim[N,D] |
Try a few runs, starting with the one dimensional case, D=1, and work
your way up until the probability of hitting the target with the number
of darts you are throwing becomes negligible.
This illustrates the
problem of doing high dimensional integrals (remember, the configurational
integral of a 100 atom liquid has 300 dimensions!).
Hannes Jonsson
Modified by Thomas L. Marchioro II
and the Undergraduate Computational Engineering and Science project