# Introduction to Mathematical Physics/N body problems and statistical equilibrium/Spin glasses

Assume that a spin glass system \index{spin glass}(see section{secglassyspin}) has the energy:

${\displaystyle H=\sum J_{ij}S_{i}S_{j}}$

Values of variable ${\displaystyle S_{i}}$ are ${\displaystyle +1}$ if the spin is up or ${\displaystyle -1}$ if the spin is down. Coefficient ${\displaystyle J_{ij}}$ is ${\displaystyle +1}$ if spins ${\displaystyle i}$ and ${\displaystyle j}$ tend to be oriented in the same direction or ${\displaystyle -1}$ if spins ${\displaystyle i}$ and ${\displaystyle j}$ tend to be oriented in opposite directions (according to the random position of the atoms carrying the spins). Energy is noted:

${\displaystyle H_{J}=\sum J_{ij}S_{i}S_{j}}$

where ${\displaystyle J}$ in ${\displaystyle H_{J}}$ denotes the ${\displaystyle J_{ij}}$ distribution. Partitions function is:

${\displaystyle Z_{J}=\sum _{[s]}e^{-\beta H_{J}[s]}}$

where ${\displaystyle [s]}$ is a spin configuration. We look for the mean ${\displaystyle {\bar {f}}}$ over ${\displaystyle J_{ij}}$ distributions of the energy:

${\displaystyle {\bar {f}}=\sum _{J}P[J]f_{J}}$

where ${\displaystyle P[j]}$ is the probability density function of configurations ${\displaystyle [J]}$, and where ${\displaystyle f_{J}}$ is:

${\displaystyle f_{J}=-\ln Z_{J}.}$

This way to calculate means is not usual in statistical physics. Mean is done on the "chilled" ${\displaystyle J}$ variables, that is that they vary slowly with respect to the ${\displaystyle S_{i}}$'s. A more classical mean would consist to ${\displaystyle \sum _{J}P[J]\sum _{[s]}e^{-\beta H_{J}[s]}}$ (the ${\displaystyle J}$'s are then "annealed" variables). Consider a system ${\displaystyle S_{j}^{n}}$ compound by ${\displaystyle n}$ replicas\index{replica} of the same system ${\displaystyle S_{J}}$. Its partition function ${\displaystyle Z_{J}^{n}}$ is simply:

${\displaystyle Z_{J}^{n}=(Z_{J})^{n}}$

Let ${\displaystyle f_{n}}$ be the mean over ${\displaystyle J}$ defined by:

${\displaystyle f_{n}=-{\frac {1}{n}}\ln \sum _{J}P[J](Z_{J})^{n}}$

As:

${\displaystyle \ln Z=\lim _{n\rightarrow 0}{\frac {Z^{n}-1}{n}}}$

we have:

${\displaystyle \lim _{n\rightarrow 0}f_{n}=\lim _{n\rightarrow 0}\ln(\sum _{J}P[J][1+n\ln Z_{J}])}$

Using ${\displaystyle \sum _{J}P[J]=1}$ and ${\displaystyle \ln(1+x)=x+O(x)}$ one has:

${\displaystyle {\bar {f}}=\lim _{n\rightarrow 0}f_{n}.}$

By using this trick we have replaced a mean over ${\displaystyle \ln Z}$ by a mean over ${\displaystyle Z^{n}}$; price to pay is an analytic prolongation in zero. Calculations are then greatly simplified [ph:sping:Mezard87].

Calculation of the equilibrium state of a frustrated system can be made by simulated annealing method .\index{simulated annealing} An numerical implementation can be done using the Metropolis algorithm\index{Metropolis}. This method can be applied to the travelling salesman problem (see [ma:compu:Press92] \index{travelling salesman problem}).