Solution
= Solution
One step of the <Glauber dynamics> chooses a vertex $v$ uniformly and resamples its spin from its conditional <Ising model> distribution given all other spins. If the proposed new spin is $x$ and $S_v(\sigma)=\sum_{w\sim v}\sigma(w)$, its update probability is
$$
\frac1n
\frac{e^{\beta xS_v(\sigma)}}
{e^{\beta S_v(\sigma)}+e^{-\beta S_v(\sigma)}}
=\frac{1+\tanh\{\beta xS_v(\sigma)\}}{2n}.
$$