S$.}\end{cases}$$ Let $\mu_{X,S}(c)$ denote the number of monochromatic edges in $X^{(S,c)}$ which are incident with at least one vertex of $S$. Finally, define the distribution $\phi_{X,S}$ on $[q]^{S}$ by $$\phi_{X,S}(c) \propto \lambda^{\mu_{X,S}(c)}, 
\quad \text{ that is, } \,\,\,  
\phi_{X,S}(c) = \frac{\lambda^{\mu_{X,S}(c)}}{Z_{X,S}}$$ where $$Z_{X,S} = \sum_{c \in [q]^{S}}  \lambda^{\mu_{X,S}(c)}.$$ The transition procedure of the $(\mathscr{S},\psi)$-block dynamics can now be described. From current state $X_t\in\Omega$, obtain the new state $X_{t+1}\in \Omega$ as follows:

-   choose a random ${\bm{S}} \in \mathscr{S}$ according to the distribution $\psi$;

-   given that ${\bm{S}}=S$, choose a configuration $c \in [q]^{S}$ for $S$ from the distribution $\phi_{X_t,S}$;

-   let $X_{t+1} = {X_t}^{(S,c)}$.

The stationary distribution of this chain is the Gibbs distribution on $\Omega$.

Theorem \[le:block\] below gives a sufficient condition on the number of colours for the $(\mathscr{S},\psi)$-block dynamics to be rapidly mixing. The result is stated in terms of three parameters which we now define.

For $S \subseteq V$, write $\partial S$ for the set of vertices in $V \setminus S$ that have a neighbour in $S$. Write $s:= \max_{S \in \mathscr{S}}|S|$ for the size of the largest block in $\mathscr{S}$. Let ${\bm{S}} \in\mathscr{S}$ be a random block chosen according to the distribution $\psi$. Given $v\in 