Assignment 'Volume of d-dimensional unit sphere'

You will use Monte Carlo experiments to numerically compute the volume of the d-dimensional unit sphere: This is fully described in Exercise 3.8 in the course book. This page gives you some help on the C++ code that is readily available.

1D Monte Carlo integration

We start with a short guideline how to get the code up and running for the one-dimensional case. You will run these first few Monte Carlo experiments as suggested in Exercise 3.4 in the course book. Follow these steps:

d-Dimensional integration

For the multi-dimensional MC, you will use three files:

Additionally, there is the plotsphere.m MATLAB function that reads and plots the files that hitormiss produces. Have a look at the file to find out how it works.

Discussions

There is nothing to hand in now, but remember that the results and conclusions following from Ex. 3.4 & 3.8 should appear in your final report. Investigate the order of the error, what do you expect? How tight is the upper bound, and is discrepancy sampling really noticeably better? How is the efficiency? Be critical of your results.