Q-State Potts Model - Theory and Simulat PDF
Q-State Potts Model - Theory and Simulat PDF
Q-State Potts Model - Theory and Simulat PDF
Tran, Hai
11069436
Abstract
This paper reports a studies into ferromagnetic (or likelihood pref-
erential) Potts model, its statistical mechanics meaning, and propose a
simulation tool to simulate the models with given sizes and number of
states (q) using Monte-Carlo method. Simulation performance is also
discussed.
1 Introduction
In statistical mechanics, a Potts model is a model of spins (a.k.a cells or sites)
interacting with each other on a lattice of d dimension. By having more than
two states of spin, which is the number of states a spin could have in Ising model,
Potts models are, in essence, the generalisation of the Ising model. In fact a
Potts model with 2 states is an Ising model with haft the critical temperature.
Ising model was invented by Wilhelm Lenz who gave it to his student
Ernst Ising as the subject of his doctoral dissertation. It originally was a one-
dimensional model to study the theory of ferromagnetism[1]. Today with the
assistance of computers, multi-dimensional Ising models could be constructed
to study models of individuals with binary states. Some applications of Ising
model could be named such as magnetism, lattice gas, and neuroscience.
Potts model on the other hands, is a general model to study order-disorder
transformations[2] without targeting any applications and therefore can be ap-
plied in many models. Like Ising model, Potts models are used to find the
critical points of a system (i.e. the temperature at which ferromagnetism be-
comes paramagnetism, or the velocity of the foam at which it starts flowing
uncontrollably), which makes two-dimensional Potts models more appealing as
the critical points can be found mathematically. With three or more dimen-
sions the critical points can be located only by numerical means [3], therefore
this project only studies two dimensional models.
This project delves into the simulations of the Potts model using Metropolis-
Hastings method. The simulation tool features an interactive interface with
statistical data diagrammed in real time as well as an option to store these data
for later examination.
1
2 Literature Reviews
One of the first contribution to the study of ferromagnetism is the one dimen-
sional Ising model [1], in which Ising solved the problem mathematically and
concluded that there is no phase transition in one dimensional lattices. He
further theorised the non-existence of phase transitions in high-dimensional lat-
tices, which then proven wrong in theory by Peierls[4] and in mathematical form
by Griffiths[5] and Dobrushin[6]. Ising model of three or more dimensions is yet
(and very unlikely) to be solved mathematically, thus later most of the studies
into the model are to approximate it using various algorithms.
The Potts models origins date back to 1943 with a model suggested by
Ashkin and Teller [7], whom later the vector Potts model with four states is re-
ferred to. Their study focuses on the Curie temperature at which ferromagnetic
materials lose their magnetic properties. Intrigued by this study, Cyril Domb
suggested to his PhD student Renfrey Potts a generalisation of Ising model
with q spins each pointing to one of the equally spaced direction specified by
the angles
2n
n = , n = 0, 1, ..., q 1. (1)
q
In this model the interaction between two neighbours depends only on the
angle between two vectors, hence the Hamiltonian:
X
H = J(ij ) (2)
<ij>
where ij is the angle between the two neighbouring vectors (spins) i and j.
Domb suggestion to the function J(ij ) is:
Potts instead used Kramers-Wanniers analysis[8] and solved the suggested model
with q = 2,3,4, and reported the critical point for all q following the model:
The model Potts solved using Kramers-Wanniers analysis is called the stan-
dard Potts model, in contrast with the original model suggested by Domb,
which is called the planar Potts model. Two models are not related, and only
the original model is studied in this project.
3 Methodology
3.1 Energy of connexions
Physicists assume the magnetic properties are created by two or more particles
spinning to the same direction and contribute to the total magnetic field. Thus
particles of a ferromagnetic material prefer having neighbours with like spin
and particles with anti-magnetic properties prefer having neighbours with unlike
spins. To put the particles preference into mathematical equations, the energy
between two neighbouring particles are the Hamiltonian given by:
2
hi,j = Ji,j (5)
In which is the inverse temperature given by:
1
= (6)
kT
where the Boltzmann constant k = 1.38 1023 joules/Kevin and T is the
temperature of the system. Also in Equation (5), the Kronecker delta-function
i,j is given by:
1 if i = j
i,j = (7)
0 if i 6= j
With q = 2, equation 7 yields haft the energy of the equivalent Ising model,
which is:
i,j = i j (8)
or
1 if i=j
i,j = (9)
1 if i 6= j
since a spin in Ising model could only be either 1 or -1.
Figure 1: Possible states of a square lattice with two spins. The lowest energy
states are confined in dotted boundary, the highest are in solid.
3
thus without introducing a factor J = 1, equation 10 still reflects low
energy preference, or ferromagnetism. Following this approach, the lowest and
highest energy states as depicted in Figure 1 are now H = 0 and H = 4
instead of H = 4J and H = 0J, and the medium energy states how have
energy H = 2 instead of H = 2J.
eh(s)
P (s) = P h(s) (11)
se
in which the numerator is simply an exponential value of the Hamiltonian of a
particular state given in Equation (5) and is easy to calculate. The denominator,
usually called the partition function, is sum of all possible numerators, and is
hard to calculate for any system with meaningful lattice size.
For instance, in a system depicted in Figure 1, the probability for having
four white particles (more accurately four particles in white state) is:
e4J
p(sw,w,w,w ) = 12e2J +2e 4J +2e0J
Temperature Probability
0.01 0.5 or 50%
1.00 0.27 or 27%
2.00 0.149 or 14.9%
10.00 0.076 or 7.6%
1
100.00 0.0637 or approx. 16
Table 1: Probability for the system in Figure 1 to have all four particles in
white state.
As can be seen the probability of having all particles with the same state
is highest at low temperature, when the ferromagnetic particles prefer same
direction alignment, and the free energy in the system is not enough for most
of the particles to change state. Higher temperature brings more free energy to
the system, and when the temperature is high enough the probability for the
4
particles to stay aligned is approximately the same as when they stay misaligned.
It can also be observed that under any temperature, alignment is still preferred
over misalignment, and thus the probability for the system in Figure 1 to have
1
all particles in one state (black or white) is never equal or less than 16 .
Calculating the partition function is hard especially for system of meaningful
lattice size. For instance with d = 2 and q = 3, a system with 100100 spins
3
will have (100 100)2 = 1065536 states! Calculating the partition function with
this many states is unthinkable. Instead, Potts models consider the relative
probability that the system is in two states and decide whether or not to change
state.
If this relative probability is negative, meaning that the state s2 has higher
probability than s1 , the system changes to s2 , otherwise it changes by the rel-
ative probability. In simulation terms that task is usually done by coining a
normally-distributed number between 0 and 1 and change state if the relative
probability is more than this random number.
5
X
M= s (15)
s
Where the faction 12 in Equation 14 is to justify the total energy after each
connexion between two neighbouring spins is calculated twice.
These calculation is expensive if done once in each sweep. Instead, in this
simulation, they are adjusted each time a spin changes state:
+
E = s2 s1 (16)
+
M = s2 s1 (17)
These total values are divided by the lattice size to get the average energy and
average magnetisation, two main statistical data displayed on the applications
real time charts and also recorded to CSV format if requested. This CSV file is
ready to be used in any spreadsheet program for statistical purpose. Section 4
uses the data generated this way to discuss more about Potts models and their
results.
4 Simulation Result
4.1 Potts model results
The main focus of Potts models is to find the critical point and observe the phe-
nomenon occur during the phase transition between order/disorder states. With
d = 2 the critical point (usually denoted as Tc with T stands for temperature
by historical meaning) can be found mathematically[3] as follows:
1
Tc = (18)
ln(1 + q)
in which is the absolute difference between maximum and minimum state
values. In most Potts models this value is = 1 0 = 1, while in Ising model
it is = 1 (1) = 2. q is the number of states in the system.
q Tc
2 1.135
3 0.995
4 0.91
5 0.852
... ...
10 0.70
... ...
To verify the model, data from different runs of Potts models with lattice
size [500 500] and q = 2, 4, 5, 10 is recorded and analysed, the results shown
in Figure 2 and 3 indeed verify the phase transitions occurrence at around
the critical temperature given in Tabel 2. It also shows the sharpness of the
transitions to be sharper when q increases. In fact with Q 4 the transition is
6
Figure 2: Average energy of various Potts models when temperatures auto
increment from 0.0 to 2.0.
7
second order, or continuous, and with Q > 4 the model exhibits a first order,
abrupt transition from order to disorder.
Potts models with q > 2 dont have physical magnetisation and the word
itself carries a different implication depending on the particular application.
For the sole purpose of presenting, the data was recorded from cold-start Potts
models with value of all spin initialised to 0 at start. Unlike average energy which
could only vary from 0 to 2, magnetisation varies from 0 to q 1 and therefore
the data presented in Figure 3 has been normalised to the range [0.0,1.0]. As can
be observed the average magnetisation gradually increase toward the average
value (0.5), and the models transform from magnetised to non-magnetised at the
critical temperatures. This phenomenon occurs concurrently with the increase
of energy from low to high.
Alternatively if a cold-start with initial value different from 0, or a hot-
start with random initial value are used, this average magnetisation will be
misleading, as a completely ordered system can also have average magnetisation
at 0.5, simply by having all spins stabilised at the average value state. (E.g.
in a q=3 Potts model, if all spins have state value 1, the system is order and
magnetised but the average magnetisation (0.5) suggests the opposite).
4.2 Performance
On an average computer, the simulation could handle Potts model with lattice
size [300300] at the frame rate of 60fps. This number decreases sharply when
the lattice size increases beyond [300300]. At the maximum size of [500500]
the simulation runs at 1618fps.
This frame rate cannot be achieved without applying several techniques to
improve the performance. A naive version of this simulation can only produce
half the frame rate, here naive refers to a non-optimised version. Thus the
optimisations applied in this simulation is an important topic worth discussing
here, they are:
8
static int x = 123456789;
static int y = 362436069;
static int z = 521288629;
static int w = 88675123;
int t;
public int nextInt() {
t = x ^ (x << 11);
x = y; y = z; z = w;
return w = w ^ (w >> 19) ^ (t ^ (t >> 8));
}
x n
ex = lim (1 + ) (19)
n n
Obviously the accuracy and speed of an exponential function depends solely
on the number n, but n needs to be considerably large to produce statistically
accurate results. One solution is to build a look up table with highly accurate
predefined exponential value in a certain range. Nicol Schraudolph[14] proposed
an alternatively fast exponential function that utilises the exponent part of float-
ing point number representation in memory to produce much faster calculation
with a subtle inaccuracy. This simulation follows his approach in calculating
exponential value.
9
In total, when all of the above performance tweaks are applied, the simula-
tion enjoys a more than 100% increase in performance.
with the area of foam bubbles accounted in the total energy, found that
at the critical velocity, the foam starts to flow uncontrollably, and that larger
bubbles flow faster. Another study into the development of tumorous cells[16]
modifies the energy function to account for the volume of a cell and the amount
of nutrients, hence the following Hamiltonian:
XX X
H= J (ij ) (i0 j0 ) {1 ij i0 j0 } + (v VT )2 + Kp(i, j) (21)
ij ij
They found that tumours grow exponentially in the beginning, until the
critical level of nutrients is reached, when they start to grow slower and exhibit
a trend of migration toward nutrients.
The Potts model also contributes to Social Science, typically in Sociology
to study the behaviours of each individuals based on sociological variables such
as the preferences of individuals, sizes of the neighbourhoods or the number of
individuals in a society. Lately, one of such model has helped T.C.Schelling
won the 2005 Nobel prize on economics for his work: Dynamic models of
segregation[17].
6 Conclusion
This paper explains the formation of the Potts model in mathematical terms,
how it is simulated on computer and its applications in real life. This paper
also comes with a simulation tool with great flexibility to help visualising and
analysing the ferromagnetic Potts model in particular and the likelihood pref-
erential Potts model in general. The tools is optimised and can handle large
Potts models, thus its optimisation is also discussed in details.
Potts model is a great tools to study many probabilistic models of different
disciplines. It is very likely that Potts model is gaining more and more research
10
Figure 6: Number of publications on Ising model 1966-1998
11
interests in the future, as it has proven to be a successful research tool in recent
days.
References
[1] E. Ising. Beitrag zur Theorie des Ferromagnetismus. Zeitschrift fur Physik,
31:253258, February 1925.
[12] Pierre LEcuyer and Richard Simard. TestU01: A c library for empirical
testing of random number generators. ACM Trans. Math. Softw., 33(4),
August 2007.
[13] Oracle Inc. Class SecureRandom.
12
[16] L. Sun, Y. F. Chang, and X. Cai. a Discrete Simulation of Tumor Growth
Concerning Nutrient Influence. International Journal of Modern Physics
B, 18:26512657, 2004.
13