330 The Monte Carlo method
following steps.
WHILE No acceptable solution found DO
Calculate fitness (merit function) of all individuals;
Enrich the fit ones by letting them create identical clones;
Weed out the individuals with low fitness;
Mate randomly chosen pairs of the population and
and have them create offspring;
Mutate;
END WHILE.
The enrichment through cloning and the weeding of low-fitness individuals is car-
ried out along the same lines as the PERM algorithm discussed above. The size
of the population should remain more or less constant in this process. Mating is
a process in which the two members of a pair of chains are cut into two pieces at
some randomly chosen chain position. The left piece cut off from chain 1 is then
connected to the right part of chain 2 and vice versa.
Mutation is a process in which one of the bits is chosen at random and then
flipped. This is necessary to keep variety in the population. The necessity for this is
seen by considering the case in which some segment is the same in all chains. This
segment would always remain the same in all steps except when mutation takes
place. This interesting method has been used for a large variety of problems [52].
*10.7 The temperature of a finite system
We conclude this chapter with an intriguing aspect of the simulation of finite
systems. In molecular dynamics, the microcanonical ensemble is the ‘default
ensemble’, as the solution of the equations of motion leaves the total mechan-
ical energy constant. On the other hand, in Monte Carlo, the Metropolis algorithm
naturally leads to the canonical ensemble. We know from equilibrium statistical
mechanics that the different ensembles are ‘equivalent’, which means that physical
quantities evaluated with the same values of the thermodynamic quantities in dif-
ferent ensembles are the same up to corrections of order 1/N. For finite systems, the
two therefore cannot be compared to very high accuracy. However, with a careful
analysis of the proper definitions of the temperature, we can make comparisons
between the two as we shall now show.
Traditionally, the temperature in microcanonical molecular dynamics is calcu-
lated from the equipartition theorem. There is however a subtlety in that the number
of degrees of freedom for anN-particle system is not 3N, but 3N−3, where the
three degrees of freedom of the centre of mass must be subtracted as they are fixed
in the molecular dynamics algorithm – only theinternalmomenta contribute to the