March 29, 2016---Class 21---Previous Homework Assignment, Metropolis Method
Activities:
Previous Assignment
---------------
We had an extensive discussion of the second two problems on the
last homework. High precision was important for this assignment.
Mathematica is a good tool for most of it. However, other
approaches also work. Some of my codes that we used in class could
be used or adapted for some of work.
The final homework assignment has been linked to the class web page. If you need help with combinatorics, come see me.
Metropolis Method
-----------------
Another interesting method was developed by Metropolis, Rosenbluth,
Rosenbluth, Teller and Teller. It can be used to generate a random
walk that has the desired probability distibution. The key idea is
that we take the current value of x, take a random trial step, and then
test the new point's probability. If it is more probable, we accept
the new point. If it less probable, we accept it with probability
p(x_trial)/p(x). I will show the class a C code that accomplishes this.
You will have the opportunity to code this algorithm for the next
homework assignment.
The method is discussed in CSM section 11.7, starting on page 435.
We discussed the principle of detailed balance and how the
Metropolis algorithm achieves it. You may alsos read the appendix
in CSM to see how the method achieves detailed balance.
The Metropolis method is regarded as one of the 10 greatest numerical
methods developed in the 20th century. It's use is quite widespread.
It is not a particularly good method for generating gaussian random
numbers, but we can learn a lot about the method, its efficiency and
data analysis by studing the method in this very simple context.