Friday, March 02, 2007

Simulating Ising model with CFTP

I should've made this post long time ago.

I have a working code on how to simulate an exact sample of an Ising model using Coupling from the Past method. This is of course going to be the front section of my dissertation on which I'm starting to type out(soon I hope).

Anyway I've written the code on Mathematica and it can be downloaded from

Just load the file in Mathematica and evaluate notebook.

A description of the diagram above:
  • The red sequence starts from the maximum state, i.e. all +1 states.
  • The blue sequence starts from the minimum state, i.e. all -1 states.
  • We obtain exact sample if at time 0, the final red matches the final blue.
  • The yellow/green sequence shows states which are different(yellow) and states which are the same(green) between the red and blue diagrams on each side.

Currently I am(almost successfully) completing a program which samples a 3-state Potts model. However, improvements I would like to make to the above Ising model is a method of testing whether my model is in fact a good sample.

Comments and feedbacks are appreciated. I accept any questions.

Note: A method I use to speed up the model above is the Besag coding trick. You can read more about it from my presentation here.

No comments: